Handling a Headless CMS

This is a general outline for using a headless CMS (such as Contentful).

There are other ways to do this but this is fast given a suitable size delta, and will recover from failure better than webhooks:

This has the headless CMS being polled by a Static Site Generator.

The Static Site Generator knows the current state of the site and only regenerates changed items. This may require it to keep a map of dependencies between nodes. Sometimes you may need to go 3 or 4 levels deep. Store the output in S3. Serve the website from S3, which allows some customisation of the data. Use a CDN to back the website to reduce load. Purge the pages of the site that have changed after they have been written.

We managed to use a single Heroku node for the SSG and another one for the webserver.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s