Web Hosting Talk







View Full Version : How do you make a backup server?


MartinK
07-26-2002, 04:10 PM
OK, I am sure this is simple! How do you setup one server as a backup for another?

I assume you can use the zone file to redirect, you could even redirect on a set time period so that if your main server was bussy it redirected users to the backup server. However, that would require the server to be up, it would only help if their was a problem with HTTPD? Even a problem with BIND would stop both working?

Modifying the domains name servers so that one name server is one phsyical box and the other name server goes to a different phsyical box seems sensible, but another post at WHT mentioned that it is not as simple as all vistors being sent to your first name server if it is working, then your second and so on, they suggested it was a lot more complicated.

Any solutions for a backup server? What about automatically backing up to another server? I guess you could write a cron to FTP to the new box send the tarball and then uncompress this?

Cheers peeps.

clockwork
07-26-2002, 07:34 PM
If it's in the same data center, man rsync

driverdave
07-26-2002, 09:33 PM
rsync for backup or a hot mirror.

they don't have to be in the same datacenter, and rsync has options for knowing what has been updated and what hasn't.

it's very handy.

as for your load balancing question. search for round robin DNS.

to be able to do real load balancing, you'll need to spend some cash.

clockwork
07-26-2002, 10:22 PM
Originally posted by driverdave

they don't have to be in the same datacenter, and rsync has options for knowing what has been updated and what hasn't.


He'd need to forward DNS then, it's way easier if it's in the same NOC, then you can just have a script that will bind the ips to the spare box and update arp.. and bingo.

However, my suggestion doesn't solve anything if the whole network goes down :)

I think you'd still be looking at a significant downtime if you had to forward dns, due to propogation... Now, how many network downtimes really last more than a few hours?

Sounds like a pain in the arse.

MartinK
08-12-2002, 08:52 PM
Thanks guys :)

I think I have the files bit sorted now. Still not sure on making it so that if httpd fails on the main server another is used?

Round robin DNS sounds interesting, but my aim is to use the backup server primarily to ensure uptime rather than to split the load.

Was thinking to split load could do a lower priority record in the BIND zone file so that if their was no response from httpd in a predetermined time then the backup box would be used. Maybe using an SRV record?

complx.net
08-12-2002, 09:33 PM
A simple workaround is to set multiple A records
Example:

domain.com. IN A 192.168.1.100
domain.com. IN A 192.168.1.101


doesnt solve your keeping the files in sync issue, but yea

tilted
08-13-2002, 02:52 AM
rsync is your friend when setting up a hot failover server. You'd probably be best of with a load balancing switch, and weight it 100% in the direction of Server A. Only if Server A fails will it begin preferring Server B. Round robin DNS won't do much for you in the case one of the servers fails if you're talking quality of service. :cool:

datarealm
08-14-2002, 04:53 PM
For just 2 machines you don't need to spend the cash on a full load balancer -- all you need is an extra IP address. Use the extra IP for the web site, and then setup some monitoring software on the backup which will add the address (and send out an arp) if the primary server fails, and have it drop the interface when the primary is online.

If you're using linux check out: http://www.linux-ha.org/