Hi Willy, Thanks for the response, yes I think that clarifies the rates for me.
I have another question you probably could help me with: For ongoing connections (not total), the stats page shows a tooltip stating * Current Active Connections * Current Used Connections * Current Idle Connections (broken down into safe and unsafe idle connections) What is the difference between active and used connections? Which number combined with idle connections reflects the current number of open connections on the OS level? (i.e. using resources like fds, buffers, ports) My ultimate goal is to answer the question “how loaded is this machine?” vs. a limit of open connections. What’s the difference between safe and unsafe idle connections? Is it related to the http-reuse directive, e.g. private vs. non-private reusable connections? Thank you so much, D From: Willy Tarreau <w...@1wt.eu> Date: Saturday, 20. November 2021 at 10:01 To: Froehlich, Dominik <dominik.froehl...@sap.com> Cc: haproxy@formilux.org <haproxy@formilux.org> Subject: Re: FW: Question regarding backend connection rates Hi Dominik, On Fri, Nov 19, 2021 at 08:42:40AM +0000, Froehlich, Dominik wrote: > However, the number of "current sessions" at the backend is almost 0 all the > time (between 0 and 5, the number of servers). When I look at the "total > sessions" at the backend after the test, it tells me that 99% of connections > have been reused. So in my book, when a connection is reused no new > connection needs to be opened, that's why I am so stumped about the backend > session rate. If 99% of sessions are reused, why is the rate of new sessions > not 0? This is because the "sessions" counter indicates the number of sessions that used this backend. Sessions are idle in the frontend waiting for a new request, and once the request is analysed by the frontend rules, it's routed to a backend, at which point the counter is incremented. As such, in a backend you'll essentially see as many sessions as requests. The "new connections" counter, that was added after keep-alive support was introduced many years ago will, however, indicate the real number of new connections that had to be established to servers. And this is the same for each "server" line by the way. I've sometimes been wondering whether it could make sense to change the "sessions/total" column in the stats page to show the number of new connections instead, but it seems to me that it would not bring much value and will only result in causing confusion to existing users. Given that in both cases one will have to hover on the field to get the details, it would not help I guess. Hoping this helps, Willy