Hello people. I have a blog - www.techsplurge.com my problem is that sometimes like one time in a month, my server goes down for server maintainence. So i was thinking what to do when it goes down cos it can make a huge amount on my traffic when the blog gets bigger. So i just got another hosting and put its nameservers along with the main nameservers. So whenever the main server goes down, the second server comes into play. But it creates a lot of problems cos many ISP still point to the first server. Can anyone suggest any solution for this ? What can i do or is there any script which can help me?
The best option is to put 2 servers behind a load balancer that way you just have a single public IP, however it's expensive. The alternative is to use a service like http://www.dnsmadeeasy.com/ which offer a fail over service. You use their nameservers and manage the domain via them, when the detect a failure of the primary server they update the zone to point to the secondary server. The are using low TTL values to do it so providing all the DNS caches that the visitor is using obey that value down time is in theory quite small. You can't just add the name servers from the 2nd host to your domain name it won't work like you expect, it will most likely split traffic between the 2 servers which means if one is down some or all your visitors will still see the site as down.
Alternately, if both servers are on the same network, is it possible for the backup server to 'inherit' the IP of the primary server? It could be possible for the backup server to regularly ping the primary server (or otherwise perform a heartbeat-style function). If it doesn't receive a response, it could accept IP requests from the primary's IP address, essentially taking over its controls. Coupled with some sort of shared filing system, this could provide failover. However, the DNS solution mentioned above is probably easier, but you'll need to take into account any data replication issues.
Thanks tolra for the suggestion. I will try that solution. Btw, is there any other service like dnsmadeeasy ? Any paid but cheap one?
There are others I can't remember their names off the top of my head, just google for DNS failover, should give you a selection to choose from. Personally I'd avoid going too cheap as with everything you get what you pay for as as the point of this is to improve uptime the last thing you want is unreliable nameservers.