What is Headless Drupal?
Headless Drupal is the approach of uncoupling the backend of the CMS system that manages content from the frontend that is responsible for presenting or displaying content, allowing Drupal to expose content to other frontend systems.
The front-end is a separate application, typically built with a JavaScript framework such as React, Angular, or Vue.
From an architecture perspective, each application is provisioned independently and managed by individual development teams.
A common Headless Drupal topology consists of a single Drupal instance and multiple frontend applications connecting back to Drupal for their content.
Why Headless Drupal?
The first question that might come to mind after reading about Headless Drupal is, why?
Headless Drupal offers the advantages of autonomy.
Content editors can focus on implementing a content architecture that works for them without worrying about how the data is presented.
Developers can build with their preferred frontend tools for their specific project requirements.
System administrators can scale out the infrastructure to hundreds of applications.
How does Skpr support Headless Drupal?
Headless Drupal demands a lot from the hosting solution.
The hosting solution needs to deploy a mix of application types and provide simple solutions for managing the large number of application deployments running on the platform.
That means the hosting platform has to provide the following:
- A CI/CD agnostic system for packaging and deploying applications so that separate development teams can use their preferred tools.
- A centralised monitoring interface so that developers and system administrators can see the health of the entire application portfolio at a glance.
- A robust configuration system that connects all the applications while being API-driven for ultimate flexibility.
- A system for tracking vulnerabilities across the extensive portfolio of applications deployed on the platform.
- A solution that scales with the number of applications provisioned and autoscaled.
Anything less results in an exponential rise in manual intervention as more sites are provisioned on the hosting solution.
Below, we outline how Skpr facilitates each of these requirements.
Packaging and Deployment
The Skpr hosting platform is built from the ground up using cloud-native technologies. One of these technologies is containers.
Using containers, we can provide a packaging system that is
- Consistent and runs a set of repeatable steps inside a standard build environment.
- Flexible and can be integrated into any CI/CD pipeline.
Developers can package and deploy many application types using just a few commands.
skpr package 0.0.1
skpr deploy stg 0.0.1
skpr deploy prod 0.0.1
The diagram below demonstrates how development teams can utilise their preferred CI/CD pipeline solution while still using our consistent package and deployment tooling.
Centralised Monitoring
The Skpr hosting platform leverages AWS CloudWatch to aggregate metrics and logging data from the platform and the applications that run on top.
Developers and system administrators can analyse the platform and their decoupled applications at multiple levels using our CloudWatch Dashboards.
- Global - A high-level overview that outlines the system's health, e.g. Error rates, response times and resource utilisation across the entire hosting solution.
- Application - A more granular version of the global dashboard, targeted towards a single application, e.g. dashboards provided for a project’s dev, staging and production environments.
- AWS Managed Services - Dashboards that analyse the health of an individual AWS Managed Service, e.g. Amazon RDS, OpenSearch, EFS, etc.
- Security - Dashboards that provide an overview of security events and posture of the platform, e.g. WAF, Intrusion detection, etc.
Configuration
Our powerful configuration system lets you decouple config from code, update on the fly, and protect sensitive values from accidental exposure.
For Drupal, this means making all the required information available for connecting to backend services, e.g. Database, Search, etc.
In the context of our Headless Drupal, we can use this same system to also automatically provide all the front-end applications with the details they need to connect back to the Drupal content solution, e.g. Endpoint, Username/Password, etc.
The Skpr configuration system can also be managed by an external system using our API for maximum flexibility.
For more information, check out our blog post about architecting the Skpr configuration system.
Vulnerability Management
The Skpr hosting platform leverages Amazon Inspector for continual vulnerability management.
Using Amazon Inspector means we can provide customers with a high-level overview of their hosting platform’s security posture and the applications deployed on top.
Amazon Inspector scans the following layers of the Skpr platform:
- Application Images (ECR)
- EC2
- Lambda
Customers can then determine the amount of security risk across all the components running as part of the decoupled application.
Autoscaling
We’ve configured Skpr with a highly scalable, immutable architecture backed by AWS Managed Services.
The platform is designed to expand as the number of applications grows and demand for them increases. Every application is configured to autoscale based on the following key metrics:
- CPU
- Memory
- PHP Procs (For PHP-based applications only)
Infrastructure components are either configured to autoscale (EC2 autoscaling groups), or, where applicable, provisioned with their serverless counterparts, allowing for rapid vertical autoscaling e.g. Aurora Serverless v2 for MySQL.
As your decoupled application grows, so does Skpr.
Conclusion
Headless Drupal is a proven methodology that enables development teams to work autonomously. It also demands a flexible, mature hosting platform to manage this complex application architecture.
The Skpr hosting platform is an excellent solution for hosting decoupled applications, given its mature systems for managing many applications at scale.
Get in touch with us for more information on running your Decoupled or Headless Applications on Skpr.