I am running a http webserver that is connected to a backend database. Now if a client generates 100 threads and tries to contact that webserver through a loadbalancer, I get around 32ms delay. But with the same setup , instead of one webserver , if i have 2 webservers (connected to the same database though) .The load balancer balances the load between these 2 webservers using round robin algorithm. Now I run the same client that generates the same 100 threads but in this case the delay is nearly 55ms. i thought more webservers means better performance but it is exactly the opposite. Can someone help me understand this situation? Thanks !
EDIT: Info regarding load balancer - I am using haproxy load balancer.
This is the config file :
global maxconn 4096 pidfile /var/run/haproxy.pid daemon defaults mode http retries 3 option redispatch maxconn 2000 contimeout 5000 clitimeout 50000 srvtimeout 50000 listen GALAXY 10.76.2.15:80 mode http cookie GALAXY insert balance roundrobin option httpclose option forwardfor option nolinger stats enable stats auth myuser:mypass server EARTH 10.76.2.107:80 cookie GALAXY_SERVER_01 check
Even in the normal case, I am reaching the single webserver through the load balancer. I dont know why I am getting additional delay for adding another webserver. -Sethu