Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you were getting confused by varnish's response buffering. Let's say the fastest your backend can respond with a 100k page for a given request is 10 seconds, sending 10k each second. Without varnish in your stack, the client connection gets tunneled directly to the back end, and the browser starts receiving data in 1 second (the first 10k, and starts to parse, render, follow <code>&lt;link&gt;</code> tags, etc). </p> <p>With varnish in your stack, it waits for the back end to send the entire page before sending the first byte to the client. So the client has to wait 10 seconds until it can start rendering the page, following <code>&lt;link&gt;</code> tags, etc. Believe it or not, this is a good thing for two main reasons. One, if that response is cacheable, the next client won't have to wait 10 seconds for the back end to generate the response, varnish will serve it quite quickly (ms, not s). If your hit rate is high, which you should optimize for, the initial cost of having to wait for the first byte of the response pays many dividends in future cache hits. Two, let's say a mobile phone on a spotty cell signal requests that same 100k page, but it can't download the page as fast as the backend can generate it, it needs a full minute to receive the 100k page. With varnish in place, apache doesn't have to waste a connection and thread for an entire minute (mostly idle, mind you) while it slowly transmits the data to the client. It sends the data as fast as it can to varnish, and then moves on to the next request while varnish sends the data slowly to the client.</p> <p>For requests that are known not to be cacheable, you can configure varnish via VCL, if you desire, to <code>return (pipe)</code> which will result in no response buffering. It will send data directly from your back end to the client as soon as it receives it. But in the default.vcl pipe is not used.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload