liveBook · Manning

Canary deployment

As explained in Grokking Software Architecture

A deployment strategy that gradually routes a controlled fraction of live traffic to a new software release before expanding the rollout.

A canary deployment sends a small, controlled share of live traffic to a new release before expanding it. Like miners’ canaries, the small group can reveal danger early: if the release causes problems, most users remain on the trusted version. section 13.3.3

Turn the traffic dial gradually

Send 2% of Order Service requests to version 2.0 and leave 98% on version 1.0. Watch errors and completed checkouts; if the canary stays healthy, increase its share to 10%, 25%, then 50%, and eventually the whole system. If it fails, remove the canary. section 13.3.3

The tradeoff is controlled exposure in exchange for more operational work:

  • A small traffic share limits the blast radius and lets the release face real production behavior. section 13.3.3
  • Old and new versions run concurrently, so routing must keep users on one version during a session. The setup also requires close monitoring and carries a larger dual-version footprint. section 13.3.3
  • Watch for data divergence: canary instances writing a changed data layout can conflict with the legacy assumptions of the main fleet. section 13.3.3
  • Choose canaries when containing the blast radius matters most, especially when microservices need validation under genuine load; expect greater instrumentation complexity. section 13.3.5
Figure 13.3 Canary Deployment: Routing a small, controlled slice of production traffic to new code allows you to validate system behavior before a full-scale rollout.

See how a small, controlled slice of production traffic reaches the new release before a full rollout. section 13.3.3

How Grokking Software Architecture covers it

How deep it goes
Explains traffic percentages, monitoring, rollout progression, and concurrency risks.
Examples
Routes 2% of Order Service traffic to version 2.0, then raises exposure through 10%, 25%, and 50%.
What it assumes
Assumes network routing and production observability are available to direct traffic and monitor release health.
What you can do after
Evaluate whether blast-radius containment justifies added complexity, particularly when validating microservices under genuine load.
How it connects
Compares canaries with rolling updates and blue-green deployments, and ties them to observability, session affinity, and data divergence.

Also explained in

Compare how 11 books explain canary deployment →

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.