pattern

Ephemeral Environment

A full environment created on demand for one change and destroyed afterwards, which removes the queue for shared environments and the drift within them.

Shared development environments have two chronic problems: they are a queue, and they drift. An ephemeral environment — created per pull request from the same definitions as production, and destroyed on merge — removes both. There is no contention because there is no sharing, and there is no drift because nothing lives long enough to accumulate any.

What makes it hard is rarely the compute. It is data, dependencies and cost. Real data cannot be copied in; synthetic or masked data must be provisioned quickly. Downstream systems that cannot be spun up need virtualising. And an environment per open pull request across many teams is a bill that will be noticed unless destruction is automatic and enforced by a deadline rather than by discipline.

The most common half-implementation is creating them and never destroying them, which produces the cost of ephemerality with the drift of persistence. A hard time-to-live, enforced by the platform rather than requested of the team, is the part that must not be optional.