Information for: DEVELOPERS   PARTNERS

Node.js and Acquia Cloud

Current Acquia partners and current Acquia Cloud Enterprise subscribers can try Node.js on Acquia Cloud free for 45 days.

Acquia Cloud is the leading cloud platform service for developing, delivering, and managing Drupal, Node.js, and decoupled Drupal applications. Node.js is an open source server-side environment (runtime) for JavaScript network applications. Acquia Cloud Enterprise subscribers can leverage both the Acquia platform and Node.js to create unique digital experiences that better leverage the best in JavaScript talent.

With Node.js in Acquia Cloud, you have a powerful set of tools to enhance your decoupled Drupal applications. You can also create standalone Node.js applications to share data with Drupal.

What do Node.js applications in Acquia Cloud provide?

  • Server-side rendering of front-end templates written in AngularJS, React, and Ember, or other front-end frameworks
  • Create powerful, flexible proxy layers between clients and Drupal, for enhanced security and performance
  • Enhance your decoupled Drupal applications with improved speed, SEO, and proxying capabilities
  • Websockets support for high-performing, low-overhead, two-way data transfer to clients
  • Run stand-alone Node.js apps for real-time communications like chat servers, for analyzing statistics or analytics, or anything else
  • Access to thousands of Node.js modules, through NPM

Node.js applications in Acquia Cloud do not support nginx.config files.

Decoupled Drupal support

Using a Node.js application can bring beneficial enhancements to a decoupled Drupal architecture.

Acquia Cloud Node.js applications can use Node.js as a standalone product, or can use Drupal as a content management system / business layer – making Drupal your database, content creation, and update center, and connecting Node.js with the presentation frameworks. This approach leverages Node.js frameworks with decoupled Drupal architecture. It exposes Drupal’s content and business-logic backend through APIs, and uses a front-end framework to build the user interface and presentation layer. Decoupled Drupal applications combine modern user interface responsiveness and power with Drupal’s unique content and logic features.

Decoupled applications can have significant drawbacks, including the following:

  • Slow initial page load – A page skeleton must load and then activate the front-end components to fetch content and render it, causing a perceived slow first-page load time.
  • SEO unfriendly – If page content is fetched and assembled in the browser, it is not available to search engines and other bots. Rich link previews for social media also may not work.
  • Security concerns – Your Drupal API is exposed to the public internet, which means you may want to allow connections only from whitelisted addresses.

Node.js can help you address these issues by using server-side rendering to deliver an initial page straight to the browser. By altering the rendering, you decrease perceived load time and increase readability by search engines. Wrapping your Drupal APIs in Node.js means they are exposed only to Node.js, and not the world.

Caching options for Node.js on Acquia Cloud

The Node.js hosting architecture on Acquia Cloud contains a pair of load balancers and one or more web servers. It does not provide a caching layer. If your application requires caching, consider the following options:

  • Rely on the caching layer on the Drupal side of the infrastructure
  • Implement a content delivery network (CDN) such as Acquia Cloud Edge in front of the Node.js stack
  • Build caching into the Node.js stack with one of the following packages:

For the specific resources available for your use in Acquia Cloud Node.js application environments, and the current limitations of these environment types, see Resources and limitations for Node.js environments.

Getting started with Node.js applications

You can add a Node.js application to an Acquia Cloud Enterprise subscription for an additional cost. Contact your account manager to learn about adding Node.js to your subscription. For more information about Node.js applications and environments in Acquia Cloud, see Getting started with Node.js applications and environments.