[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Webserver Redundacy



Julian De Marchi wrote:
My main website is www.jdcomputers.com.au with an ip of 203.79.115.45. If
for some reason this goes down I would like the domain name to point to my
"hot spare" web server (203.79.115.42). How would I accomplish this?
Since they're on the same subnet, you can have a process on the spare that periodically pings the main server. If it fails, the script just starts answering to the main server's IP:

  ifconfig eth0:0 203.79.115.45

You may or may not have to restart/reload your httpd after doing that.

Be warned that, if your main server "comes back to life" (via a reboot or whatever) and starts answering to the IP that the spare has assumed, I imagine that mass hilarity will ensue. In other words, make sure you "ifdown eth0:0" on the spare right before you reboot your main (or, at least, before your main executes /etc/init.d/networking during the boot process).

- Joe

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: