twelve-factor app
A short manifesto of twelve rules for building applications that deploy cleanly to modern platforms, written at Heroku and published in 2011.
In more detail
It describes the contract between an application and the platform that runs it: one codebase, declared dependencies, config in the environment, attached backing services, separate build and run stages, stateless processes, port binding, process-based scaling, disposability, dev/prod parity, logs as event streams and one-off admin processes. It was open sourced in November 2024 and is being revised in public, but the 2011 text remains the reference until the revision lands.
Example
python3 audit.py # one PASS or FAIL row per factor for each variantRelated terms
- Heroku — A cloud platform that runs applications from source code, where the twelve-factor app manifesto was written.
- codebase — All the source code for a piece of software, usually kept in one or more version control repositories.
- config — Everything about an application that varies between deploys, such as database addresses, credentials and hostnames.
- backing service — Any service an application uses over the network, such as a database, cache, queue, mail relay or payments provider.
- build, release, run — Three strictly separate stages: build turns code into a bundle, release joins it to one deploy config with an identifier, and run starts processes from a chosen release.
- stateless process — A process that keeps nothing it needs between requests in its own memory or disk, so it can be restarted or replaced at any moment.
- port binding — An app offering its service by listening on a network port itself, with its own web server built in.
- concurrency — Having several pieces of work in progress during overlapping periods of time, such as requests being handled at once.
- disposability — The property of a process that can be started or stopped at a moment’s notice without harm.
- dev/prod parity — Keeping development, staging and production as similar as possible in timing, people and tools.
- event stream — A continuous, time-ordered flow of events with no fixed beginning or end.
- admin process — A one-off task, such as a database migration, console session or repair script, run as its own process against the same release as the app.
Taught in
- What DevOps Actually Is — DevOps & Site Reliability Engineering
- The Pitfalls Of Measurement — DevOps & Site Reliability Engineering
- Codebase And Dependencies — DevOps & Site Reliability Engineering
- Config And Backing Services — DevOps & Site Reliability Engineering
- Build, Release, Run And Processes — DevOps & Site Reliability Engineering
- Port Binding And Concurrency — DevOps & Site Reliability Engineering
- Disposability, Dev Prod Parity And Logs — DevOps & Site Reliability Engineering
- Admin Processes And The Open Source Update — DevOps & Site Reliability Engineering