liveBook · Manning

Testing in production

As explained in Grokking Software Architecture

Validating software on production infrastructure, potentially using controlled exposure to real user traffic.

Staging can promise a safe rehearsal yet diverge from production: data, infrastructure size, and real traffic are hard to match. Production testing uses the live environment as a final validation loop, where software encounters actual system conditions. section 13.7

The tradeoff is exposure. Programmable routing controls—including dark launching, inversion feature flags, and canary proxies—can put code on live servers while limiting which users see it. If failures can be isolated to a small share of users within milliseconds, production may serve as the final checkpoint. section 13.7.1

Use this decision rule:

  • Keep a physical staging gate when compliance, data privacy, or observability maturity cannot support real-time control of the blast radius. section 13.7.1
  • Consider production the final validation loop when traffic controls can quickly confine failures to a small group of users. section 13.7.1
Figure 13.11 The Staging Dilemma: Traditional staging often promises perfect parity, but in reality, it frequently drifts from production, offering a false sense of security.

The staging dilemma illustrates how a nominally production-like environment can drift and offer false confidence. section 13.7

How Grokking Software Architecture covers it

How deep it goes
Compares staging with production and gives a decision rule based on compliance, observability, and failure isolation.
Examples
Contrasts drifting staging environments with controlled live exposure through dark launching, inversion feature flags, and canary proxies.
What it assumes
Assesses compliance constraints, data privacy, observability maturity, and the ability to isolate production failures quickly.
What you can do after
Evaluate whether compliance, observability, and traffic controls justify production validation or require a physical staging gate.
How it connects
Connects testing in production with staging environments, feature flags, and dark launching.

Also explained in

Compare how 2 books explain testing in production →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.