Contentful is the leading content platform for today’s digital-first era. Its software helps global brands accelerate content at scale to engage audiences with innovative digital experiences across channels, markets and stages of the customer journey. Contentful provides a reliable, stable and secure backend so that customers can build unique experiences on the frontend. Fastly helps Contentful serve its customers with fast, flexible caching that can be tailored to individual customer needs and locations. As a result, Contentful maintains a strong cache hit ratio (CHR) and seamless scalability as the business grows globally.
contentful.com/
Industry: Technology
Location: Berlin, Germany
Customer since: 2013
Favorite features
Content delivery (CDN)
Soft Purge
Fastly Fiddle
Contentful customers sometimes experience large spikes in traffic due to a product launch, seasonality or a special promotion. Regardless of their location or device, end users still expect a fast, high-quality content experience. As Contentful is a multi-tenant cloud platform, scalability is a top concern. Contentful needs to effectively support both unpredictable demand from global customers, as well as the customer’s own organic business growth.
Scaling content infrastructure to handle traffic spikes
For Contentful’s engineering organization, scalability and flexibility go hand in hand. Fastly’s edge cloud platform provides a flexible CDN caching layer at the network edge, with a growing network of POPs around the world that enables the Contentful platform to reach end users faster and more efficiently, wherever they happen to be.
When large volumes of requests come through, Fastly’s CDN handles most of them at the edge. Content is delivered to end users faster, and reduces the burden on the Contentful platform itself. When customers publish new content or make changes, their requests can more easily get to the Contentful backend without encountering bottlenecks — meaning Contentful is available and instantly accessible.
“As Fastly grows, Contentful’s network automatically grows as well.”
Eoin Crowley
Director of Platform Infrastructure
“If we had to build a scalable, global CDN ourselves, it would require an incredibly heavy investment to get the same level of scale that we have with Fastly.”
Eoin Crowley
Director of Platform Infrastructure
One challenge of managing scale is traffic control. Publishing new content triggers a cache purge, sending everything straight to the platform’s origin. When this happens during heavy traffic, Contentful may impose rate limits or other controls, resulting in slow or failed requests and a poor user experience.
With Fastly, Contentful can help customers avoid this by serving stale content from the cache. Fastly’s Soft Purge feature enables them to mark content as outdated instead of permanently removing it from the cache. Contentful turns this on for customers who are approaching a rate limit in a particular area and have suitable stale content available. End users will continue to see the old content until newly published content works its way into the cache.
Soft Purge also allows Contentful to wait for a defined period of time before purging the cache. Using the stale-while-revalidate command, Fastly will serve cached content for up to one day while re-fetching the latest version in the background. This allows a large volume of updates to happen while ensuring a smooth user experience on the frontend. As a result, Contentful has been able to maintain a strong cache hit ratio (CHR) of 94.47%.
“Using Fastly, we can leverage cached content and control cache purges in order to deliver a smooth user experience.”
Eoin Crowley
Director of Platform Infrastructure
Customer use cases are as varied as the internet itself. Caching strategies differ widely between customers running a basic website to those launching an online game or operating a global ecommerce site. Contentful is focused on delivering a full-featured service without having to set strict rules about platform use.
A sandbox for quick experimentation and testing
As the Contentful team works on their proof of concept, they use Fastly Fiddle, a sandbox to test different configurations and VCL snippets. This is a place for developers to experiment with new ideas, run requests and quickly test code without needing to set up a full deployment environment. Fiddle gives them valuable insight into how their ideas might work.
The team uses Terraform to deploy updates and manage their infrastructure-as-a-service (IaaS), which has a purpose-built integration with Fastly to manage configuration. The team uses the Fastly web interface for some tasks, such as checking metrics or taking a quick look at the results of experiments. But typically, their Fastly integration is managed in code and Terraform.
Like their customers, the Contentful team also benefits from Fastly’s flexibility, which allows them to build without limits. Contentful integrates several different CDNs that serve different aspects of the platform. Fastly works seamlessly in this multi-solution environment. Depending on the customer use case, approximately 90% of requests coming from the other CDNs get returned at the edge by Fastly and never hit the origin — vastly reducing the cost and latency associated with traffic going back to Contentful’s origin servers. Fastly helps to maximize the efficiency of Contentful’s complex tech stack, so the company can continue to offer a robust, scalable platform for its global customers.
“It’s easy to quickly test new ideas in Fastly Fiddle and deploy code updates using Terraform. This helps our team move faster and speed up development.”
Yann Hamon
Software Engineer