Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8613015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:46:07+00:00 2026-06-12T04:46:07+00:00

Varnish Version 3 has some objects for different operations. For example, pass is used

  • 0

Varnish Version 3 has some objects for different operations.

For example, pass is used when it has to retrieve data from backend, and it uses hit when it finds requesting content in cache.

But I cant understand usage of hit-for-pass. When does Varnish use it? I haven’t found any useful material on the web which makes it clear.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:46:08+00:00Added an answer on June 12, 2026 at 4:46 am

    A hit_for_pass object is made to optimize the fetch procedure against a backend server.

    For ordinary cache misses, Varnish will queue all clients requesting the same cache object and send a single request to the backend. This is usually quickest, letting the backend work on a single request instead of swamping it with n requests at the same time.

    Remember that some backends use a lot of time preparing an object; 10 seconds is not uncommon. If this is the front page HTML and you have 3000 req/s against it, sending just one backend request makes a lot of sense.

    The issue arises when after Varnish has fetched the object it sees that it can’t be cached. Reasons for this can be that the backend sends “Cache-Control: max-age=0”, or (more often) a Set-Cookie header. In this case you have somewhere between 3,000 and 30,000 clients (3k req/s * 10sec) sitting idle in queue, and for each of these clients the same slow one-at-a-time backend request must complete to serve them. This will ruin your site response time.

    So Varnish saves the decision that this request cannot be cached by creating a hit_for_pass object.

    On the next request for the same URL, the cache lookup will return a hit_for_pass object. This signals that multiple fetches may be done at the same time. Your backend might not be too happy about it, but at least Varnish isn’t queuing the clients for no reason.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My visitors get a cached version of the page from Varnish. I would like
I have Varnish running on IP Foo with IP Bar as default backend. I
I'm installing Varnish following Varnish 3.0.2 documentation /etc/varnish/default.vcl backend default { .host = 127.0.0.1;
We use varnish as our load balancer (among other things) but we get some
Can I configure Varnish in such a way it shows the original page from
I would like to use Varnish-cache to cache some of the dependancies of my
I've had 2 sysadmins from 2 large hosting organizations tell me that Varnish will
We're currently running a site with: Pressflow 5.23.50 Varnish 2.1.4 I suspect some of
I've just setup varnish and i've done some tests on port 8080 before switching
Can Varnish distribute its cache to multiple machines? For example, if the amount of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.