03 — Deploy & Serve

A/B & Canary Rollouts#

Deployment✓ Mathematical
◆ The PatternShip models safely with progressive traffic splitting

Deploying a new model to 100% of traffic is reckless. Canary rollouts send a small fraction (1–5%) of traffic to the new model while monitoring metrics. Blue-green deploys keep the old version warm for instant rollback. A/B tests run both models simultaneously to measure real-world lift.

// Interactive — canary traffic split
Canary %5%
# Kubernetes canary with Istio traffic split
# VirtualService:
#   http:
#   - route:
#     - destination:
#         host: model-service
#         subset: stable
#       weight: 95
#     - destination:
#         host: model-service
#         subset: canary
#       weight: 5
Rollback triggers: Define automatic rollback criteria before deploying — e.g., if p99 latency exceeds 200ms or error rate exceeds 1%, revert immediately.
Pattern bridge: Canary rollouts apply the same risk management as position sizing — start small, scale up only when evidence confirms safety. The Bayesian A/B framework from The Toolkit directly applies to evaluating canary metrics.
← Previous
Serving Patterns
Open in the full reader, with the topic sidebar →