AlgoViz

Controlling exposure during a release

medium 7 min

Traffic controls vary both load and exposure.

Video lesson · Chapter 1 of 4

Healthy fleet averages hide a bad canary

0:00 / 2:19

Theory

Read or listen first. About 2 min.

What it is

Traffic controls vary both load and exposure. A rate limiter shapes admission, load shedding preserves capacity under distress and graceful degradation removes optional work. A canary is a bounded test against a control population. A mirrored request must avoid duplicate side effects and its response does not determine the user’s result.

Why it exists

A new version receives a small fraction of traffic and the fleet average looks normal. Compare per-version counts, denominators and input mix. Make the observation window long enough for the relevant failure mode but short enough to contain exposure. A rollback of application code may leave changed data behind, so verify compatibility in both directions.

If both cohorts degrade together, investigate common dependencies and traffic changes before attributing impact to the release.

Healthy fleet averages hide a bad canary

Traffic router → Canary cohort (candidate share). Traffic router → Control cohort (control share)
Traffic router → Canary cohort (candidate share). Traffic router → Control cohort (control share)

Inside this chapter

Rate Limiting algorithms (Token Bucket, Leaky Bucket)
A token bucket accumulates bounded burst credit. A leaky-bucket-style shaper smooths outgoing work. Select the behavior according to downstream capacity and acceptable queuing.
Load Shedding strategies
Load shedding rejects lower-priority or excess work before it consumes a saturated resource. Retrying every rejection immediately can negate the protection.
Graceful Degradation
A degraded path omits optional work while preserving the essential operation. Define what users receive and how to observe the degraded mode independently from complete success.
Canary Deployments
A canary exposes a limited cohort to a candidate and compares an outcome to a suitable control. Use enough representative samples to interpret the difference.
Blue-Green Deployments
Blue-green deployment keeps two environments for switching traffic. External state remains shared or needs migration, so a route switch alone may not undo an incompatible data change.
Feature Flags and Progressive Rollouts
A flag separates release of code from exposure of behavior. Define defaults, ownership and cleanup. Long-lived combinations increase the number of states the team must reason about.
Traffic Mirroring (Shadow Traffic)
Mirroring copies selected traffic to a shadow target. Prevent duplicate side effects and handle sensitive data appropriately. Shadow responses do not establish the real user’s outcome.

How it works

Step through the idea, or press Play.

Step 1 of 4

Start with a control. The current version serves a representative baseline.

Understand it

Worked incident

Healthy fleet averages hide a bad canary

ObservationCanary failures per 1000 (failures)Interpretation
Baseline1The baseline canary and control have comparable errors.
Incident32The candidate fails 32 of 1000 comparable requests while the control remains stable.
After intervention2Stop promotion and withdraw the candidate. Verify the affected path against the control.
Illustrative measurements from the same workload at three checkpoints.

Choose the next investigation

If both cohorts degrade together, investigate common dependencies and traffic changes before attributing impact to the release.

Summary

The whole topic in one minute.

A small harmful cohort is diluted by the healthy majority. Cohort-level harm supports earlier containment.

If both cohorts degrade together, investigate common dependencies and traffic changes before attributing impact to the release.

Sources