httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yle lists <>
Subject [PATCH] mod_proxy sessions
Date Mon, 01 Feb 2010 16:09:47 GMT
Hello all,

I'd like to submit a patch (against 2.2.14) that provides mod_proxy sessions
handling, that is, the ability to bind backend connections (resources) to a

When proxy sessions are enabled, the backend connections are recycled in a
per-session reslist.
The worker uses a hashmap for the acquired sessions, and recycles the
released ones in a reslist.

One can use the sessions to limit, per-client (provided the client can be
identified, by IP or cookie or whatever), the number of connections to the
backend, or to forward statefull over-http-protocols.

The session-id used for a particular request is given by the
"proxy-session-id" note (r->notes), so that the other modules (or a
Rewrite/SetEnv rule) can set it to a client identifier.

Another note ("proxy-session-client", true/false) can be used to bind the
session to the client connection (the connection-id is the session-id), like
mod_proxy 2.0.
I use it to forward client NTLM connections, since the backend connections
will be per-client connection.

For the sessions to be enabled, one can use the worker parameter
SessionsCache=on, and the SessionsCache(S)Max|Min parameters control the
sessions reslist.
The Session(S)Max|Min parameters control the number of connections per

Finally, the patch also includes the functions apr_reslist_create_ex and
apr_reslist_clear which would allow one to clear a reslist with a given
clearor function.
I also included comments in the patch regarding the destructor of the proxy
connection which, IMHO, is broken in httpd-2.2x.

Thank you for your comments,

View raw message