← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

Rolling Deployment

DevOps Intermediate
debt(d7/e5/b5/t7)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). Kubernetes/Helm config can be inspected, but mixed-version compatibility issues during rollout typically only surface via Datadog monitoring or staging tests, not automated detection.

e5 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor in one component' (e5). The quick_fix is a config tweak (e1), but properly supporting rolling deploys requires backward-compatible migrations and API contracts across the app — a multi-file refactor.

b5 Burden Structural debt — long-term weight of choosing wrong

Closest to 'persistent productivity tax' (b5). Every schema change and API change must now be designed for mixed-version coexistence, slowing many work streams across web/api contexts.

t7 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'serious trap' (t7). The misconception is explicit: developers assume rolling is universally safer than blue-green, but mixed-version exposure contradicts that intuition and can break users mid-deploy.

About DEBT scoring →

Also Known As

rolling update rolling deploy gradual rollout

TL;DR

Gradually replacing old application instances with new ones, a few at a time, so the service remains available throughout the upgrade.

Explanation

A rolling deployment updates servers sequentially — draining a server of active connections, deploying the new version, verifying health, then moving to the next. At any point during the rollout, both old and new versions serve traffic simultaneously. This means: database migrations must be backward compatible with both versions, API contracts must not have breaking changes, and feature flags may be needed to gate new behaviour. Rolling deployments are simpler than blue/green (no duplicate infrastructure) but slower to roll back — you must roll forward through the remaining servers or trigger a reverse rolling update. Kubernetes performs rolling updates natively via Deployment resources.

Common Misconception

Rolling deployments are always safer than blue-green. Rolling updates expose users to mixed versions simultaneously — if old and new code are incompatible (e.g. different DB schema expectations), some requests will fail during the rollout window. Blue-green avoids this by cutting over atomically.

Why It Matters

Rolling deployments update servers one by one rather than all at once — at any point, some servers run the old version and some the new, providing gradual rollout without a full traffic cutover.

Common Mistakes

  • Database migrations that break the old code version — both versions run simultaneously during a rolling deploy.
  • Not handling mixed-version traffic in the application — old and new API contracts must coexist during rollout.
  • Rolling too fast — updating all servers before monitoring shows the new version is healthy.
  • No rollback plan — if the new version has issues, rolling back means going through the same process in reverse.

Code Examples

✗ Vulnerable
# Rolling deploy with breaking DB migration — causes errors:
# Step 1: Run migration that renames column 'user_name' to 'username'
# Step 2: Start deploying new code that uses 'username'
# Step 3: Old code still running on 50% of servers uses 'user_name' — errors!
# Fix: expand-contract — add 'username', dual-write, then remove 'user_name'
✓ Fixed
# Kubernetes — rolling update (default strategy)
apiVersion: apps/v1
kind: Deployment
spec:
  replicas: 4
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1   # at most 1 pod down at a time
      maxSurge: 1         # at most 1 extra pod above replica count
  template:
    spec:
      containers:
      - name: app
        image: myapp:v2.5.0  # change this to trigger rolling update
        readinessProbe:
          httpGet: { path: /health, port: 9000 }
          # pod only receives traffic once /health returns 200

# kubectl rollout status deployment/myapp
# kubectl rollout undo deployment/myapp   ← instant rollback

Added 15 Mar 2026
Edited 22 Mar 2026
Views 53
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 1 ping W 1 ping T 0 pings F 0 pings S 0 pings S 1 ping M 0 pings T 1 ping W 1 ping T 0 pings F 1 ping S 1 ping S 0 pings M 2 pings T 0 pings W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 1 ping W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W
No pings yet today
No pings yesterday
Amazonbot 10 Perplexity 8 Scrapy 5 ChatGPT 4 Ahrefs 4 SEMrush 3 Google 2 Claude 2 Meta AI 1
crawler 35 crawler_json 4
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: Medium
⚡ Quick Fix
Configure Kubernetes rolling updates with maxUnavailable: 0 and maxSurge: 1 — this brings up one new PHP pod before terminating an old one, ensuring zero downtime
📦 Applies To
any web api
🔗 Prerequisites
🔍 Detection Hints
Deployment requiring all instances down simultaneously; no rolling update strategy configured; PHP deployment causing downtime window
Auto-detectable: ✗ No kubernetes helm datadog
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: Medium ✗ Manual fix Fix: High Context: File


✓ schema.org compliant