]> git.ipfire.org Git - thirdparty/squid.git/commit - src/pconn.cc
pconn_lifetime
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 24 Dec 2014 09:20:52 +0000 (11:20 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 24 Dec 2014 09:20:52 +0000 (11:20 +0200)
commitc5c06f021dc296405b3f0f21f5998f09aa27ca1c
treeae3a96fe8be3c5497aa688fa6cd91f5a23c5141f
parent55d7d5e968f2f089574e776f17918712c0877c05
pconn_lifetime

This patch add a new configuration option the 'pconn_lifetime' to allow users
set the desired maximum lifetime of a persistent connection.

When set, Squid will close a now-idle persistent connection that
exceeded configured lifetime instead of moving the connection into
the idle connection pool (or equivalent). No effect on ongoing/active
transactions. Connection lifetime is the time period from the
connection acceptance or opening time until "now".

This limit is useful in environments with long-lived connections
where Squid configuration or environmental factors change during a
single connection lifetime. If unrestricted, some connections may
last for hours and even days, ignoring those changes that should
have affected their behavior or their existence.

This option has the following behaviour when pipelined requests tunneled
to a connection where its lifetime expired:

 1. finish interpreting the Nth request
    check whether pconn_lifetime has expired
 2. if pconn_lifetime has expired, then stop further reading and
    do not interpret any already read raw bytes of the N+1st request
 3. otherwise, read and interpret read raw bytes of the N+1st request
    and go to #1.

This is a Measurement Factory project
src/SquidConfig.h
src/cf.data.pre
src/client_side.cc
src/client_side_reply.cc
src/comm/Connection.cc
src/comm/Connection.h
src/pconn.cc