Knowledge graphSettings

Updated: May 11, 2026 at 11:30 AM

The Twelve-Factor App

medium

Heroku methodology for cloud-ready SaaS applications: codebase, dependencies, configuration, backing services, processes, logs, and operational readiness.

The Twelve-Factor App still matters because it reminds us that healthy cloud architecture starts not with a cluster, but with discipline in the application itself.

In real design work, the chapter shows how a single codebase, explicit configuration, external backing services, and correct handling of logs and processes reduce hidden state and make a service more portable across environments.

In interviews and engineering discussions, it gives a simple language for explaining where Twelve-Factor principles genuinely improve release predictability and where domain-specific constraints justify careful exceptions.

Practical value of this chapter

Design in practice

Assess services against 12-factor rules to improve environment portability and release predictability.

Decision quality

Define clear boundaries for config, logs, and processes to reduce hidden state and operational drift.

Interview articulation

Explain which factors matter most for your case and why they reduce production risk.

Trade-off framing

State where strict 12-factor compliance is required and where pragmatic exceptions are acceptable.

Source

The Twelve-Factor App

Original manifesto from the Heroku team

12factor.net

The Twelve-Factor App

Authors: Adam Wiggins and the Heroku team
Year: 2011
Format: manifesto / methodology

A methodology for building modern SaaS applications, based on operating hundreds of thousands of apps on Heroku. Its goal is to make services portable, scalable, and easier to maintain.

This chapter treats The Twelve-Factor App as a practical contract between application and platform: codebase, explicit dependencies, environment-based configuration, backing services, build/release/run separation, stateless processes, and logs as event streams.

Foundation

Operating system: overview

12-Factor relies on a clean application contract with the OS.

Читать обзор

Why it matters

The Twelve-Factor App is a set of principles for applications that:

Use declarative formats for setup and runtime automation.
Keep a clean contract between application, operating system, and platform.
Fit cloud platforms without hand-maintained server administration.
Scale horizontally without rebuilding the app or changing source code.

Related topic

Cloud Native

Cloud-oriented practices for containers, functions, data, and platform boundaries.

Read review

The Twelve-Factor App principles

The principles are grouped by application area. Click a group to highlight related principles, or click a card for details.

Click a group to highlight related principles

I

Codebase

One codebase tracked in revision control, many deploys

II

Dependencies

Explicitly declare and isolate dependencies

III

Config

Store configuration in the environment

IV

Backing Services

Treat backing services as attached resources

V

Build, Release, Run

Keep build, release, and run as separate stages

VI

Processes

Execute the app as one or more stateless processes

VII

Port Binding

Export the service through a port

VIII

Concurrency

Scale out via the process model

IX

Disposability

Start fast and shut down gracefully

X

Dev/Prod Parity

Keep development and production-like environments close

XI

Logs

Treat logs as event streams

XII

Admin Processes

Run admin tasks as one-off processes

I.

Codebase

One codebase tracked in revision control, many deploys

Each application has one codebase that produces releases for multiple environments. Configuration and release flow change, not the source code.

Good approach
main repo → dev/staging/prod releases
xAnti-pattern
Separate repository copies per environment

Foundation

Containerization

Containers are a practical implementation of many Twelve-Factor principles.

Читать обзор

Modern application

Containers

Docker and Kubernetes map naturally to the methodology: isolation, port binding, environment variables, and graceful process shutdown.

Serverless

AWS Lambda and Cloud Functions strengthen the stateless-process idea: the platform scales execution and state moves into managed services.

GitOps

Argo CD and Flux carry declarative discipline into delivery: configuration is versioned, and release flow becomes reproducible and reviewable.

Beyond Twelve-Factor

The industry has moved forward since 2011. Modern practices complement the original principles rather than replacing them:

XIII.API First — design the API before implementation so consumers can understand the contract early
XIV.Telemetry — build in metrics, traces, and observability instead of hoping logs will be enough later
XV.Security — treat security as part of design and delivery, not as a final review gate

Key takeaways

The Twelve-Factor App remains a baseline for cloud-oriented application design.
Stateless processes are the foundation for horizontal scaling.
Environment-based configuration separates source code from runtime context.
Backing services should be swapped through configuration, not app rewrites.
Dev/prod parity reduces release-time surprises.
Logs should be event streams collected and processed by the platform.

Source

12factor.net
Original manifesto

Related chapters

Enable tracking in Settings