]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: server: define pool-conn-name keyword
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 May 2024 09:14:13 +0000 (11:14 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 24 May 2024 12:36:31 +0000 (14:36 +0200)
commitbe4f89f2b293e11a40c21e91f009aae105e06278
tree3549d2e7ce7a5d332adf6eba4240dec0ee3b8658
parent91001422b466ac8205acde1f94b7a6c4df536c49
MINOR: server: define pool-conn-name keyword

Define a new server keyword pool-conn-name. The purpose of this keyword
will be to identify connections inside the idle connections pool,
replacing SNI in case SSL is not wanted.

This keyword uses a sample expression argument. It thus can reuse
existing function parse_srv_expr() for parsing. In the future, it may be
necessary to define a keyword variant which uses a logformat for
extensability.

This patch only implement parsing. Argument is stored inside new server
field <pool_conn_name> and expression is generated in
_srv_parse_finalize() into <pool_conn_name_expr>.

If pool-conn-name is not set but SNI is, the latter is reused
automatically as pool-conn-name via _srv_parse_finalize(). This ensures
current reuse behavior remains compatible and idle connection reuse will
not mix connections with different SNIs by mistake.

Main usage will be for rhttp when SSL is not wanted between the two
haproxy instances. Previously, it was possible to use "sni" keyword even
without SSL on a server line which have a similar effect. However,
having a dedicated "pool-conn-name" keyword is deemed clearer. Besides,
it would allow for more complex configuration where pool-conn-name and
SNI are use in parallel with different values.
doc/configuration.txt
include/haproxy/server-t.h
src/http_client.c
src/server.c
src/tcp_act.c