CI/CD & DevOps11 min readPublished: 2026-09-08

Zero-Downtime Deployments: Implementing Canary and Blue-Green Strategies

Comprehensive guide to eliminating deployment downtime: traffic shifting at the ingress layer, stateful schema changes, and automated health verification.

CPL

CloudPlatformLabs Engineering

Platform Architecture Team

Back to all guides

1. Blue-Green Deployments Explained

In Blue-Green deployment architecture, two identical production environments exist side by side. 'Blue' runs current live traffic, while 'Green' hosts the newly deployed version. Full smoke and regression tests execute against Green in isolation.

Once tests pass, routing is switched instantaneously at the load balancer or ingress controller. If unforeseen production bugs appear, traffic can be diverted back to Blue in seconds without redeploying code.

2. Traffic Splitting at the Ingress Controller

Using NGINX Ingress or AWS Application Load Balancer annotations, you can route a tiny percentage of live user requests (e.g. 5%) to the new version (Canary) based on headers, cookies, or weighted routing.

ingress-canary.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: order-service-canary
  annotations:
    nginx.ingress.kubernetes.io/canary: "true"
    nginx.ingress.kubernetes.io/canary-weight: "10"
spec:
  rules:
  - host: api.cloudplatformlabs.dev
    http:
      paths:
      - path: /orders
        pathType: Prefix
        backend:
          service:
            name: order-service-v2
            port:
              number: 80

Related Topics & Tags

DevOpsZero DowntimeCanary DeploymentBlue GreenKubernetes
CPL

Written by CloudPlatformLabs Engineering

Platform Architecture Team

CloudPlatformLabs publishes independent, peer-reviewed cloud and DevOps architecture blueprints, hands-on tutorials, and infrastructure case studies. Our mission is to make advanced infrastructure engineering transparent, resilient, and developer-friendly.