Part 13 · CI/CD, Git & Cloud

Progressive delivery, rollback và database migrations

Deploy thay binary, release thay user behavior; feature flags và progressive traffic tách hai thời điểm nhưng thêm lifecycle.

Strategies

Rolling resource-efficient/mixed versions; blue-green fast switch/double capacity/data still shared; canary limited blast radius/needs routing+analysis; recreate downtime/simple. Chọn theo SLO, capacity, state và observability.

Verification

Health/readiness chỉ baseline. Automated canary compare user SLI, error/latency/saturation/business metrics với control và enough traffic/window. Abort on guardrails; human approval cho high-risk context, không thay automation.

Feature flags

Release toggle, experiment, ops kill switch và permission flags khác semantics. Owner/expiry/default/failure behavior/audit; stale flags tăng paths/testing. Server-side authorization không giao cho UI flag.

Database

Expand compatible schema → deploy code hỗ trợ old/new → backfill checkpoint/throttle → switch reads/writes → verify → contract. Migration job singleton/idempotent. Rollback app không đọc được data format mới là trap; forward fix/reconciliation often needed.

GitOps

Desired deployment state trong Git, controller reconcile environment. Pull model giảm direct credentials nhưng repo write/admission/controller identity vẫn sensitive. Drift/reconciliation và emergency change phải có audit path.

Tài liệu: Deployments with GitHub Actions · Argo CD · Deployment Stamps