Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Let's say I have a fully working, load-balanced application server environment.

All servers have to fail-over gracefully. It's relatively easy to do with the application servers, but how can I achieve fail-over with the front load-balancer?

Can I have multiple load-balancers listening on the same IP and port? Do I have to run a new one as soon as I detect the old one died?

share|improve this question
    
What application server are you referring to? Without more detail I'm not sure how much help we can provide. –  Tim Brigham Feb 21 '12 at 19:11
    
Any application server, it doesn't matter. –  thwd Feb 21 '12 at 19:21

2 Answers 2

up vote 4 down vote accepted

In basic terms:

  • You have two or more load balancers running at the same time
  • They are both configured with the same config, IP address, etc
  • They run a heartbeat
  • Only one is active at any given time
  • When the heartbeat from the active node goes away (fails), the rest negotiate between them who will come online next

Basically high availability in an active/passive cluster works the same way nomatter which technologies you're using, so the above applies for Load Balancers, Database Servers, Hypervisors, etc.

In Linux this is done with a combination of tools, one of which is actually called heartbeat (and syncing your configs is often done with drdb).

In Windows, you would generally use Failover Clustering, or Network Load Balancing, both of which offer a virtual IP address shared by multiple servers. Syncing your configs can be done with DFS-R for Network Load Balancing, or clustering actually has the ability to share a registry hive and re-configure it in the case of a failover.

share|improve this answer
    
Or he could be using a hardware load balancer, or properly a cluster of them. –  mfinni Feb 21 '12 at 19:59
2  
True. Although the concept is much the same, "hardware" load balancers tend to just use proprietary implementations of the above concepts. –  Mark Henderson Feb 21 '12 at 20:32

I will probably test in a few days the following as a high availability load balancer for some "real" web servers:

  • two Archlinux servers (very "basic" installation)
  • each one runs Pound as reverse proxy and load balancer
  • Keepalived takes care of IP failover

I will run an active/passive configuration, i.e. each IP (I have about 20) is active on only one of these servers. If one of this servers fails, the other one takes care of all the IPs. Pound can detect if one of the web server fails and behaves accordingly: Pound does not redirect any request to it until it is healty again.

Not sure if a similar solution can be appied to your application servers, but I fully quote Mark Henderson

Although the concept is much the same, "hardware" load balancers tend to just use proprietary implementations of the above concepts

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.