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?
- First request: Varnish miss, Drupal Page Cache miss, BigPipe builds the page (This is the one case where BigPipe would have an impact)
- Second request: Varnish miss, Drupal Page Cache hit, Drupal Page Cache serves the page
- 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?