BeginnerCoder

Lesson 13 — Canary rollout

Release to a few users first

A canary rollout sends a new version to a small share of traffic first — 10%, then 25%, 50%, 100% — and watches the error rate at each stage. If errors jump, the rollout stops and the old version keeps serving most users. (The name comes from canaries miners took underground as an early warning.)

Note: real DevOps tools (CI servers, load balancers, Docker, Kubernetes) cannot run in your browser, so this exercise is a small plain-JS simulation of the logic those tools use.

Why it matters: a bad release hurts 10% of users for a few minutes instead of everyone.

Want it another way?
Task

Stop the rollout when a stage error rate is above 2: log "Stop at N% (errors X%)" and break.

Run your code — when the output matches the task, you will see a green check. Then mark the lesson complete.

← Back
Next →
Test your knowledge

A quick 3-question quiz on this lesson — instant feedback.

Enjoying this lesson? Share it.