CrafterCMS Architecture: Decoupled, Headless, and Flexible

CrafterCMS Architecture: Decoupled, Headless, and Flexible

Many enterprise companies know and plan for peak traffic times, but it's impossible to predict precisely how large (or small) your content infrastructure needs to be in order to accommodate traffic spikes, and save costs on slower days.

When it comes to scaling up to handle extra traffic, the cost of not being ready is downtime, and that’s a big problem. Especially for retailers and media publishers, even minor outages can be costly at certain times. Major retailers on average experienced about ten minutes of downtime during Cyber Monday, for example, at an estimated $7.9 billion in sales during the day. That's why companies should look towards software with an architecture that can elastically meet user demands.

CrafterCMS has a cutting-edge architecture that provides a unique combination of decoupled authoring and delivery, true headless API-first support, and total flexibility of deployment models. In this article, we're going to dive into the architecture of CrafterCMS to understand why it's so flexible and scalable.

CrafterCMS: Modern Decoupled

Let's first understand what we mean when we say Crafter is a modern decoupled CMS in terms of separate authoring and delivery systems, consistent global content distribution, and the elimination of database syncing.

Completely Separate Authoring and Delivery

A decoupled CMS means that content is authored in a system entirely separate from the content delivery system. In this case, scaling becomes more manageable because it's likely that there are vastly more consumers of content than authors; there's no need to scale Crafter Studio (authoring) at the same pace as Crafter Engine (delivery). CrafterCMS’s microservices architecture allows DevOps teams to scale only the subsystems necessary, allowing more cost-effective management of infrastructure resources.

Consistent Global Delivery

The main challenge decoupled CMSs face is maintaining consistency across globally distributed content. Multinational organizations with traditional CMS instances running on servers around the world, it’s common for the database-driven content stores to get out of sync. Crafter side-steps this issue with its git-based publishing mechanism. Every new change in its underlying git repository creates an immutable data structure with a unique commit ID that allows CrafterCMS to ensure servers around the world all have the same content version.

No Database Syncing

With a traditional, tightly coupled CMS, the frontend and backend systems share a database directly to pull content. For most decoupled CMSs, however, communication is through APIs, but this is only an abstraction because the APIs still need to pull content from separate databases that sync together. This creates a bottleneck because traditional databases have limits on how far they can scale. CrafterCMS is unique in that there's no shared database between the authoring and delivery tiers. Instead, authored content is stored in industry standard file formats for publishing to the delivery tier via git. This eliminates the scalability limits databases usually pose on the CMS delivery tier.

Truly Headless: Not Wannabe Headless!

Headless CMSs make content more reusable and simplify development, but not every headless CMS is created equal in terms of its APIs and overall developer experience.

API-first and Native GraphQL

A reliable headless CMS needs to be built from the ground up as API-first. That’s because API-driven software is developer friendly and leads to highly scalable solutions. Unlike traditional CMSs, development teams are free to choose the best technologies for the job. With CrafterCMS, developers can also easily create new REST APIs with its native support for leading technologies like Node.js, Groovy/Freemarker, and Java/Spring.

GraphQL adoption is growing in the front-end development world, and Crafter Engine has native support for it as well. Standardized content retrieval is a natural progression for API technology, and may replace RESTful APIs in the future. Crafter automatically manages the GraphQL schema based on the content types created within the CMS, so there’s no additional work for developers to use GraphQL queries.

Distributed Repositories

Most headless CMSs promote the benefits for the developer experience, but CrafterCMS takes this a step further. Crafter’s unique support for the DevContentOps process means developers can push code to production and pull live data back to development environments automatically (i.e., “Code Forward, Content Back”). Most CMS repositories require tedious import/export processes to move content between environments because they sit on top of traditional databases. Crafter's git-based content repository system facilitates content versioning control because it's built to move both code and content easily amongst decentralized repositories.

Flexible Deployments and Content Delivery

Let's now look at how Crafter's architecture allows flexible deployments, planet-wide scaling, and dynamic content delivery.

Serverless Deployment

On-demand elasticity is the key to cost-effective infrastructure management and planet-wide scaling. CrafterCMS 3.1 has removed the need to manage servers or local storage with a serverless architecture. Crafter Engine has diskless support, meaning it can now run in a stateless container on AWS Lambda, which automatically scales computing resources as needed.

Traditional Deployment

While serverless is growing in popularity, there are still trade-offs compared to traditional servers. Serverless may simplify deployment and management, but it typically comes with vendor lock-in to specific cloud providers. Luckily, companies can still deploy CrafterCMS with a traditional infrastructure in the cloud or on-premise.

There's also native support for containerized deployment and orchestration with tools like Docker and Kubernetes if you want more control and monitoring over your infrastructure than AWS Lambda provides.

Planet-wide Dynamic Content

While many CMSs encourage the use of content delivery networks (CDNs) for faster response times around the world, CDNs limit the potential for dynamic content. Instead, CrafterCMS encourages companies to deploy the various subsystems closest to their users - meaning companies should deploy Crafter Authoring near its marketing and content creator teams, and Crafter Engine wherever its end-users are across the world.

By avoiding cached content in CDNs, the delivery tier can serve personalized content in real-time. There are two optional modules for dynamic content that easily fit into Crafter's microservices architecture - Crafter Profile and Crafter Social. These modules support the delivery tier for tailoring content that's been locally indexed and stored in-memory.

Cutting-edge Headless CMS Technology with Crafter

The unique architecture of CrafterCMS equally supports content authors, software developers, and IT operations. CrafterCMS truly is a shared-nothing architecture that allows companies to scale and globally distribute content elastically. The architecture comes down to a powerful combination of decoupled microservices, git-based content repositories, robust REST and GraphQL APIs, flexible deployment options, and unique support for “Code Forward, Content Back” and DevContentOps processes.

If you're interested in learning more about the cutting-edge architecture of CrafterCMS, see our official technical documentation here.

Share this Post:

Posted by Russ Danner

Russ Danner is VP Products at CrafterCMS and is responsible for product management, product development and support, and client and partner success. Russ brings over 20 years of software architecture, design, and implementation experience. Prior to CrafterCMS, Russ was Web Experience Management Practice Director at Rivet Logic (now Capgemini) and project lead for the open source CrafterCMS project. 

Related Posts:

Contact Us

We will never sell your data to third parties.