Managing Service Deployment
1. Using Blue-Green Deployment
| Step | Detail |
|---|---|
| Two envs | Blue (live) + Green (new) |
| Switch | Flip LB to green |
| Rollback | Flip back instantly |
| Cost | 2× capacity during cutover |
2. Implementing Canary Releases
| Step | Detail |
|---|---|
| Route % | 1% → 10% → 50% → 100% |
| Health gates | Auto promote/abort on metrics |
| Tools | Argo Rollouts, Flagger |
3. Using Rolling Updates
| Param | Detail |
|---|---|
| maxSurge | Extra pods during update |
| maxUnavailable | Pods that may be down |
| Readiness probe | Required for safe rolling |
4. Implementing Feature Toggles
| Type | Use |
|---|---|
| Release | Hide unfinished work |
| Experiment | A/B |
| Ops | Kill switch |
| Permission | Per-user gating |
| Tools | LaunchDarkly, Unleash, Flagsmith |
5. Using A/B Testing
| Element | Detail |
|---|---|
| Hypothesis | Metric to move |
| Bucketing | Sticky per user |
| Statistical significance | Sample size up front |
6. Implementing Shadow Deployment
| Aspect | Detail |
|---|---|
| Mirror traffic | To new version; ignore response |
| Compare | Latency, error, output |
| Risk | Side-effects (writes) — read-only safe |
7. Managing Deployment Pipelines
| Stage | Detail |
|---|---|
| Build | Compile, unit, SAST/SCA |
| Test | Integration, contract, security |
| Stage | Smoke, perf |
| Prod | Canary → full |
| Tools | GitHub Actions, GitLab CI, Argo CD |
8. Implementing Rollback Strategies
| Method | Detail |
|---|---|
| Image revert | Redeploy previous tag |
| GitOps | git revert → reconcile |
| Schema | Backward-compatible migrations |
| Forward-fix | Sometimes safer |
9. Using Infrastructure as Code
| Tool | Scope |
|---|---|
| Terraform / OpenTofu | Cloud + multi-provider |
| Pulumi | Real code |
| CloudFormation / CDK | AWS |
| Crossplane | Cloud via K8s |
10. Implementing Zero-Downtime Deployment
| Requirement | Detail |
|---|---|
| Backward-compat schema | Expand → migrate → contract |
| Graceful shutdown | Drain conns, finish in-flight |
| Readiness probes | Gate traffic |
| Connection draining | LB awareness |
11. Managing Database Migrations
| Step | Detail |
|---|---|
| Expand | Add new col/table; nullable |
| Migrate | Backfill in batches |
| Contract | Drop old col after deploy |
| Tools | Flyway, Liquibase |
12. Using Deployment Tools
| Tool | Use |
|---|---|
| Argo CD / Flux | GitOps |
| Argo Rollouts / Flagger | Progressive delivery |
| Helm / Kustomize | K8s manifests |
| Spinnaker | Multi-cloud pipelines |