On 4/20/22 09:06, Amos Jeffries wrote:
On 21/04/22 00:24, Garbacik, Joe wrote:
When squid connects to an upstream cache peer, does it create a new
tcp session between the peers for each request from a client on the
original squid server or does it maintain the session between the
peers for a period of time to allow other requests via the
established session?
The answer to your questions depend on a lot of things...
Squid supports HTTP persistence and pipeline to both clients and peers
independently by default. For details on how those work see
https://datatracker.ietf.org/doc/html/rfc7230#section-6.3
https://datatracker.ietf.org/doc/html/rfc7230#section-6.3.2
Clarification: Squid does _not_ support HTTP request pipelining on
Squid-to-server connections -- at most one concurrent HTTP request may
be using a given Squid-to-server connection. By default, Squid also does
not pipeline HTTP requests on client-to-Squid connections (the
pipeline_prefetch directive controls that behavior).
Specifically, use of the features requires that;
* the peer also supports them, and
* your squid.conf has not disabled them, and
* your squid.conf has not enabled features that require them to be
disabled, and
* the traffic has not forbidden them, and
* the the messages going through allow them.
In summary, yes, Squid will reuse an idle persistent HTTP connection to
an origin server or cache_peer in order to forward a request received
from another client _if_ various factors (see Amos' list) do not
prohibit such reuse (and persistency itself).
HTH,
Alex.
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users