When varnish cache is empty and I got X client requests for the same asset - Varnish gathers the clients and issues 1 backend fetch.

Do you know if there's possibility to control how many requests are held until fetch (or time window size)? - I would like to have backend fetch more frequently so the clients would wait shorter time.

When I test with return(pass) - I got nice flow, no long times for the client, but I got no caching - and because caching is set by backend - I would like to stay with "return(lookup)" which enables antidogpile effect - good but sometimes bad (because of holding reqs...)

EDIT: Kind of solution in my comments :)

  • I think that I will try to solve my issue producing hit_for pass for some period when I got miss. – Arek B. Oct 15 '15 at 9:13
  • I think I got what I wanted - "disabling antidogpile" when queuing has no sense at all - hit for pass worked. Still - if I could control this I would be glad. – Arek B. Oct 15 '15 at 9:39

As far as I know, the request to backend is fired immediately. If more requests for the same resource arrive before the first request is satisfied, those are served from the backend request in flight.

If you feel your cache misses are slow, then it is most probably because your backend is slow, or something else is misconfigured.

  • When I observe times (logged by nginx) on backend - they are very low for all the time - small part of second, but on the side of clients after 300-400 requests times for the client rise up to few seconds... This doesn't happen when I bypass cache lookup. – Arek B. Oct 15 '15 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.