Back to blog

Blue-Green & Canary Deployment Diagrams: Zero-Downtime Release Patterns (2026)

How to create blue-green and canary deployment architecture diagrams. Covers traffic shifting, rollback, feature flags, shadow deployments, and progressive delivery — with AI prompt templates.

R
Ryan·Senior AI Engineer
·

Deployment strategy diagrams visualize how new software versions reach production safely — showing the traffic routing infrastructure, rollback mechanisms, and health-check gates that allow teams to release without downtime or user impact. Blue-green deployments, canary releases, rolling updates, and shadow deployments each represent a different risk/speed trade-off for getting code to users. These diagrams are essential for release engineering reviews, runbooks, and onboarding engineers to the deployment pipeline.

This guide covers the four main zero-downtime deployment patterns, the infrastructure components that power them, and prompt templates for generating accurate deployment diagrams with AI.

Blue-green deployment

A blue-green deployment maintains two identical production environments — "blue" (currently live) and "green" (new version). Traffic is shifted atomically from blue to green once green passes health checks. Rollback is a single DNS or load-balancer pointer swap back to blue.

Key trade-off: Instant rollback and zero-downtime cutover, but requires double the infrastructure capacity during the transition period. Database schema changes must be backwards-compatible with both versions simultaneously.

"A blue-green deployment on AWS: an Application Load Balancer routes 100% of production traffic to the Blue target group (3 EC2 instances running v1.2.0). The Green target group (3 EC2 instances running v1.3.0) is provisioned in parallel and passes health checks. A deployment pipeline (GitHub Actions) runs smoke tests against the green environment via a staging listener rule. On approval, the ALB listener rule is updated to route 100% of traffic to the Green target group. The blue instances are kept warm for 30 minutes (rollback window) then terminated. Both target groups share the same RDS Postgres instance — migrations use expand-contract to support both versions."

Canary deployment

A canary deployment routes a small percentage of production traffic to the new version while the rest continues to use the stable version. If error rates and latency remain within thresholds, the canary percentage is gradually increased until 100% of traffic is on the new version.

Key trade-off: Real production traffic validation with limited blast radius. The drawback is complexity — you need weighted routing, per-version observability, and automated rollback triggers based on SLOs.

"A canary deployment on Kubernetes using Argo Rollouts: the Rollout resource starts with 5% of pods on v2.0 (canary) and 95% on v1.9 (stable). Argo Rollouts uses a weighted Istio VirtualService to split traffic. After 10 minutes, Datadog metrics are analyzed: if p99 latency < 300ms and error rate < 0.1%, traffic advances to 25%, then 50%, then 100% with 10-minute pauses between steps. If any SLO is breached, Argo Rollouts automatically rolls back to 100% stable traffic and pages the on-call engineer via PagerDuty. Canary pods share the stable Postgres database — no schema divergence."

Rolling deployment

A rolling deployment updates instances or pods one at a time (or in small batches), replacing old versions incrementally without maintaining a parallel environment. At any point during the rollout, both old and new versions are simultaneously serving traffic.

Key trade-off: Low infrastructure overhead and simple to operate, but rollback requires a new rolling deploy in reverse (slower than blue-green). Mixed-version traffic during the rollout window requires backwards-compatible APIs.

"A Kubernetes rolling deployment: a Deployment resource with 10 replicas, maxSurge 2, maxUnavailable 1. The update strategy updates 2 pods at a time — terminates old pods and starts new v2.1 pods, waiting for readiness probes to pass before proceeding. A PodDisruptionBudget ensures at least 9 pods are available at all times. The HorizontalPodAutoscaler monitors CPU and scales between 5–20 replicas. Old and new pods both serve the API during the rollout — API versioning ensures backwards compatibility. Rollback via kubectl rollout undo reverts to the previous ReplicaSet."

Shadow deployment (traffic mirroring)

A shadow deployment mirrors a copy of production traffic to the new version without affecting real users. The shadow version processes requests and can write to a shadow database, but its responses are discarded. This is used for load testing, validating new ML models, or testing performance-critical changes against real traffic patterns.

"A shadow deployment using Istio traffic mirroring: 100% of production requests to the Payment Service v1 are mirrored (cloned) to Payment Service v2 Shadow. The shadow service processes requests against a shadow Postgres database (copy of production schema, no real writes to the payment processor). Responses from the shadow are discarded — real users only see v1 responses. A comparison service logs v1 and v2 response diffs to Datadog for analysis. After 2 weeks of shadow traffic with no unexpected diffs, the team promotes v2 to a canary deployment."

Deployment strategy comparison

StrategyRollback speedInfrastructure costUser impactComplexity
Blue-greenInstant (pointer swap)2× during deployZero downtimeMedium
CanaryFast (reroute traffic)Small overheadMinimal (small % affected)High
RollingSlow (reverse rolling)MinimalMixed versions in-flightLow
ShadowN/A (no user traffic)2× during shadow phaseNoneHigh
Feature flagsInstant (flag toggle)MinimalPer-user targetingMedium

Progressive delivery with feature flags

"A progressive delivery pipeline: code is deployed to 100% of servers on every merge to main (continuous deployment). Feature flags (LaunchDarkly) control which users see new features. A new checkout redesign is initially enabled for 1% of users (internal beta), then 10% (employee test accounts), then 25% (users who opted into early access), then 100% after 7 days with no increase in cart abandonment rate. The flag evaluation happens client-side in the React app. Rollback is a LaunchDarkly flag toggle — no redeployment needed. Flag state is also used by the backend to A/B test a new tax calculation algorithm."

What to annotate on deployment diagrams

  • Traffic split percentages: Show the exact weight (e.g., 95% stable / 5% canary) on routing components — this is the key variable that changes over time during a progressive rollout
  • Health check and SLO gates: Label the automated gates that must pass before traffic advances — error rate thresholds, latency percentiles, and business metrics like conversion rate
  • Rollback trigger and path: Show the rollback path explicitly (dashed arrow back to stable) and what triggers it — automated SLO breach or manual approval
  • Database compatibility: Note whether the database schema is shared between versions and whether migrations use expand-contract — mixed-version traffic with incompatible schemas is the most common source of deployment incidents
  • Warm-up / pre-traffic period: Annotate any JVM warm-up, cache priming, or connection pool establishment steps that must complete before a new instance is eligible to receive production traffic

Related guides: GitOps architecture diagrams, Kubernetes architecture examples, CI/CD pipeline diagrams, and DevSecOps architecture diagrams.

Ready to try it yourself?

Start Creating - Free