Adding Drupal 8 BigPipe support in our cPanel plans

Load Drupal 8 pages in under 1 second with Nginx, php-fpm and BigPipe

Announcing BigPipe support for Drupal 8 in our high performance cPanel cloud hosting plans.

Why BigPipe

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”.

How to activate BigPipe

BigPipe is currently supported in our High Performance cPanel and Managed Cloud Hosting plans. Cloud VPS customers could configure BigPipe by implementing these changes to PHP, Apache and Nginx, provided by Jeff Geerling

  1. Login to cPanel account
  2. Navigate to Nginx page (at the bottom of the main cPanel page

  3. Select your domain to modify

  4. Select PHP as the backend, choose PHP7 or PHP7_LVE for better performance

  5. Select Drupal 8 with BigPipe configuration template
  6. Optionally enable PageSpeed to optimise, combine, re-compress and minify images, CSS and JS files
  7. Click Generate button
  8. Test BigPipe integration by placing this PHP file in your public_html/ folder and accessing it in browser:
<?php
// Set a valid header so browsers pick it up correctly.
header('Content-type: text/html; charset=utf-8');

// Emulate the header BigPipe sends so we can test through Varnish.
header('Surrogate-Control: BigPipe/1.0');
ini_set('output_buffering', 'Off');

// Explicitly disable caching so Varnish and other upstreams won't cache.
header("Cache-Control: no-cache, must-revalidate");

// Setting this header instructs Nginx to disable fastcgi_buffering and disable // gzip for this request.
header('X-Accel-Buffering: no');

$string_length = 32;
echo 'Begin test with an ' . $string_length . ' character string...<br />' . "\r\n";

// For 3 seconds, repeat the string.
for ($i = 0; $i < 3; $i++) {   
  $string = str_repeat('.', $string_length);  
  echo $string . '<br />' . "\r\n";  
  echo $i . '<br />' . "\r\n";   
  flush();   
  sleep(1);
}
echo 'End test.<br />' . "\r\n";
?>

Activate your Drupal 8 BigPipe account in cPanel or Managed Cloud Hosting now!

Activate BigPipe in cPanel

Activate BigPipe Managed Drupal Hosting

Was this helpful?: 
5
Average: 5 (1 vote)
Ivan Grynenko's picture