[squid-dev] About squid behaviour in slow network

Amos Jeffries squid3 at treenet.co.nz
Sat Jan 24 13:45:18 UTC 2015


On 25/01/2015 2:32 a.m., arthurtumanyan at yahoo.com wrote:
> On Saturday, January 24, 2015 09:23:36 PM Amos Jeffries wrote:
>> Mostly by relying on TCP buffering and obeying the HTTP mandate that
>> client and server connections are independent.
>>
>> Depends on several things...
>> * some of them configurable (read_ahead_gap, min/max buffer and message
>> sizes, collapsed_forwarding, pipeline_prefetch, etc),
>> * some of them outside Squid (TCP buffer and read/write block sizes, etc)
>> * cacheability / store involvement with the reply object
>>
>>
>> For what version of Squid?
>>
>> NP: We are in the process of changing those particular parts of the code
>> for the Parser-NG project in 3.HEAD/trunk so the answer there differs
>> from the stables.
> 
> I was looking in the last stable, but the version does not matter for me. I'm 
> interested in theoretical part for now. i try to understand send/recv 
> mechanisms using in slow networks.

Okay, the mechanism varies all over Squid at present.

The one thing they all have in common in the stables is comm_read().
Look for that function being used in http.cc (server connections),
tunnel.cc (CONNECT traffic) and client_side*.cc (client connections).
The logic leading up to it is what ensures the buffer has enough free
space to do the comm_read call.

Amos


More information about the squid-dev mailing list