How to switch servers with zero downtime to your site

Status
Not open for further replies.

tooshy

Banned
Banned
182
2012
37
0
OK fellow website owners. I just thought maybe it's my turn to share something with the clan.

You've probably all had to face that frustrating situation where you need to change to a different server for whatever reason.
The biggest issue with that is that the nameservers of course take forever to update (sometimes up to 48 hours), so you'll either need to have some downtime for your site until they propagate properly, or you'll just need to have a duplicate site on both servers until the first one gets completely dropped.

I just felt like sharing a very simple method I use so that I never need to have any downtime when switching servers. While there are other methods which are just as effective, I like this one as it's really simple. Keep in mind that for this to work you'll need to know that you're switching servers in advance.

OK, so you guys have probably all heard of Cloudflare.

Just register there and a few days (at least 3), move your site over to them (change your Nameservers to their ns).
Now, after 3 days, your site will completely have moved over to Cloudflare. When you decide that you want to move, just switch the IP in the Cloudflare settings to the new server IP. Since the NS isn't changing, the change is pretty much immediate. Now, go to your Registrar and change the NS to your new NS for the new server. This way, while you're waiting for the NS to propagate you're still pointing to the same servers.

This method essentially creates a buffer, where both the old and the new Nameservers are pointing to the server you're using (first the old one, then the new one).
 
10 comments
Cloudflare sucks hard bro
- Its drives lot of legitimate users away even on low security{some have seen a reduction of 50% traffic due to cloudflare}
- In case you decide to remove cloudflare NS and revert back to your server NS , dns propagation take longer than usual{48 hrs for some where dns propagation normally takes 6-10 hours)
-All your visitors will appear to have same range of ip{cloudflare ip} so in case your site needs real user ip address to work properly, cloudflare is NOT recommanded. Ofcourse you can install cloudflare module to show the real ip but it largely depends on your ability to work with servers.
If you have to use CDN , use paid ones LiKe MaxCDN
 
Cloudflare sucks hard bro
- Its drives lot of legitimate users away even on low security{some have seen a reduction of 50% traffic due to cloudflare}
- In case you decide to remove cloudflare NS and revert back to your server NS , dns propagation take longer than usual{48 hrs for some where dns propagation normally takes 6-10 hours)
-All your visitors will appear to have same range of ip{cloudflare ip} so in case your site needs real user ip address to work properly, cloudflare is NOT recommanded. Ofcourse you can install cloudflare module to show the real ip but it largely depends on your ability to work with servers.
If you have to use CDN , use paid ones LiKe MaxCDN

1) I'm talking about using Cloudflare for a total of 6 days. That'll hardly affect your users.
2) DNS propagation will take exactly the same amount of time. It has nothing to do with Cloudflare or your registrar. It depends on when the ISPs refresh their DNS caches. That really doesn't matter since the users will be forwarded to the same IP during the propagation time.
3) Exactly that. Cloudflare has a number of modules that can be used to see the real IPs. It can even be used with Adsense.

Still... I'm talking about a total of 6 days tops using Cloudflare, so these remarks are hardly valid.

---------- Post added at 06:26 PM ---------- Previous post was at 06:24 PM ----------

Just duplicate the site db and change nameservers, easy. Cloudflare, phssss

Yeah... that doesn't work.
Think of it this way - If you have a forum and you simply duplicate the database to the new server, all the posts made on the old server (before propagation) will be lost when the NS propagates.
DNS propagates faster for some locations than others, which means that different users will be seeing different versions of the same site until the NS fully propagates.
My method steers clear of these problems.
 
1) I'm talking about using Cloudflare for a total of 6 days. That'll hardly affect your users.
2) DNS propagation will take exactly the same amount of time. It has nothing to do with Cloudflare or your registrar. It depends on when the ISPs refresh their DNS caches. That really doesn't matter since the users will be forwarded to the same IP during the propagation time.
3) Exactly that. Cloudflare has a number of modules that can be used to see the real IPs. It can even be used with Adsense.

Still... I'm talking about a total of 6 days tops using Cloudflare, so these remarks are hardly valid.

---------- Post added at 06:26 PM ---------- Previous post was at 06:24 PM ----------



Yeah... that doesn't work.
Think of it this way - If you have a forum and you simply duplicate the database to the new server, all the posts made on the old server (before propagation) will be lost when the NS propagates.
DNS propagates faster for some locations than others, which means that different users will be seeing different versions of the same site until the NS fully propagates.
My method steers clear of these problems.

Excuse me? 6 Days for propagation ? You must be kidding right ? :facepalm:
DNS Propagation takes no longer than 24 hours, in rare cases it goes upto 48 hours.
And its better if you duplicate the db and files on your new server. So when your site switches to the new NS, no downtime can be seen. Why take the toll of Cloudflare ? :|

EDIT: You can still wait for 24 hours, nothing will be damaged for you in that small interval lol.
You can have lots of options : Disable the site functionality, go into maintenance mode blah blah.
 
Excuse me? 6 Days for propagation ? You must be kidding right ? :facepalm:
DNS Propagation takes no longer than 24 hours, in rare cases it goes upto 48 hours.
And its better if you duplicate the db and files on your new server. So when your site switches to the new NS, no downtime can be seen. Why take the toll of Cloudflare ? :|

EDIT: You can still wait for 24 hours, nothing will be damaged for you in that small interval lol.
You can have lots of options : Disable the site functionality, go into maintenance mode blah blah.
6 days is just referring taking an extra 48 hours over the double propagation to and from Cloudflare. 2 days to propagate to Cloudflare, and 2 days back. READ MY THREAD BEFORE YOU REMARK
This can work also using a 48 hour timeframe.

You can still wait for 24 hours, nothing will be damaged for you in that small interval lol.
If you have a forum where no new posts are made within 24 hours so you're not worried, well I guess you've got bigger problems than propagation and it's more than obvious that you won't find this info useful.
Besides, read the friggin title I'm talking about zero downtime. If you don't need zero downtime, don't bother reading this thread.

bottom line. If you don't like this method - DON'T USE IT
I'm offering some advice FREE OF FRIGGIN CHARGE without expecting anything in return. This is my 2 cents. If you don't like it, don't use it, but don't bitch about it - especially when you don't have a clue what you're talking about.
 
6 days is just referring taking an extra 48 hours over the double propagation to and from Cloudflare. 2 days to propagate to Cloudflare, and 2 days back. READ MY THREAD BEFORE YOU REMARK
This can work also using a 48 hour timeframe.

If you have a forum where no new posts are made within 24 hours so you're not worried, well I guess you've got bigger problems than propagation and it's more than obvious that you won't find this info useful.
Besides, read the friggin title I'm talking about zero downtime. If you don't need zero downtime, don't bother reading this thread.

bottom line. If you don't like this method - DON'T USE IT
I'm offering some advice FREE OF FRIGGIN CHARGE without expecting anything in return. This is my 2 cents. If you don't like it, don't use it, but don't bitch about it - especially when you don't have a clue what you're talking about.
Lol thats the most epic calm reply I've ever seen from someone.
You are not understanding what I'm trying to say.
There's no such thing as 0 downtime. When your site switches to cloudflare, its just a cache of your site which goes live till your real site comes back.
There's no use in that.

And you must learn your manners man.
 
There's no need to go through the fuss of CloudFlare, though it can be useful, but only for downtime concern, isn't.
If you are moving site from one place to another, all you need is to copy your site on other location, change DNS,wait for DNS to propagate while both sites are 'online' (in case of NameCheap 10 mins top, use just-ping.com tool to see magic, how fast DNS is being propagated to every location in the world) and switch will be with 0 downtime, just like Phogo said

Just duplicate the site db and change nameservers, easy. Cloudflare, phssss

@ Froomple and tooshy, no need to be rude to each other, everyone have their own methods which work for them. We all learn here.
 
There's no such thing as 0 downtime. When your site switches to cloudflare, its just a cache of your site which goes live till your real site comes back.
Cloudflare only uses the cache when your server is down. If your server is up it serves as a proxy and directs the traffic directly to your website. I've used this method a number of times and it IS zero downtime.

though it can be useful, but only for downtime concern, isn't.
Again, I'm only offering this to people that ARE concerned about downtime.

change DNS,wait for DNS to propagate while both sites are 'online' (in case of NameCheap 10 mins top, use just-ping.com tool to see magic, how fast DNS is being propagated to every location in the world) and switch will be with 0 downtime, just like Phogo said
Again, NS propagation has nothing to do with the registrar. All the registrars update immediately. It takes time however for the different ISPs to refresh their DNS cache and update the new NS.
If it's a new domain, the ISPs don't yet have the NS in their cache, which is why the update is then immediate.

Anyway... I'm out. You guys obviously know better than me.

5195-1270679518.jpg
 
Just use a temporarily reverse proxy service. Or if you have $5 just get a vps, install nginx and run it as a RP.

Then when you have everything transferred just change the DNS.
 
Status
Not open for further replies.
Back
Top