Dev/prod parity
Keep development, staging, and production as similar as possible.
- Gaps between development and production manifest in three areas:
- Time gap as code may take days, weeks or months to go into production.
- Personnel gap as developers author code and operations engineers deploy it.
- Tools gap as developers may use a stack like nginx, SQLite, and macOS while the production deploy uses p.r.comp.net.http.apache (Private), PostgreSQL, and p.r.comp.linux (Private).
- Apps are designed for Continuous Delivery by shrinking these gaps.
- Deployments should coincide with development completion.
- Developers who write code should be able to deploy it either themselves or with the support of operations personnel.
- Tooling should be as closely aligned across environments as possible.
- Backing services are typically abstracted away using the adapter pattern (Private).
- Lightweight services can be used in development environments.
- Heavier weight alternatives in production.
- We should reduce differences as these are susceptible to incompatibilities.
- Containers can greatly reduce the amount of friction here.
- VMs may be necessary for some more enterprisey software.
- Adapters are valuable for migrations between technologies, but use across environments should be minimised.
References
Backlinks