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

Start free on Cariara · Coding problems · System design studio