varnish not bundling simultaneous requests?
Rich Rauenzahn
rrauenza at gmail.com
Fri Apr 29 16:20:47 CEST 2011
On Fri, Apr 29, 2011 at 1:31 AM, Kristian Lyngstol
<kristian at varnish-software.com> wrote:
> On Thu, Apr 28, 2011 at 06:34:11PM -0700, Rich Rauenzahn wrote:
>> I just ran a test where I requested (via curl) the same resource in
>> parallel from varnish, and I got multiple backend requests (I checked
>> my apache log).
>>
>> Could it be that there is a small race condition that is possible to
>> hit such that two backend requests get initiated if they are close
>> enough in time? (my test was a curl ... & curl ... & -- if I do it by
>> hand, which is slower, they seem to get bundled.)
>
> That sounds unlikely. It's more likely that the object isn't being
> cached at all. Can you provide varnishlog output from a test like that?
Sure... although I've had no luck so far getting output from it. On the other
hand I have two versions of varnish installed (the latest official release,
and the latest git) -- perhaps I was using the wrong varnishlog executable.
> Also, setting obj.ttl to 1d in vcl_hit means never expiring objects, as
> you reset the ttl every time they are accessed... So the only way they
> are expired is if they aren't requested for a day.
Ah, yes -- thanks -- I see what you mean. I need to study the
vcl_* subs in more detail.
What I want is to have squid behavior as much as possible -- always
check if-modified-since at the end of the ttl and never throw the object out
due to age (rather than LRU) unless it has changed on the backend (which should
rarely happen in our environment) or unless it has been deleted
(this is more likely in our environment.)
quick unrelated question -- I saw the RFC for streaming fetch/pass (or
something
named like that) -- is that implemented yet, or does the client still
need to wait for
the object to get cached?
Rich
More information about the varnish-misc
mailing list