Hi,
I have a 3 server architecture, a HAproxy that sends balanced traffic to
2 Nginx servers.
I noticed that if I run "ab -n 1000 -c 100" directly on the Nginx server
I get response times between 40 and 80ms
If I run the same test via HAproxy I receive results between 120 and
4000ms. And this is I get lucky as I can even wait for 30seconds to get
all the replies back from HAproxy server.
I've been struggling to tune the kernel params and other things for days
now but I still cannot make this work properly.
I noticed that on HAproxy server I have all the time at least 20K
TIME_WAIT connections ( netstat -a -n|grep TIME_WAIT|wc -l)
while on the Nginx servers that number is about 600 for each one.
I suspect that is because of this that the service doesn't always
perform well but I would surely appreciate any advice from you.
Also, let me know what kernel params or configuration files you might
need me to share with you in order to get a better understanding.
Thank you,
Alex