Jonatan Matajonmatum.com
conceptsnotesexperimentsessays
© 2026 Jonatan Mata. All rights reserved.v2.1.1
Concepts

Twelve-Factor App

Twelve-principle methodology for building modern SaaS applications that are portable, scalable, and deployable on cloud platforms.

seed#twelve-factor#methodology#saas#cloud#best-practices#architecture

What it is

The Twelve-Factor App is a 12-principle methodology for building modern SaaS applications. Published by Heroku in 2011, it remains the foundation of cloud native best practices.

The 12 factors

  1. Codebase: one repo, multiple deploys
  2. Dependencies: explicitly declare and isolate dependencies
  3. Config: configuration in environment variables
  4. Backing services: treat external services as attached resources
  5. Build, release, run: strictly separate stages
  6. Processes: run as stateless processes
  7. Port binding: export services via port binding
  8. Concurrency: scale via processes
  9. Disposability: fast startup, graceful shutdown
  10. Dev/prod parity: keep environments similar
  11. Logs: treat logs as event streams
  12. Admin processes: run admin tasks as one-off processes

Current relevance

Despite being over a decade old, the 12 factors remain relevant. Serverless and containers implement many of these principles by design.

Factors in modern practice

FactorPrincipleModern implementation
III. ConfigEnvironment variablesAWS SSM Parameter Store, Secrets Manager
V. Build, release, runSeparate stagesCI/CD pipelines, GitOps
VI. ProcessesStatelessContainers, Lambda
IX. DisposabilityFast startupHealth checks in Kubernetes, graceful shutdown
X. Dev/prod paritySimilar environmentsDevContainers, Docker Compose
XI. LogsEvent streamsStructured logging, stdout → CloudWatch

Limitations

The 12 factors don't cover aspects that are essential today:

  • Security: no mention of authentication, authorization, or zero trust
  • Observability: only discusses logs, not metrics or distributed tracing
  • Resilience: doesn't address circuit breakers, retries, or chaos engineering
  • API contracts: no mention of API versioning or service contracts

Why it matters

The twelve factors remain relevant as design principles for cloud-native applications. Environment-based configuration, stateless processes, logs as streams, and dev/prod parity are practices that prevent entire categories of operational problems.

References

  • The Twelve-Factor App — Adam Wiggins, 2011.
  • Config — 12 Factor — Adam Wiggins, 2011. Factor III: environment-based configuration.
  • CNCF Projects — CNCF, 2024. Cloud-native ecosystem implementing twelve-factor principles.

Related content

  • Cloud Native

    Development approach leveraging cloud advantages: containers, microservices, immutable infrastructure, and declarative automation for scalable and resilient systems.

  • DevOps Practices

    Set of technical and cultural practices that implement DevOps principles — from Infrastructure as Code to blameless post-mortems. The "how" behind the philosophy.

Concepts