Twelve-Factor App
A methodology of twelve best practices for building modern, scalable, and maintainable software-as-a-service applications that are portable across execution environments and suitable for cloud deployment.
The Twelve-Factor App methodology, published by Heroku co-founder Adam Wiggins, defines twelve principles for building cloud-native applications: codebase (one repo per app), dependencies (explicitly declared), config (stored in environment), backing services (treated as attached resources), build/release/run (strictly separated stages), processes (stateless and share-nothing), port binding (self-contained), concurrency (scale via process model), disposability (fast startup, graceful shutdown), dev/prod parity (keep environments similar), logs (treat as event streams), and admin processes (run as one-off processes).
These principles guide architectural decisions that make applications operationally excellent in cloud environments. Following twelve-factor principles ensures your application can scale horizontally, deploy frequently, recover from failures quickly, and run consistently across development, staging, and production.
For AI applications, twelve-factor principles are especially relevant. Stateless processes ensure model serving scales horizontally. Config in environment variables makes it easy to switch model endpoints between environments. Treating logs as event streams enables model performance monitoring. Disposability supports rapid model deployment and rollback.
Related Terms
A/B Testing
A controlled experiment comparing two or more variants to determine which performs better on a defined metric, using statistical methods to ensure reliable results.
Feature Flag
A software mechanism that enables or disables features at runtime without deploying new code, used for gradual rollouts, A/B testing, and targeting specific user segments.
MLOps
The set of practices combining machine learning, DevOps, and data engineering to reliably deploy, monitor, and maintain ML models in production.
Model Serving
The infrastructure and systems that host trained ML models and handle inference requests in production, optimizing for latency, throughput, and cost.
Semantic Search
Search that understands the meaning and intent behind a query rather than just matching keywords, typically powered by embedding-based similarity comparison.
CI/CD (Continuous Integration / Continuous Deployment)
An automated software practice where code changes are continuously integrated into a shared repository, tested, and deployed to production, reducing manual intervention and accelerating delivery cycles.