5

I've looked into this before and I swear, though I can't seem to find any documentation to confirm it now, that I read BigPipe only helps performance for authenticated users. (Note: I'm sure I'm just misremembering.)

I think this was due to the fact that anonymous users don't have regular sessions. I'm having trouble tracking this down too, but I did find the following quote:

If you run that chunk of code from the preceding section as an anonymous user, you'll note that the entry gets created in the database with a session ID, as expected. However, upon the next request, if you try to retrieve the value by key, you won't find it. That is because anonymous users do not necessarily have a session started. This means a new session ID is created for each request.

Anyway, my understanding is that the Sessionless BigPipe module fixes any issue with anonymous traffic and ensures that BigPipe will have an impact for those users.

On the Sessionless BigPipe module's project page I see:

This module uses BigPipe to accelerate the first unpersonalized response! And after that first response is sent, the response is stored in Page Cache. Which means that any subsequent requests for that unpersonalized page will be answered very quickly by Page Cache!

Does this mean that when a page is flushed from cache (Page Cache and Varnish) I'll see something like the following chain for subsequent anonymous requests for that same page?

  1. First request: Varnish miss, Drupal Page Cache miss, BigPipe builds the page (This is the one case where BigPipe would have an impact)
  2. Second request: Varnish miss, Drupal Page Cache hit, Drupal Page Cache serves the page
  3. Third and all subsequent requests: Varnish hit, Varnish serves the page

Edit: I now see that this is explicitly outlined further down on the project page:

So, when using Varnish: the first request will be streamed by BigPipe, and not cached in Varnish. The second request will be a Page Cache hit, not a Varnish hit. The third request and all later requests will be Varnish hits.

Additionally, why does the second request bypass Varnish?

5

How does BigPipe have an effect if my traffic is mostly anonymous and behind varnish?

This really depends on the content of the page. Taking away any content depending on the logged-in user there might be no dynamic part left which could have any effect.

Additionally, why does the second request bypass Varnish?

As mentioned in the module description it is not possible the send the cache tag headers after the dynamically generated content has been streamed to Varnish. The Internal Page Cache can be controlled without sending headers because it is cached in the local database.

  • Thanks for this explanation. After reading your response I reread the project page and understand what that's what the section about HTTP trailers and symfony support means. – sonfd Jan 14 at 0:10
  • Additionally, after re-reading your first paragraph and the module page, I think my understanding in the question is correct. BigPipe will have no effect on unpersonalized pages for anonymous traffic, other than on the first, uncached hit. That first response will be built with the BigPipe technique and improve that first hit's response time. Any additional requests to the same, unpersonalized page will not be affected by BigPipe. – sonfd Jan 14 at 0:15

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.