Calculate rollout timeline and exposure percentage for a staged canary deployment.
A canary deployment gradually shifts traffic from the stable version to a new version in stages, evaluating health metrics at each stage before proceeding: starting at canary%, incrementing by the step size, and holding for the evaluation period at each stage until reaching 100%. Total rollout time is the number of stages multiplied by the evaluation period per stage, giving a predictable timeline for a fully automated progressive delivery pipeline.
totalRolloutTime = stages × evaluationPeriod
It should be long enough to capture a representative sample of traffic and surface delayed failure modes (e.g. memory leaks, cache warm-up issues) — 10-30 minutes is common for high-traffic services; low-traffic services may need longer to gather statistically significant data.
Many teams prefer smaller early steps (5% → 10% → 25% → 50% → 100%) to limit blast radius while confidence is low, then larger steps later once the canary has proven stable.
Error rate, latency percentiles (p95/p99), and any business-specific health signals compared between the canary and stable baseline — most canary automation (Flagger, Argo Rollouts) supports defining these as promotion gates.
Blue-green switches all traffic at once between two fully-provisioned environments, while canary progressively shifts a fraction of traffic, allowing early detection of issues with limited exposure before full rollout.