Comments on Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Heartbeat On Debian Etch

Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Heartbeat On Debian Etch This article explains how to set up a two-node load balancer in an active/passive configuration with HAProxy and heartbeat on Debian Etch. The load balancer sits between the user and two (or more) backend Apache web servers that hold the same content. Not only does the load balancer distribute the requests to the two backend Apache servers, it also checks the health of the backend servers. If one of them is down, all requests will automatically be redirected to the remaining backend server. In addition to that, the two load balancer nodes monitor each other using heartbeat, and if the master fails, the slave becomes the master, which means the users will not notice any disruption of the service. HAProxy is session-aware, which means you can use it with any web application that makes use of sessions (such as forums, shopping carts, etc.).

9 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By:

Hi,

I just ordered two servers from Hetzner and asked for an extra nic and crossover cable in each. Having figured that I could setup a HA server, I sent a request about this. They gave me a very clear response message that they no longer offer that. Their ip routing now uses mac address filtering. It might be a good idea to remove that from the tutorial before somebody else wastes money on servers. Hetzner servers are very cool, but cannot be used for HA anymore.

Regards,

Tim 

By: admin

I'd call them and ask for the telephone number of the data center guys - these guys can help you; everyone else will tell you that virtual IP addresses are not possible.

By:

Thanks, I'll try that. I heard they introduced mac filtering and for that reason this was no longer possible. When I called them, I was told I need to talk to the root server techies and was given a number. I assumed that these were datacentre guys, but it seems that they're not. I'll let you know how I get on after I talk to the *real* people ;-)

By:

Just want to give an update on this matter. If the servers are placed in the new data centre (Number 8), virtual or shared ip address are no longer possible. This is only possible in their other data centres.

Just letting you know so that others don't make the mistake I made, and just assume it will work. (I really must learn to make less assumtions!)

Having said that, they are trying to find room in one of the other data centres for me now. I really really hope they do :-) and I just wanted to say thank you for suggesting to talk to the datacentre guys directly. They are certainly A LOT more helpful!! 

By: matthias

Falko ich bin ein riesen Fan von dir. Nur in dem tut hätte mir gefehlt, dass cookie JSESSIONID prefix geändert werden muss in die entsprechende Session die von php/java benutzt wird. 


 Gruß 

 

By: Ayman

Thanks for the documentation it works perfectly but i have question what if the heartbeat is running and the haproxy went down on the master? I tried to bring it down and i was unable to access the httpd! 

By: El Vis

at the last picture is my problem. I don't get any webserver!

By: Ravishankar Patel

Hi Team,

Frankly speaking , I dont know much about server and load balancing stuff .

can you please give me some basic  .pdf for load balancer ,servers n networking.

or website to learn

Regards

By: Soledad

Hola, 

Le comento, yo instale Hearbeat con Haproxy, funciona muy bien. El problema es que el Haproxy, al momento de levantar mi sitio web sunciona bien, es donde se encuentra corriendo mi aplicacion. Cuando esta aplicacion me pide usuario y contraseña, ingreso lo mas bien, pero a los minutos me saca de mi aplicacion el haproxy. Espero que me alla explicado bien. si me logra entendes, esperare su respuesta! Muchas gracias.