]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: server/ssl: maintain an index of the last known valid SSL session
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Aug 2023 09:55:42 +0000 (11:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 31 Aug 2023 06:50:01 +0000 (08:50 +0200)
commit52b260bae45967953c7b12e43ea8f940fc0b6d07
tree9e06a88fd5194b62f7f3a87049ee0fb37f03c09b
parent607041dec36669f8f9ebc917c2d2d65cb1f8b92a
MINOR: server/ssl: maintain an index of the last known valid SSL session

When a thread creates a new session for a server, if none was known yet,
we assign the thread id (hence the reused_sess index) to a shared variable
so that other threads will later be able to find it when they don't have
one yet. For now we only set and clear the pointer upon session creation,
we do not yet pick it.

Note that we could have done it per thread-group, so as to avoid any
cross-thread exchanges, but it's anticipated that this is essentially
used during startup, at a moment where the cost of inter-thread contention
is very low compared to the ability to restart at full speed, which
explains why instead we store a single entry.
include/haproxy/server-t.h
src/ssl_sock.c