Concurrency, Disposability, and Dev-Prod Parity Factors
You'll learn how three Twelve-Factor principles work together to make applications scalable, resilient, and consistent across environments.
The Three Principles
These factors address how your application scales, starts/stops, and maintains consistency between development and production:
Concurrency (Factor VIII)
Scale your application by running multiple processes, not by making single processes larger. Think of a restaurant: instead of one super-chef doing everything, you hire multiple specialized staff members (line cooks, prep cooks, dishwashers). Each process handles requests independently.
This means designing stateless processes that can be added or removed based on load. Your app should run equally well with 1 instance or 100.
Disposability (Factor IX)
Processes should start quickly and shut down gracefully. Using the restaurant analogy: staff should be able to clock in/out smoothly without disrupting service. Fast startup enables rapid scaling and deployment; clean shutdown ensures no lost data or interrupted requests.
Minimize startup time to seconds. Handle termination signals properly—finish current work, close connections, then exit.
Dev-Prod Parity (Factor X)
Keep development, staging, and production environments as similar as possible. Don't develop on SQLite and deploy to PostgreSQL. Don't use mock services locally that behave differently than production APIs.
The smaller the gap between environments, the fewer surprises during deployment. Same backing services, same OS, same configurations (just different values).
Why They Work Together
These factors enable modern deployment practices: you can horizontally scale disposable processes, confident that what worked in development will work in production. No snowflake servers, no "works on my machine" excuses.
Key Takeaway: Design processes to scale horizontally, start/stop instantly, and run identically everywhere—this is the foundation of cloud-native, continuously deployable applications.