Information for: DEVELOPERS   PARTNERS

BigPipe and Acquia Cloud

With the BigPipe HTML delivery technique, available in Drupal 8, highly personalized Drupal websites can rearrange the order in which webpage elements render for display. Portions of the webpage which contain user-specific or personalized content are initially rendered as placeholders (a technique called auto-placeholdering), and are later replaced with the intended personalized content after the rest of the webpage renders.

The BigPipe technique does not change the rendering speed of the webpage—the total time spent on generating HTML remains the same. The BigPipe technique does make the following essential changes that affect how fast a browser renders a webpage and is ready for interaction, known as Time-To-Interactive (TTI):

  • It changes the rendering order: structural (non-personalized) elements of the webpage are rendered first, and personalized elements are rendered second.
  • It sends the structural elements of the webpage to the browser before beginning the rendering the personalized elements, allowing the browser to display the structural elements almost instantaneously. It then holds the connection to the browser open while it renders the personalized elements, and streams (“flushes”) those personalized elements to the browser as soon as they’re ready.

This approach differs from the traditional “single flush” approach Drupal previously relied on, and many content management systems still do: wait until the entire HTML response is ready and then send it to the end user all at once. Until the HTML response is ready, the user’s browser must wait, and cannot interact with the webpage. BigPipe delivers a crucial part of the HTML response to the browser much earlier.

BigPipe results in significantly improved performance metrics for both Time-To-Interactive (TTI), Speed Index, and First Meaningful Paint.

For an example of webpage rendering with and without the BigPipe HTML delivery technique, see the following video:

Websites already cached in Varnish will not see performance improvements from the BigPipe technique when delivering cached traffic, because the step of rendering HTML occurs before the webpage is cached in Varnish.

BigPipe accelerates authenticated traffic similar to how Varnish accelerates anonymous traffic. BigPipe is valuable when the HTML must still be generated, such as a cache MISS for anonymous traffic, or for authenticated traffic’s uncacheable webpages.

By default, the BigPipe technique only operates on responses for requests that set a session cookie, such as users signed in to Drupal, or e-commerce requests.

Acquia recommends Acquia Cloud subscribers also use the Sessionless BigPipe contributed module. This module applies BigPipe to anonymous traffic’s webpages not already cached in Varnish®, ensuring the first request for any webpage is delivered faster, using the BigPipe technique.

Enabling BigPipe rendering on Acquia Cloud

To enable the BigPipe rendering improvements on a Drupal 8 website hosted on Acquia Cloud, perform the following steps:

  1. (Optional) Install the Sessionless BigPipe module in your codebase as described in Installing a Drupal 8 module.
  2. Enable the following modules in your codebase as described in Enabling a module in your codebase:
  3. Review your caching settings, as described in Configuring Drupal cache settings for Varnish, to ensure your website is configured to use Varnish caching.

Your website is now configured to use Varnish caching with the BigPipe rendering improvements.

More information