7

I read http://blog.stackoverflow.com/2010/01/stack-overflow-network-configuration. The post says that fault tolerance was achieved for the two HAProxy instances by using Heartbeat/Linux-HA which creates a virtual IP address shared by the instances. Does client traffic get sent to the shared IP address (the "virtual") and through the magic of changing the mac address associated with the IP address, traffic goes to one of the HAProxy’s until that box fails or is taken down?

This configuration wouldn't achieve load balancing if that was a goal. How would you have done that?

Finally, are clients still connecting directly to HAProxy as shown in the post or did you front it with nginx or something?

1 Answer 1

6

We are hosted out of NY now and you will find a lot more information on http://blog.serverfault.com. However we do still use HAProxy and a heartbeat virtual IP. The load balancers are behind a firewall and there is no load balancing between the two load balancers -- just failover. So traffic gets sent to the virtual IP, should the first load balancer fail the second box will pick up the virtual IP.

Currently resources are very low on load balancing machines and I haven't really looked into distributing the load across both of them yet.

4
  • Thanks for the quick response. Wow so 100% of the traffic for so.com is going to a single HAProxy? Just confirming. Also please see this part of my question 'Does client traffic get sent to a single shared IP address (the "virtual") and through the magic of changing the mac address associated with the IP address, traffic goes to one of the HAProxy’s until that box fails or is taken down?' Thanks!
    – Matthew
    Jan 31, 2011 at 18:08
  • 3
    Updated the question. Yup, all of StackOverflow, SF, SO, and the rest of the StackExchange network goes through a single haproxy instance. CPU usage on that machine average less than 1% and never really goes above 6%. The only exception is chat which is still hosted out of OR. Jan 31, 2011 at 18:12
  • I can't remember the VIP implementation of heartbeat -- I would ask that as a question on SF proper. I think the IP probably just has the MAC address of the secondary server after a failover and hosts arp tables and mac address tables on the switch are updated accordingly but not sure. Jan 31, 2011 at 18:18
  • The IPAddr script does an ARP broadcast to update the ARP tables after bringing the alias up. Might vary slightly if you use hb 2.x.
    – Warner
    Jan 31, 2011 at 20:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .