12 Factors Became 15: What Changed and Why It Matters
DEV Community

12 Factors Became 15: What Changed and Why It Matters

Many developers adapt to cloud environments by learning tools: Docker, Kubernetes, or a provider's managed services. That is a valid path, but it leaves a gap. If you memorize a tool without understanding the principle behind it, you end up repeating recipes without knowing why they work - and you struggle when the context changes.

The Cloud Native factors help close that gap. They were originally proposed by the Heroku team as the 12 factors (The Twelve-Factor App) and later expanded to 15 by Kevin Hoffman in Beyond the Twelve-Factor App. They describe the characteristics of an application that runs well in elastic, ephemeral, and distributed environments.

Developers who internalize them design robust systems almost automatically, because their decisions are already aligned with how the cloud works. They also work as an audit checklist. Given a system that runs - or will run - in the cloud, you can go through the 15 factors and ask where it follows them and where it breaks them.

Beyond the list itself, they provide a shared vocabulary for reasoning about portability, scalability, resilience, and operations. The 3 factors added by Hoffman reflect what real-world practice has shown to be essential: API first, telemetry, and authentication and authorization.

For easier reading, the 15 factors below are grouped by theme rather than their original book numbering.

Code and build

1. One codebase, one application

Each application has a single repository under version control, and every deploy (development, staging, production) comes from it. In a microservices architecture, each service usually has its own repository. If several services share code, that code becomes a versioned library with a declared dependency. The codebase remains the same across every environment; what changes between them is the configuration.

2. Dependency management

Every dependency is explicitly declared in a manifest (such as pom.xml or build.gradle) and fetched from a central repository. The application assumes nothing is pre-installed on the host machine. Anyone who clones the project should be able to build and run it using only what is declared.

3. Design, build, release, run

The delivery lifecycle has distinct stages, each with its own responsibility:

  • Design: Architecture and service contracts are defined before implementation begins.
  • Build: Code and dependencies are compiled into an immutable artifact.
  • Release: That artifact is combined with environment-specific configuration and assigned a unique, identifiable version (ideally following semantic versioning).
  • Run: The runtime environment executes a release. Nothing is changed directly in production - any change produces a new release.

Configuration

4. Configuration, credentials, and code

Everything that varies between environments (addresses, credentials, API keys) stays strictly outside the codebase and is injected externally via environment variables or a secrets manager. A simple litmus test: could your repository become public right now without exposing any secrets? If not, configuration is leaking into your code.

5. Backing services

Databases, message brokers, caches, object storage, and external APIs are treated as attached resources. The application code does not distinguish between a local instance and a cloud-managed service - swapping one for the other should require only a configuration update (URL and credentials), with zero code changes.

6. Environment parity

Development, staging, and production should be as similar as possible. The wider the gap between environments, the harder it becomes to reproduce bugs and the less reliable automated tests are. High parity also reduces friction between development and operations teams, since everyone is working against the same runtime behavior.

Execution

7. Disposability

Application instances are ephemeral: they can be started or terminated at any moment due to autoscaling, hardware failures, or rolling updates. Because of this, processes must start up quickly and shut down gracefully - finishing in-flight requests and releasing resources before stopping. Orchestrators like Kubernetes rely heavily on this behavior.

8. Port binding

The application is completely self-contained: it embeds its own HTTP server and exposes its service by binding to a port, without needing to be deployed into an external application server (like a standalone Tomcat or WildFly). Spring Boot, with its embedded server, is a direct example.

9. Stateless processes

The application does not keep state in memory or on local disk across requests. Any instance can handle any incoming request and be destroyed afterward without data loss. Persistent state does not disappear - it lives in dedicated backing services, such as a database, distributed cache, or object storage.

10. Concurrency

To handle increased load, the application scales horizontally by running more instances of the same process rather than vertically by provisioning a larger machine. Horizontal scaling only works reliably when the preceding factors - especially statelessness and disposability - are respected.

Operations

11. Logs

The application does not manage log storage, rotation, or routing. It simply emits logs as a continuous, unbuffered stream of events to stdout, and the execution environment captures and forwards them to a centralized aggregation and analysis platform.

12. Administrative processes

One-off administrative tasks - such as database migrations, data backfills, and maintenance scripts - run as isolated, disposable processes using the exact same codebase, dependencies, and configuration as the main application. They are never bundled into the main service loop and should be version-controlled alongside the application.

13. Telemetry

Modern observability goes beyond plain logs and rests on three pillars:

  • Metrics: Aggregated measurements of how the system behaves over time.
  • Traces: The end-to-end path of a request across distributed services.
  • Logs: Discrete, detailed event records.

Application health checks complement these three pillars, and OpenTelemetry has emerged as the open standard for instrumenting and collecting this data. Without telemetry, operating a distributed system becomes guesswork.

Design and security

14. API first

The API contract is designed and agreed upon before writing implementation code. In an ecosystem of services communicating over the network, the API is the product: defining the contract upfront streamlines team integration, enables parallel development, and supports safe evolution through versioning.

15. Authentication and authorization

Security is built into the architecture from day one rather than bolted on afterward. Authentication answers "Who are you?", while authorization answers "What are you allowed to do?" - strictly in that order. Standards such as OAuth 2.0, OpenID Connect, and JWT form the core building blocks. While security spans much further (secrets rotation, mTLS, least privilege), without well-defined identity and access control, every other layer loses its foundation.

Conclusion

The 15 factors are not a list to memorize or a certification to earn. They are a mental model for building software that thrives in the cloud. They work well as an audit checklist, but their real value lies in shaping how you reason: once you understand why an application should be stateless or externalize its configuration, you start making those decisions naturally without consulting a list.

Each factor deserves its own deep dive - which is exactly what I plan to cover in upcoming posts. Which of these 15 factors do you see violated most often in real-world projects? Drop your thoughts in the comments!

References

  • The Twelve-Factor App
  • Kevin Hoffman, Beyond the Twelve-Factor App (O'Reilly Media)
Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.