nginx/src
Vladimir Homutov af7137c88a Sticky: added the "learn" mode.
In this mode, nginx "learns" which client uses which proxied server by
analyzing headers of client requests and proxied server responses.

For example, a proxied server may start sessions by issuing the "Set-Cookie"
header field to set cookie 'sid' and returning clients will bring the cookie
with the same name.

The following configuration may be used to handle this case:

upstream u1 {
    server 127.0.0.1:8080;
    server 127.0.0.1:8081;

    sticky learn timeout=10m zone=sess:1m
           create=$upstream_cookie_sid
           lookup=$cookie_sid;
}

Co-authored-by: Ruslan Ermilov <ru@nginx.com>
Co-authored-by: Maxim Dounin <mdounin@mdounin.ru>
2026-03-09 11:08:30 -06:00
..
core Resolver: fixed off-by-one read in ngx_resolver_copy(). 2026-02-23 22:12:32 +04:00
event Upstream: added sticky sessions support for upstreams. 2026-03-09 11:08:30 -06:00
http Sticky: added the "learn" mode. 2026-03-09 11:08:30 -06:00
mail Mail: fixed type overflow in IMAP literal length parser. 2026-03-04 12:08:09 +04:00
misc Cpp test: added stream. 2020-10-13 07:44:09 +03:00
os Win32: fixed C4319 warning with MSVC 2022 x86. 2025-12-24 11:41:43 -07:00
stream Add basic ECH shared-mode via OpenSSL. 2025-12-01 16:33:40 +04:00