Each day, more Drupal 7 modules are being migrated over to Drupal 8 and new ones are being created for the Drupal community’s latest major release. In this series, the Acquia Developer Center is profiling some of the most prominent, useful modules available for Drupal 8. This week: BigPipe.
Wim Leers, Senior Software Engineer in Acquia’s Office of the CTO and Drupalist for more than nine years, helped me better understand the power and importance of this module that he and Fabian Franz, Senior Performance Engineer at Tag1 Consulting have developed exclusively for Drupal 8.
What does the BigPipe module do?
The BigPipe module speeds up page delivery times by sending unchanging parts of a page to the browser immediately while rendering and streaming other, dynamic parts as soon as they are ready. Facebook pioneered the streaming of content in so-called “pagelets”. Wim and Fabian invented a technique called “auto-placeholdering” for Drupal 8 that automatically detects and separates the static (and usually cached) parts of a page--the main content and images, for example--from dynamic, uncacheable, personalized page elements. These can be specific to a logged-in user like content recommendations, friend notifications, or editorial controls; or the contents of a non-logged-in user’s shopping cart, for example.
Why is this important?
In a nutshell: Using BigPipe, you get significantly faster sites without any special technical investment. There is zero configuration or coding needed: install it and let it do its thing. In Drupal 7 and just about every other CMS or framework, personalization has always made things run slower. Using BigPipe in Drupal 8, it is no longer so.
“We’ve created a way for anyone to take advantage of this technology that was previously only available to global players like LinkedIn and Facebook: just by installing our BigPipe module.” - Fabian Franz.
For developers: As long as you provide correct cacheability metadata, Drupal 8 will be able to automatically deliver personalized parts of the page later, without you having to write a single line of code. For example, every block in Drupal 8 can be rendered in isolation and can therefore be rendered later. So any personalized blocks you provide can automatically benefit from BigPipe. Fabian adds, “Powerful use of placeholders gives developers endless possibilities to optimize the delivery and caching of dynamic content. For example, this will make it possible to serve all content directly from a CDN (Content Delivery Network).”
BigPipe in Action
When was BigPipe created?
Starting in September 2014, Fabian Franz created a working proof-of-concept. Wim and Fabian went on to simplify its implementation, making significant changes to Drupal 8's rendering pipeline along the way to bring the concept of "placeholders" to Drupal core. This concept is essential for BigPipe, but also for ESI and it's also what enabled Drupal 8’s Dynamic Page Cache.
Wim explains, “The problem we were solving: Drupal 7 can’t really cache its output because it lacks metadata for caching. It generates just about everything you see on the page on every page load, even things that don’t change. Drupal 8 does far less work when serving a page, because we brought cacheability metadata to everything. BigPipe is the most powerful way to put that cacheability metadata to use and it delivers the most significant performance improvements.”
Has Drupal 8 changed this module?
“BigPipe was not possible before Drupal 8. So, no, it's the other way around: BigPipe has changed Drupal 8 and made it the fastest Drupal yet.” - Wim Leers.
Learn more about BigPipe in Drupal 8
- Watch Wim’s webinar with Fabien Potencier, Best Practices for Drupal Performance Tuning. It covers BigPipe, caching, profiling, and more at a high level.
- Wim goes into a lot more detail about Drupal 8 and BigPipe in his webinar, BigPipe: The Architecture Behind the Fastest Version of Drupal Yet.
- Wim and Fabian gave two sessions on caching and BigPipe at DrupalCon Barcelona:
Each day, more Drupal 7 modules are being migrated over to Drupal 8 and new ones are being created for the Drupal community’s latest major release. In this series, the Acquia Developer Center is profiling some of the most prominent, useful modules available for Drupal 8. This week: BigPipe.Acquia Developer Center January 22, 2016 August 7, 2018