]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: check/backend: support conn reuse with SNI
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 2 Apr 2025 15:48:23 +0000 (17:48 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 3 Apr 2025 15:19:07 +0000 (17:19 +0200)
commit43367f94f15ba020d34014b044e0dd7d6662fa78
treef0a1cff7beb9d08ec7f0f23ddb5a297f0f57df5d
parent28116e307a1e9af321521dedd05faa5a7cb2f53c
MINOR: check/backend: support conn reuse with SNI

Support for connection reuse during server checks was implemented
recently. This is activated with the server keyword check-reuse-pool.

Similarly to stream processing via connect_backend(), a connection hash
is calculated when trying to perform reuse for checks. This is necessary
to retrieve for a connection which shares the check connect parameters.
However, idle connections can additionnally be tagged using a
pool-conn-name or SNI under connect_backend(). Check reuse does not test
these values, which prevent to retrieve a matching connection.

Improve this by using "check-sni" value as idle connection hash input
for check reuse. be_calculate_conn_hash() API has been adjusted so that
name value can be passed as input, both when using streams or checks.

Even with the current patch, there is still some scenarii which could
not be covered for checks connection reuse. most notably, when using
dynamic pool-conn-name/SNI value. It is however at least sufficient to
cover simpler cases.
include/haproxy/backend.h
src/backend.c
src/tcpcheck.c