]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: session: introduce embryonic sessions
authorWilly Tarreau <wtarreau@exceliance.fr>
Fri, 31 Aug 2012 14:01:23 +0000 (16:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 3 Sep 2012 18:47:35 +0000 (20:47 +0200)
commit2542b53b19d5094149a5cd2c90e85703eea93e2a
tree61c61bc3ea74de8911307b4b6e27c7b1a7238517
parent15678efc45df458db0bf7a27dee5d4db4825ced3
MAJOR: session: introduce embryonic sessions

When an incoming connection request is accepted, a connection
structure is needed to store its state. However we don't want to
fully initialize a session until the data layer is about to be
ready.

As long as the connection is physically stored into the session,
it's not easy to split both allocations.

As such, we only initialize the minimum requirements of a session,
which results in what we call an embryonic session. Then once the
data layer is ready, we can complete the function's initialization.

Doing so avoids buffers allocation and ensures that a session only
sees ready connections.

The frontend's client timeout is used as the handshake timeout. It
is likely that another timeout will be used in the future.
include/proto/session.h
include/types/connection.h
include/types/session.h
src/connection.c
src/session.c