Skip to Content
Beyond the Twelve-Factor App
book

Beyond the Twelve-Factor App

by Kevin Hoffman
April 2016
Intermediate to advanced content levelIntermediate to advanced
70 pages
1h 11m
English
O'Reilly Media, Inc.
Content preview from Beyond the Twelve-Factor App

Chapter 8. Backing Services

Factor 4 states that you should treat backing services as bound resources.

This sounds like good advice, but in order to follow this advice, we need to know what backing services and bound resources are.

A backing service is any service on which your application relies for its functionality. This is a fairly broad definition, and its wide scope is intentional. Some of the most common types of backing services include data stores, messaging systems, caching systems, and any number of other types of service, including services that perform line-of-business functionality or security.

When building applications designed to run in a cloud environment where the filesystem must be considered ephemeral, you also need to treat file storage or disk as a backing service. You shouldn’t be reading to or writing from files on disk like you might with regular enterprise applications. Instead, file storage should be a backing service that is bound to your application as a resource.

Figure 8-1 illustrates an application, a set of backing services, and the resource bindings (connecting lines) for those services. Again, note that file storage is an abstraction (e.g., Amazon S3) and not direct OS-level access to a disk.

Figure 8-1. An application relying on backing services

A bound resource is really just a means of connecting your application to a backing service. A ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beyond Vibe Coding

Beyond Vibe Coding

Addy Osmani
AI Agents in Action

AI Agents in Action

Micheal Lanham
Developing Apps with GPT-4 and ChatGPT

Developing Apps with GPT-4 and ChatGPT

Olivier Caelen, Marie-Alice Blete

Publisher Resources

ISBN: 9781492042631