Just trying out HAProxy in a new data center for http load balancing.
I’m not expecting a lot of site traffic initially, but using a load balancer from Day One lets you get all the data center servers assigned, and allows sysadmins to do maintenance whenever convenient.
I was looking around at similar Open Source software, and what caught my attention about HAProxy is that Willy “obsessed with reliability” Tarreau is the author.
HAProxy has several nice features, including speed (fast enough for 10 GB connections at up to 132,000 connections per second), and epoll, cookie, multicore, chroot support and much more.
There are ports available for most Unix systems, including linux, FreeBSD and Solaris.
Here is the build script I wrote for a Dell 1950 (after installing libpcre):
#!/bin/bash make clean make TARGET=linux26 USE_PCRE=1 ARCH=x86_64 # no make test make install
You can do a graceful restart of HAProxy running on multiple cores by adding this to your startup script (the tr is needed to handle when nbproc > 1):
graceful() {
/usr/local/sbin/haproxy -c -q -f /etc/haproxy.cfg
if [ $? -ne 0 ]; then
echo "Errors found in configuration file, check it with 'haproxy check'."
return 1
fi
/usr/local/sbin/haproxy -V -f /etc/haproxy.cfg -p /var/run/haproxy.pid -sf
`tr '\n' ' ' < /var/run/haproxy.pid`
}
I talked to somebody using it on EC2, so HAProxy is 'cloud-ready.'
HAProxy Documentation
wht: HAproxy - Quick and Dirty HTTP Load balancing Tutorial on Redhat/Centos
Session Based Load Balancing with HAproxy
Installing haproxy load balancing for http and https
tito: Zero-Downtime Restarts with HAProxy
Building an easy and scalable load-balanced high-availability web-hosting solution. Part One : The front.
How To Tell Apache To Not Log Certain Requests In Its Access Log
Pricing for Zeus software on Amazon EC2
microsoft.com: Network Load Balancing Technical Overview
loadbalancer.org: FAQ
Tenereillo.com: Why DNS Based Global Server Load Balancing (GSLB) Doesn't Work (2005)
davew: Thoughts on Global Server Load Balancing
ksalchow: Shame on GSLB? Shame on Me?
Vegan Load Balancing Mailing List
HATop: Interactive ncurses client for HAProxy


