The performance is really good now, thanks to the great responses on this list. I also increased the nginx's keepalive to 1m as Pavlos suggested.
# ab -k -n 1000000 -c 500 http://<haproxy>:80/64 Requests per second: 181623.35 [#/sec] (mean) Transfer rate: 53414.40 [Kbytes/sec] received (both values are as good as doing direct backend) # ab -k -n 100000 -c 500 http://<haproxy>:80/256K Requests per second: 4191.92 [#/sec] (mean) Transfer rate: 1074111.06 [Kbytes/sec] received (4.8% less for both numbers as compared to direct backend) If it is helpful, I can post the various parameters that were set (system level + haproxy + backend) if it will be useful for someone else in future. Thanks, - Krishna Kumar On Thu, May 7, 2015 at 8:31 AM, Baptiste <bed...@gmail.com> wrote: > > Le 7 mai 2015 04:24, "Krishna Kumar (Engineering)" < > krishna...@flipkart.com> a écrit : > > > > I found the source of the problem. One of the backends was being shared > > with another person who was testing iptables rules/tunnel setups, and > > that might have caused some connection drops. I have now removed that > > backend from my setup and use dedicated systems, after which the original > > configuration without specifying source port is working, no connection > flaps > > now. > > > > Thanks, > > - Krishna Kumar > > How much performance do you have now? > > Baptiste >