QA
Senior LevelSoftware Engineering Principles

Compare Zero-Downtime Deployment Strategies: Blue-Green vs Canary vs Rolling Updates.

❓ Interview Prompt: Compare Blue-Green Deployments (instant router cutover), Canary Deployments (percentage-based traffic splitting), and Rolling Updates (instance-by-instance replacement).

Evaluating zero-downtime deployment strategies:

| Strategy | Mechanism | Rollback Speed | Resource Cost |

|---|---|---|---|

| Rolling Update | Replaces old container instances with new ones step-by-step | Slower (requires rolling back instances) | Low ($100\%$ capacity) |

| Blue-Green | Maintains 2 identical environments; router switches $100\%$ traffic | Instant (switch router back to Blue) | High ($200\%$ capacity during deploy) |

| Canary | Routes small traffic percentage ($1\% \rightarrow 10\% \rightarrow 100\%$) to new version | Instant (route $100\%$ back to stable version) | Low to Moderate |

Code Implementation Example

yaml
# Kubernetes Deployment RollingUpdate Strategy Config
spec:
  replicas: 10
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 2        # Create 2 extra new pods during deploy
      maxUnavailable: 0  # Zero pods offline during deploy!
💡Configuring Kubernetes zero-downtime RollingUpdate parameters.
🎯 Interview Key Takeaway

Choose Blue-Green for instant full cutovers, Canary for high-risk releases, and Rolling Updates for cost-effective capacity usage.

#Deployments#Blue-Green#Canary#Rolling Update#Senior
Back to all Software Engineering Principles Questions→

More Software Engineering Principles Interview Questions

Beginner LevelSoftware Engineering Principles

Explain the 5 SOLID Principles of Object-Oriented Software Design with practical refactoring examples.

Beginner LevelSoftware Engineering Principles

What are DRY (Don't Repeat Yourself), KISS (Keep It Simple, Stupid), and YAGNI (You Aren't Gonna Need It)?

Beginner LevelSoftware Engineering Principles

Why is Composition Over Inheritance a fundamental object-oriented design principle?