Node.js & Libuv•Part 5: Production Scale, Deployment & Observability (51 - 60)
Zero-Downtime Deployments (Rolling vs Blue-Green).
In Simple Words:
- Rolling Update: Kubernetes updates pods incrementally, waiting for readiness probes before terminating older pods.
- Blue-Green: Provisions an entirely new green environment, verifies health, and switches traffic instantly at the load balancer level.
yaml
# Kubernetes RollingUpdate deployment spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1 # Max 1 extra pod during rollout
maxUnavailable: 0 # 100% capacity maintained throughout update