Canary Analysis
The SRE Workbook's automated canary analysis methodology: metric selection, baseline comparison, automated rollout decisions, and why canarying catches what staging cannot.
Overview
A controlled experiment on live traffic
SRE Workbook Chapter 16, Canarying Releases, defines a canary as 'a small, controlled experiment on live production traffic that uses real user data to evaluate whether a binary change is safe to fully release.' The key words are live, real and controlled.
In practice, you split production traffic. A small share goes to the canary, which runs the new binary. Another share goes to a baseline, which runs the stable binary at the same time. The two sets of metrics are compared as distributions, and an automated verdict follows: a pass promotes the new binary, and a fail rolls it back.
> [!IMPORTANT] A binary can pass every staging test and still fail on 0.01% of production requests. The canary exposes that before it reaches all users.
Key concepts
- Canary
- Baseline
- Automated canary analysis
- Canary bake time
- Progressive rollout
Interview questions
- How do you design a canary analysis strategy for a payments service with 10,000 QPS?
Sign up free to read the full topic
More SRE topics
Start free on Cariara · Coding problems · System design studio