mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 07:11:20 +02:00
The idle connection delay calculation before a request is a bit tricky, especially for multiplexed protocols. It changed between 2.3 and 2.4 by the integration of the idle delay inside the session itself with these commits: dd78921c6 ("MINOR: logs: Use session idle duration when no stream is provided") 7a6c51324 ("MINOR: stream: Always get idle duration from the session") and by then it was only set by the H1 mux. But over multiple changes, what used to be a zero idle delay + a request delay for H2 became a bit odd, with the idle time slipping into the request time measurement. The effect is that, as reported in GH issue #1395, some H2 request times look huge. This patch introduces the calculation of the session's idle time on the H2 mux before creating the stream. This is made possible because the stream_new() code immediately copies this value into the stream for use at log time. Thus we don't care about changing something that will be touched by every single request. The idle time is calculated as documented, i.e. the delay from the previous request to the current one. This also means that when a single stream is present on a connection, a part of the server's response time may appear in the %Ti measurement, but this reflects the reality since nothing would prevent the client from using the connection to fetch more objects. In addition this shows how long it takes a client to find references to objects in an HTML page and start to fetch them. A different approach could have consisted in counting from the last time the connection was left without any request (i.e. really idle), but this would at least require a documentation change and it's not certain this would provide a more useful information. Thanks to Bart Butler and Luke Seelenbinder for reporting enough elements to diagnose this issue. This should be backported to 2.4.
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)
Description
Languages
C
98.1%
Shell
0.8%
Makefile
0.5%
Lua
0.2%
Python
0.2%