Environments

Staging is not production. Drift, parity, preview and ephemeral environments, and the limits of pre-production evidence — including why more environments is not more safety.

What an Environment Is For

Each environment is an instrument that measures some production properties and is blind to others — which makes an extra one a cost to justify, not a safety improvement to assume.

Q · How many environments should we have, and what is each one actually evidence for?
Environment Drift

Environments diverge from each other continuously and silently, and a drifted environment does not stop answering questions — it starts answering them wrongly.

Q · Why does a change that passed staging fail in production when nobody changed either environment?
Parity That Is Worth Paying For

Parity means preserving the operational characteristics that matter for the change at hand — explicitly not identical scale, which is unaffordable and still insufficient.

Q · How similar does a lower environment have to be to production for its result to mean something?
Preview Environments

A running instance per change, created from the pull request and destroyed with it — excellent evidence about wiring and product behaviour, no evidence at all about scale.

Q · What does giving every pull request its own running environment actually buy, and what does it quietly cost?
Ephemeral Environments

Environments created on demand and destroyed when done, which is only possible once infrastructure, configuration, data and secrets are all codified — and which turns environment count into a decision instead of an inheritance.

Q · What has to be true before an environment can be created and destroyed on demand rather than kept running forever?
Production Data in Lower Environments

Copying real user data into a test environment moves it from your most controlled system to your least controlled one — use synthetic data, anonymised data or a controlled subset instead.

Q · We need realistic data for testing. Can we copy production into staging?
Promotion Between Environments

Promotion moves one immutable artifact forward and changes only its configuration — which is what makes the evidence from earlier environments mean anything at all.

Q · What exactly moves between environments, and what does each promotion gate actually prove?