Hi,

On Sun, Oct 05, 2014 at 10:05:25PM +0200, Pavlos Parissis wrote:
> Hi,
> 
> The doc is a bit confusing, at least to me. The former is about TCP
> connections and the latter for HTTP requests, am I completely wrong?

Not completely. Originally, we only had sessions and requests. But now
we support lower layers below sessions which are "connections". The
connection is much smaller than a session, and is the part associated
with a socket. The session is initiated once all handshakes etc (think
about SSL for example) are complete on the connection. The session
carries all the context needed to maintain a communication between the
two sides.

So in practice, you have the following :

  - a connection is initiated immediately upon accept()

  - a session is instanciated from this connection after all "tcp-request
    connection" rules are complete and any handshake is complete (eg:
    accept-proxy, SSL)

  - multiple requests can be instantiated once at a time on top of a
    session, when the session works in HTTP mode and when keep-alive
    is in use with the client.

Thus, you always have at least as many connections as sessions, and the
difference between the two reflects the number of failed handshakes or
blocked connections in "tcp-request connection" rules. And if you have
less requests than sessions, it means that some sessions were killed
before instantiating requests (eg: "tcp-request content" rules). And
if you have more requests than sessions, it's because some clients use
HTTP keep-alive and pass multiple requests over one session.

I hope this clarifies the situation a bit.

Willy


Reply via email to