On Fri, Nov 10, 2017 at 07:05:39PM +0200, Nick Dimov wrote:
> For example, I use a backend like this
> 
> > backend b_http_hosts
> >     mode http
> >
> >     server s_web1  server:80 maxconn 10 check
> 
> And I'm testing with wrk -c 20 and checking the established connections
> from haproxy to apache (with netstat), and that number is always equal
> to what i specify in -c param for wrk.
> 
> It's worth mentioning that it respects the number of simultaneous
> requests (i checked that specifically) but is this behavior normal? Is
> it ok that it creates more connections than specified in maxconn ?

Yes, it's expected as soon as you have enabled keep-alive on the backend.
Counting the number of idle connections in the limit would be counter-
productive and even prevent new requests from being served while some
idle connections remain. In the end, since most servers have accept queues
and dispatch requests to threads, it makes more sense to only count what
really matters, ie outstanding requests. However if you enable connection
sharing using "http-reuse", you'll see that the number of outstanding
requests is much closer to the number of connections.

Regards
Willy

Reply via email to