Hi, On Tue, 4 Oct 2016 10:55:08 +0530 Rajesh Mahajan <rajeshmahaja...@gmail.com> wrote:
> Please find attached configuration files for both nginx and haproxy. > Could you please share your results wrt to nginx and tell me which > http benchmark tool you are using for testing. From what I see you did not specify maxconn limit in defaults nor frontend sections, so effectively you will be limited to 2000 concurrent connections on frontend (we run into this problem during our tests). Due to the fact that we needed to test our setup up to 10Gb/s we had to build our own tools as currently available scaled "only" up to ~2-3Gb/s. We used multi-threaded tools like wrk2, httpress (with some patches) and weighttp as a starting point and build scripts around them to aggregate data from multiple machines running those. I started to prefer httpress (with some patches) as it allows to test keepalive/non-keepalive connections (as opposite to wrk2). On the other hand wrk2 has some nice Lua scripting capabilities which might be useful in certain scenarios like replaying traffic. Unfortunately right now I cannot find any "trustworthy" results we have obtained while comparing HAProxy and nginx. During our testing we discovered that Nginx does not scale linearly when increasing amount of workers - it was even worse: increasing amount of workers degraded performance. Later this problem was mitigated, but not completely resolved resulting up to 20% performance degradation with 24 cores/workers running. Proper fix would require significant architectural changes of Nginx, so we were left only with a workaround. Overall HAProxy and nginx were comparable (HAProxy still faster), but due to above bug nginx was visibly behind when number of workers increased. When we decided to use HAProxy our focus moved towards tuning HAProxy rather than comparing HAProxy and nginx. We have some data on our Wiki from time when we compared HAProxy and nginx, but setup and performance isn't nowhere near what we currently use/get (Those benchmarks did not use our distributed benchmark infrastructure to obtain results, so effectively they were limited to 1Gb/s of traffic due to network interface throughput). Regards, Marcin