Portal Home > Knowledgebase > Articles Database > Failsafe VPS setup
Failsafe VPS setup
Posted by Pete eteP, 08-19-2011, 08:13 PM |
I am new to this so please excuse my ignorance.
I am considering setting up a failsafe setup for my VPS.
I have around 50 websites under my VPS and using space at the moment of around 8gig.
I am thinking of finding a cheap second VPS to be used for only emergency if the main one goes down.
I understand that my host would set the main server to be failsafe (setup dns and pinging software etc) and auto backup to the second server? Is that right?
Or do I need to use a service like dns made easy?
If someone could give me an idea on this and also rough prices.
I am a small business with a small budget but if possible would like to implement this for my customers.
|
Posted by macmat, 08-19-2011, 10:05 PM |
If you're using your VPS to manage DNS for your ~50 domains then yes I would either suggest you use a 3rd party DNS or you'll have to setup the 2nd server as another DNS server and when VPS 1 fails you'll have to change the entries in VPS 2 DNS.
Technically you'll have to change entries in the 3rd party DNS also but you also have NS resolution for your ~50 domains and it'd be better to use a DNS server that won't change.
|
Posted by Pete eteP, 08-19-2011, 10:41 PM |
Thanks macmat.
I'm still confused a little.
How does the syncing happen for example?
|
Posted by Pete eteP, 08-19-2011, 10:51 PM |
are there any companies that do the hosting and dns all in one?
Dnsmadeeasy just does the dns but no server hosting
|
Posted by macmat, 08-19-2011, 10:56 PM |
Tons but somewhat pointless.
I'd suggest you used a 3rd company to do dns if you're looking for redundancy. You can even rent a small vps just for dns.
As far as syncing you'd have server 1 sync with server 2 over some interval.
It's not hard but since you don't seem comfortable with it I suggest you either hire a company to host that can offer redundancy or hire a consultant to help you set it up and explain how to manage going forward (ie: setup the web1, web2, dns, syncing, and your dr plan)
|
Posted by Pete eteP, 08-19-2011, 11:03 PM |
ok.
I was hoping there would be an easy all in one solution.
Make some adjustments on a control panel and maybe add another dns entry on main vps. :-(
|
Posted by Pete eteP, 08-19-2011, 11:21 PM |
or maybe I can just do this to keep my customers informed.
I already have this free website emergency page
http://zwebdesignstatus.awardspace.com/
The main thing is to notify my customers that we are working on the prob and to keep them updated.
So what if I just add another dns setting pointing to that
so
myip 1
myip 2
emergencyip 3
Shorten the TTL as I have read.
Would that at least work??
|
Posted by Pete eteP, 08-19-2011, 11:27 PM |
i think that will work.
I have asked my host to help me set this up.
|
Posted by macmat, 08-19-2011, 11:29 PM |
TTL isn't always followed hence the reason they say it can take up to 72 hours to fully propagate.
honestly if you're so concerned about redundancy I suggest you used a company that offers it.
there's no point in having 3 when any one failure takes it all down.
|
Posted by Pete eteP, 08-19-2011, 11:39 PM |
oh yeah 2 I should have said.
Yep I read that even if the TTL is short you still have the issue of ISP's only refreshing their dns every 24hrs or at various times.
Bugger.
|
Posted by Pete eteP, 08-20-2011, 12:15 AM |
confirmed.
Will not work.
:-(
|
Posted by Ronald_Craft, 08-20-2011, 12:50 AM |
It almost sounds like you want a cloud setup without the cloud, or at least a fail over/load balancer. You can do this with apache. A guide is here:
http://www.howtoforge.com/high_avail...apache_cluster
This tells you how to do it with two nodes, so in this case two VPS's for apache and two for load balancing. If apache fails on one, it'll switch to the other node. There's other guides around on the net as well which covers this topic - however, even just reading through some of these should give you a good idea of how to set it up and what you'll need.
But, yeah, having a DNS fail over is not a great idea since the TTL may be ignored and visitors will still go to the old server regardless. If you want a little bit of redundancy, go for load balancing on your web server.
|
Posted by spaethco, 08-20-2011, 01:01 AM |
TTL is followed by all but a few braindead ISPs. Every major US market ISP with the sole exception of AOL (and even they are coming around) will honor short TTL.
If your clients face interruptions due to a bad ISP, have them use external resolvers like http://code.google.com/speed/public-dns/ or http://www.opendns.com. If people still complain that it doesn't work, fire them and get smarter customers.
This all works -- many of us are doing this today. There isn't any off-the-shelf solution to do it though, so you have to do your own integration of various components for sync, monitoring, and DNS-driven failover.
|
Posted by Pete eteP, 08-20-2011, 06:49 PM |
mmm
various views on this.
I have thought about this more and really now all I want is to be able to point to my emergency page to keep customers updated if there is an issue/main server goes down.
http://zwebdesign.zzl.org/
So from what I understand all I need do is change my secondary nameserver to point to the emergency page and shorten the TTL to say 15 mins.
Is that right?
Appreciate everyone's thoughts on this.
|
Posted by spaethco, 08-20-2011, 07:02 PM |
For that to work you either need a dedicated IP to serve up that page (no vhosts), or you need to configure all your site hosts to set a redirect to your status status page. DNS just resolves hostname to IP address -- once clients connect to that IP it needs to know what content to serve up.
No. Other than the order in which you enter them, there is no "primary" or "secondary" DNS server. All DNS servers you have defined are used 100% of the time, and servers use various algorithms to choose which one they'll contact. You need the resource records to be modified after a failure to point to the new location.
The TTL defines how long the record can be cached, so if you have a regular record with a TTL of 86400 (1 day), and you make a change after a failure and then set it to 900 seconds (15 minutes), everyone who already fetched the old record is going to wait a day before they query again. You have to set TTL low from the beginning to keep clients coming back and querying for the current IP address.
|
Posted by Pete eteP, 08-20-2011, 07:12 PM |
my head hurts.
Can I just have the instructions in simple bullet form on what I need to do to get this to happen then?
Help!
|
Posted by Pete eteP, 08-20-2011, 07:15 PM |
ps I only want this emergency page to come up when they go to my main website, not for all customers websites.
So customer website goes down they go to my website and see emergency page with progress updates on when back online.
Oh that wont work either because I have a different nameserver ip than my customers. :-((
|
Add to Favourites Print this Article
Also Read
Redirect URL (Views: 711)