Quote:
Originally Posted by bskrakes
Hi all, time to pick the brains of the professionals!
So at work we have two Apache servers, one is production and the other is a backup server... In the event the production server goes down we switch over to the backup server. The tricky part is that they are both front facing and have different static IP addresses... So I can do this a couple of ways...
1) Have one server which manages the connections to each server (but then I would also need a redundant server here - could be VM's I suppose)
2) Get a router which allows for Virtual Server configuration, meaning I place a router in front of the two servers assigning it one IP which the DNS points to. In the event the production server fails I log into the router and point the Virtual Server to the backup Apache server.
3) Make backup copies of all the network configuration files on the backup server and in the event the production server crashes I could simply change the IP of the backup server to the production servers IP.
Any comments and suggestions would be much appreciated as I currently do not have any method other than changing the network configuration. Lucky for me my collocation service provider is a 5-10 minute walk from my office
|
Well, you can do this in a number of different ways.
You can get a hardware gadget (like Radware), that will manage that for you. Just plug in servers, and Radware can monitor things, and if one fails, it'll send the traffic to the other. That buys you things like being able to load-balance if you need to, or add more servers later on, and still have just one IP address that's front-facing. Downside it, it's something else you have to manage/maintain.....
The way I've done it in the past (for non-critical things, mind you), has been to install a second NIC into each box, and connect them via a crossover cable. A script on the backup box will just ping the primary every minute or so...if it didn't get a reply, it would try on the 'public' address too. If no reply on either...it would run the appropriate ifconfig statements to move IP addresses over, etc., to make it assume the identity of the primary box, and send out an email to let me know what happened. I could go fix the primary unit, and bring it back up, while services stayed online.
Not a perfect solution, though...if the machine hung up, and could be ping'ed, but was otherwise unresponsive, it wouldn't do anything (yes, I know you COULD add things in for wget calls, etc....
), and you had to make sure the web pages were in sync between both boxes. But it was very low-cost and easy to implement.
If it's a critical system, spend the money on a 'real' device, like you mentioned in point 2....