[squid-users] simultanous requests: collapsed_forwarding
squid3 at treenet.co.nz
Thu Sep 5 11:00:18 UTC 2019
On 5/09/19 9:52 pm, fansari wrote:
> In our scenario it might/will happen that clients will request the same
> resources simultaneously.
> I ran a test where I start one download with curl and with short delay
> (about 1s) I request the same content by another client.
> 1567673769.781 12123 xxx.xxx.0.1 TCP_MISS/200 15553655 GET
> https://xxx/1.mp4 - HIER_NONE/- video/mp4
> 1567673769.782 13992 xxx.xxx.0.239 TCP_MISS/200 15553655 GET
> https://xxx/1.mp4 - HIER_DIRECT/xxx.xxx.xxx.xxx video/mp4
> From the documentation I found that there is a setting called
> "collapsed_forwarding" which when enabled gives the behaviour we want to
> achieve: let the first request finish with download and then handle the
> others from squid cash.
Not quite, collapsing does not let the first request complete. It starts
sending to all waiting clients as soon as it has response data to
> Since our scenario is not time critical this would be the behaviour we want.
> I am just wondering about one thing: I did not enable this setting (I also
> tried to set it to "off" explicitly) and nevertheless it already behaves
> this way.
> When I interpret the logs correctly the first line indicates a waiting and
> the second shows the download.
I agree, that is what it looks like. The request that finished+logged
first (by 0.001 seconds) took 0.2 seconds less time and did not involve
server contact (HIER_NONE), yet was a "MISS".
> With "collapsed_forwarding on" it behaves in the same way as with "off". To
> me it looks like as if the collapsing is used regardless whether it is
> enabled or not.
Looks to me like you may have found a bug. What exact version of Squid
are you using? (output of "squid -v" please).
If you are using an older Squid can you try the latest v4 and/or
development version to see if the odd behaviour still happens?
More information about the squid-users