]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stats: report the number of times the global maxconn was reached
authorWilly Tarreau <w@1wt.eu>
Thu, 11 May 2023 11:51:31 +0000 (13:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 May 2023 11:51:31 +0000 (13:51 +0200)
commit9615102b01b45ab9e643b184fa2bb3d1e175ea11
treeb22d0231659e0a824166b35ba0c930c831d6fd5d
parent3c4a297d2b5d4856c3e5d102c3d98548de6d8d8c
MINOR: stats: report the number of times the global maxconn was reached

As discussed a few times over the years, it's quite difficult to know
how often we stop accepting connections because the global maxconn was
reached. This is not easy to know because when we reach the limit we
stop accepting but we don't know if incoming connections are pending,
so it's not possible to know how many were delayed just because of this.
However, an interesting equivalent metric consist in counting the number
of times an accepted incoming connection resulted in the limit being
reached. I.e. "we've accepted the last one for now". That doesn't imply
any other one got delayed but it's a factual indicator that something
might have been delayed. And by counting the number of such events, it
becomes easier to know whether some limits need to be adjusted because
they're reached often, or if it's exceptionally rare.

The metric is reported as a counter in show info and on the stats page
in the info section right next to "maxconn".
include/haproxy/listener.h
include/haproxy/stats-t.h
src/listener.c
src/stats.c