I have 2 apache2 servers running in the back end and have a haproxy between them and the clients. If I bench tested anyone of these apache2 severs with ab i get north of a 1500TPS however when I bench test the HAproxy I get less than this value. Which doesn't make sense.
I am using simple round robin algorithm for the balancing and I have my maxconn set at 8000 for good measure.
What i expected was a tps approaching the combined tps of each apache2 node(2800TPS). Instead I got a value less than any one of the two apache2 nodes. What could be the cause?
The bench test i did
ab -t 60 -c 400 haproxyIP:1234
HEre is the HAproxy config very standard but should accomplish what i require.
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
maxconn 8000
user haproxy
group haproxy
daemon
defaults
log global
mode http
option httplog
option dontlognull
retries 3
maxconn 8000
contimeout 5000
clitimeout 50000
srvtimeout 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
listen public :1234
stats enable
stats auth username:userpassword
balance leastconn
server web-1 127.0.0.1:xxxx check
server web-2 xx.xx.xx.xx:xxxx check