Ephemeral and Preview Environments
Replacing the one shared staging environment with a disposable environment per pull request: isolation models from namespaces to vclusters, the data problem, dependencies you cannot clone, TTLs and cost, and parity measured rather than assumed.
Overview
Why shared staging decays
The shared staging environment is one of the most durable bad ideas in software delivery, and it survives because the failure is gradual. On day one it works; on day four hundred it is permanently half-broken, deployed to by three teams at once, different from production in ways nobody has enumerated, with test failures everyone ignores.
Nobody decided that. It is what a long-lived shared mutable environment converges to.
Key concepts
- Environment drift
- Namespace per PR
- Virtual cluster (vcluster)
- Per-environment cloud resources
- TTL and reaper
- Data seeding strategies
- Service virtualization
- Measured parity
Interview questions
- Design a per-PR environment system end to end. What are the components and where does it break?
- Compare namespace-per-PR, vcluster, and a full cluster per environment. When does each stop working?
- Data is the hard part. Walk through the options and the compliance constraint.
- What do you do about dependencies you cannot clone per pull request?
- How do you control cost, and what does the cleanup path look like when everything else has failed?
- How do you measure whether a preview environment is representative, and what do you do with the gap?
Sign up free to read the full topic
More DevOps topics
- DORA Four Keys — Deep Dive
- DORA Four Keys — Implementation
- DORA Metrics
- DORA Metrics — Definitions, the Math, and How to Measure Them
- eBPF Observability
- eBPF Programming
- etcd and the API Server — The Write Path, Raft, and Why 3 vs 5 Members Matters
- Event-Driven Architecture
- Event-Driven Automation and StackStorm
- External Secrets Operator
- Feature Flags
- FinOps & Cloud Cost Engineering
Start free on Cariara · Coding problems · System design studio