Re: question about persistent connection between caches

From: Duane Wessels <wessels@dont-contact.us>
Date: Thu, 24 Nov 2005 09:52:17 -0700 (MST)

On Thu, 24 Nov 2005, fantacywall@hotmail.com wrote:

> when i read the two lines below(line 1098 in http.c),i have a question about
> persistent connection between caches
> else if (p->stats.n_keepalives_sent < 10)
> httpState->flags.keepalive = 1;
> else if ((double) p->stats.n_keepalives_recv / (double)
> p->stats.n_keepalives_sent > 0.50)
> httpState->flags.keepalive = 1;
>
> why we have to keep the rate about n_keepalives_recv and
> stats.n_keepalives_sent .and why we need to keep n_keepalives_sent < 10?
> someone can tell me the reason? thanks

I forget the exact original motivation, but the idea is to figure
out if the other proxy correctly supports persistent connections.
If it does support them, then the keepalive ratio should be greater
than 50%.

If it does not support them, then Squid should not bother to try
using persistent connections.

The "10" is there so that Squid tries to use persistent connections
at least 10 times. We want a decent sample size before calculating
the ratio.

DW
Received on Thu Nov 24 2005 - 09:52:18 MST

This archive was generated by hypermail pre-2.1.9 : Thu Dec 01 2005 - 12:00:16 MST