I understand that, to get failover on an HAProxy load balancing setup, you need two machines running HAproxy (and route it to several webserver instances). But in this case, say abcd.com, how do we split/route this traffic to 2 IP addresses instead of one? DNS usually resolves domain names to a single IP. How do we do this in using free/cheap tools/services?
If you have so much load that you need to load balance across two haproxy instances then DNS round robin isn't a bad idea (I would be surprised if you have this load though). DNS round robin won't provide good failover though.
At Stack Overflow we use
HAProxy is using about 1-5% CPU on our physical server to balance our traffic which has a single
As Kyle says, heartbeat can be used to make two haproxy servers act as a fail-over pair. However whilst many people do use heartbeat for the job, keepalived is suggest by haproxy's author.
He outlines the details on the haproxy mailing list: http://www.formilux.org/archives/haproxy/1003/3259.html
In brief it goes like this: