intermediate 2 min answer

An organisation maintains many long-lived environments and they have all drifted from production. What environment strategy works?

environmentsdriftephemeralparityatlassianwhat-would-you-change
Show the full answer Hide the answer

Why long-lived environments drift

They are changed by hand and never rebuilt. Each incident, each experiment, each urgent fix leaves a residue. Within months, no environment resembles any other, and testing in them stops predicting production.

The second cause is that their configuration is not the same artefact as production's. If production is built from code and staging is built from a copy that was edited, drift is guaranteed.

The strategy that works

1. Ephemeral environments created from code on demand, and destroyed after use. An environment that is rebuilt frequently cannot drift, and rebuilding is also a continuous test of the provisioning code.

2. One production-like environment, built from the same definitions as production, used for the tests that genuinely require it — performance, migration rehearsal, integration with third parties.

3. Test in production, deliberately, for the properties that no environment can replicate: real traffic patterns, real data distributions, real third-party behaviour. Feature flags, canary releases and shadow traffic are what make this safe.

4. Reduce the number of environments. Each one is maintenance, drift and cost. Most organisations have more than they can keep faithful, and fewer faithful environments beat many stale ones.

What parity actually requires

Not identical scale — that is unaffordable and unnecessary. Identical in the dimensions that affect correctness: configuration structure, dependency versions, data shape, security controls, and the deployment mechanism itself.

The deployment mechanism is the one most often different and most consequential: if production deploys differently from every other environment, the deployment path is untested until it runs against production.

The specific practice that prevents recurrence

Drift detection with automatic reconciliation. A scheduled comparison between the declared and actual state of every environment, with differences either codified or reverted within a defined window — and an incident process step requiring manual changes to be reconciled before closure, while the context is fresh.

Without that, break-glass changes accumulate and the next unrelated apply silently reverts an incident fix.