LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Configure fail-over to hot spare Ubuntu server (http://www.linuxquestions.org/questions/linux-networking-3/configure-fail-over-to-hot-spare-ubuntu-server-4175424025/)

dacdave 08-25-2012 10:01 PM

Configure fail-over to hot spare Ubuntu server
 
I have an application server running on Ubuntu that is accessed via a public URL that is widely known and used by all of my users to get to our service. I have a second, twin server (with its own, unique TCP/IP address, obviously) that is a hot spare for the production server.

What is the best way to fail over from the main server to the hot spare? I cannot wait for DNS servers around the world to update their caches. Should I bring down the main server (which is probably down anyway, or why would I be failing over to the spare), reconfigure the spare with the TCP/IP address on the broken main server, and then reboot the spare?

It seems like there should be a more elegant way.

Dave Smith

TheMadIndian 08-25-2012 11:14 PM

Can't use a load balancer?

dacdave 08-26-2012 04:32 AM

Don't have one yet...
 
A load balancer is probably in the future for this site. At the moment, it does not have one. Online production server is backed up daily and these backups are applied to the standby server. No real-time synch at the moment.

Thank for the reply.

iamwilliam 08-26-2012 12:17 PM

Hi,

Have a look at Linux-HA or LVS. In a nutshell, your DNS records resolve to a Floating IP/Virtual IP. Heartbeat will determine which server is active thus, getting the Virtual IP. This failover should be automatic.

The Piranha+LVS setup is well documented here

dacdave 08-26-2012 02:50 PM

Will this work on Ubuntu?
 
iamwilliam,

It looks from your link that your solution requires Redhat servers. My servers are running Ubuntu. Isn't that a problem for me?

Dave

dacdave 08-26-2012 02:57 PM

All,

I agree that the desired long-term solution is a high availability cluster configuration. At the moment I am just trying to set up a manual fail-over between two identical application servers.

TheMadIndian 08-26-2012 09:09 PM

Quote:

Originally Posted by dacdave (Post 4764774)
All,

I agree that the desired long-term solution is a high availability cluster configuration. At the moment I am just trying to set up a manual fail-over between two identical application servers.

what do you use for a firewall? you could use destination nat

can you build another server that has two nics? you could easily make a linux router and you could use iptables with dnat and change the dnat ip based on which host you want to use manually and use masquerading so the external IP never changes

what ports and protocols does the app require? I could give you an example of what I'm talking about


All times are GMT -5. The time now is 09:07 PM.