haproxy

ここ。安定版は、haproxy-1.2.17。configureがないけど、kernel 2.4系がdefaultなので、普通にmake, make install。他のkernelの場合は、Makefileを観ればパラメータはわかる。
cp haproxy /usr/local/bin/ とかして、
/usr/local/bin/haproxy -f /etc/haproxy/haproxy.cfg で起動。
haproxy.cfgは、以下の様になる。httpは、mode tcp, persistで何とかsession処理ができるが、httpsは、mode httpではssl対応できないので、mode tcpになるが、こうなるとsessionはダメなのさ。
# this config needs haproxy-1.1.28 or haproxy-1.2.1
global
log 127.0.0.1 local0
maxconn 32000
ulimit-n 65536
uid 99
gid 99
#daemon
defaults
log global
mode http
option httplog
option dontlognull
retries 3
redispatch
maxconn 2000
contimeout 60000
clitimeout 60000
srvtimeout 60000
listen http_proxy :80
mode http
balance source
# balance roundrobin
cookie SERVERID
server web01 192.168.1.100:80 cookie server01 check inter 60000 rise 1 fall 2
server web02 192.168.1.103:80 cookie server02 check inter 60000 rise 1 fall 2
option persist
option forwardfor
listen https_proxy :443
mode tcp
balance source
cookie SERVERID
server web01 192.168.1.100:443 cookie server01
server web02 192.168.1.103:443 cookie server02
option persist
option forwardfor