Problem/Motivation
The module does not work as advertised if big_pipe module is enabled. This is due to the fact that bigpipe sets the max-age cachability paramter to 0 ($html_response->getCacheableMetadata()->setCacheMaxAge(0)). This prevents varnish from caching pages for logged in users.
Proposed resolution
- This was not fixed in #3211614: Add support for BigPipe. (The changes in this issue made it a lot harder to understand the symptoms since it removed the requirements from the status page!)
- The requirements should be clearly documented.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3370779-2.patch | 482 bytes | sokru |
Issue fork adv_varnish-3370779
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
sokru commentedI noticed the following error on php logs each time a user tried to log in.
I would say its due to Drupal core 9.2 changes that many other modules have faced. Attached a patch that fixes the error, but I still get the
X-Cacheable:Cookie in the responseheader. Not sure if this still requires adjusting the default.vcl template.Comment #4
shumer commentedBigPipe and Advanced Varnish are fundamentally incompatible: they solve the same problem (personalization on cached pages) with mutually exclusive approaches:
- BigPipe: streams the response in chunks (Transfer-Encoding: chunked), replacing placeholders lazily within a single HTTP response
- Advanced Varnish + ESI: Varnish buffers the entire response for caching, uses separate ESI subrequests for dynamic parts
Varnish cannot simultaneously buffer (required for caching/ESI) and stream (required for BigPipe). This is not a fixable bug, it's an architectural constraint. Initially I was hoping to fix that, but unfortunately that's not a case.
Comment #7
shumer commented