I am currently hosting on Bigrock and my domain name is also from Bigrock. I am facing many issues regarding the server memory and I need to conduct an important event on my website in about 50 hours for which there are registrations going on. I have found a better plan that can solve my problems on Bluehost. The problem is that updating the name server will take a lot of time which I cannot afford to lose. Is it possible that I can add the name server from bluehost in the existing list of name servers so that all can be up simultaneously. Or is there some way out that the site's downtime is reduced as much as it can like I might be running a copy while the other one is being configured.
2 Answers
What you are asking is how to migrate servers by making DNS record changes. You can lower the TTL of the records and make sure both zone files are active (old with the old records and new with the new records) and change the DNS delegation in the domain registrar portal but it can still take as long as 48 hours for everyone to see the new DNS records. So while people see the old records they will go to the old website. If your event is in 50 hours, I would say you should be able to make this work, but the larger issue is since people are doing registrations at the same time, how are you migrating data from the old server to the new server? If you don't do that you will have some registrations on the old server and some registrations on the new server.
- 3,144
To mitigate the issue of DNS delay described above, you can configure the old server as a reverse proxy to the new server, so that any request arriving at the old server is transparently proxied to the new server.
This reverse proxy adds a slight delay, since the request from user comes first to old server, which sends the request to new server, receives response from the new server and sends it back to the user.
So, the working order would be:
- Shut down site on old server.
- Copy files and databases to new hosting and make sure new hosting works.
- Configure reverse proxy at the old site.
- Change DNS entries so that only the new site is listed in A records.
- After you see that there is no traffic on the old server, you can proceed to get rid of it.
This approach makes sure that there is a single site always available.
You should be able to find several guides on how to do reverse proxying in Apache2 or nginx.
- 37,584
-
How to 'shut down' site on the server. How to configure reverse proxy at the old site/server. How to configure the A records. Please could you help me out in these. – Abhinav Arya Aug 29 '16 at 17:45
-
Shutting down the site is the same as stopping the web server. Otherwise these are too broad topics for a Q&A site like this. There are several guides on all these topics available on the internet. You can come back with any specific questions here if you don't understand some individual concepts in the guides. – Tero Kilkanen Aug 29 '16 at 18:08
-
Okay. I got it. One specific question: when I erase the existing nameserver details from existing hosting provider and add new hosting provider's namerservers. Will it immediately shut down my site. I mean people will no longer be able to visit the site ? – Abhinav Arya Aug 29 '16 at 18:11
-
No. There are several caching layers for DNS information around the Internet, so for some time, the domain name will resolve to the server. Shutting down the server means shutting down the web server responding to the requests, or making a maintenance page which is displayed to all visitors. This makes it safe to copy all data to the new server. – Tero Kilkanen Aug 29 '16 at 18:16
-
Well that's what I want. What I can do is erase the existing records and update with new host's nameserver. By the time the DNS propagates, old site will be functioning. I will keep exporting the databases from the running site and as soon as the propagation completes, I will import the most recent database into the new site. Do you think this is possible ?? – Abhinav Arya Aug 29 '16 at 18:21
-
You cannot know when the propagation is complete, since the caches around DNS system refresh their contents when their TTL expires. Their remaining TTL depends on the time when they first resolved the domain IP the first time. With my method you can be sure that only one copy of the site is in use. – Tero Kilkanen Aug 29 '16 at 18:42
-
One last question Sir. What is your gut feeling about traffic from about 600 users during a period of 45 to 50 minutes on a shared linux server with 2GB memory. Can it sustain ? – Abhinav Arya Aug 29 '16 at 19:53
-
It is impossible to estimate anything without having a look at the code, database design, server configuration etc. All I can say that it either sustains or doesn't. You can use http://serverfault.com/questions/384686/can-you-help-me-with-my-capacity-planning as a reference on capacity planning. – Tero Kilkanen Aug 29 '16 at 20:06
So will my site at Bigrock continue to work till the copy at Bluehost comes to life ? Are the steps right ? I am sort of new to this thing please.
– Abhinav Arya Aug 29 '16 at 13:35