Muxes are responsible to release connections once they are inactive and won't be reusable. In QUIC mux, such connections are detected via qcc_is_dead(). The first precondition is that there is no more upper streams attached. This was accounted via QCC <nb_sc> counter. A special characteristic of QCS instances is that they can be in detached state : upper stream has been removed but there is still data to emit. Such QCS were not taken into account in qcc_is_dead(), so a connection could be freed with some remaining data not yet emitted. It is also not possible for QUIC MUX to simply look at the QCS tree to determine if the connection is inactive. Indeed, some streams are opened for protocol internal usage. This is the case for example with HTTP/3 unidirectional control stream or QPACK encoder/decoder streams. These streams are never closed. In the end, only requests streams should be taken into account for the connection activity. This patch improves the situation by reworking <nb_hreq> QCC counter. Previously, it served for http-request timeout implementation. However, this timeout only relies on <opening_list> now. Thus, <nb_hreq> scope is changed : it is now incremented via qcs_wait_http_req(), used by app protocol layer once a request stream is identified. Decrement is performed on qcs_free(), so this guarantees that a connection cannot be freed anymore if request streams still exists, unless if inactivity timeout fires. As such, <nb_hreq> now supersedes <nb_sc> entirely, so the qcc_is_dead() can now relies on the former. Along with this change, qcc_timeout_task() must be updated. Call to qcc_is_dead() was unnecessary prior to this patch as timeout handling was only active when no upper streams were attached. When tested, both <nb_sc> and QCC <task> were already null, so a connection was always released on timeout, as expected. With qcc_is_dead() now checking <nb_hreq> instead, this is not always the case anymore. In fact, this check is unnecessary as inactivity timeout serves precisely to free a stucked connection with remaining data to emit. This patch also has some impact on http-keep-alive timeout. Previously, this timeout could be armed if only detached streams remained. Now, it is only applicable if all QCS request instances are closed and freed. Thus, qcc_reset_idle_start() is now closed directly on qcs_free(). Ideally this should be backported up to 2.6, or at least 2.8 as QUIC experimental status was removed there. |
||
|---|---|---|
| .github | ||
| addons | ||
| admin | ||
| dev | ||
| doc | ||
| examples | ||
| include | ||
| reg-tests | ||
| scripts | ||
| src | ||
| tests | ||
| .cirrus.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .travis.yml | ||
| BRANCHES | ||
| BSDmakefile | ||
| CHANGELOG | ||
| CONTRIBUTING | ||
| INSTALL | ||
| LICENSE | ||
| MAINTAINERS | ||
| Makefile | ||
| README.md | ||
| SUBVERS | ||
| VERDATE | ||
| VERSION | ||
HAProxy
HAProxy is a free, very fast and reliable reverse-proxy offering high availability, load balancing, and proxying for TCP and HTTP-based applications.
Installation
The INSTALL file describes how to build HAProxy. A list of packages is also available on the wiki.
Getting help
The discourse and the mailing-list are available for questions or configuration assistance. You can also use the slack or IRC channel. Please don't use the issue tracker for these.
The issue tracker is only for bug reports or feature requests.
Documentation
The HAProxy documentation has been split into a number of different files for ease of use. It is available in text format as well as HTML. The wiki is also meant to replace the old architecture guide.
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)
License
HAProxy is licensed under GPL 2 or any later version, the headers under LGPL 2.1. See the LICENSE file for a more detailed explanation.
