Deployment resiliency — quick notes
Deployment resiliency — quick notes
| Need | Mechanism |
|---|---|
| Detect after routing | Health-monitoring steps under postRouteTraffic |
| Automatic reversal | Authored recovery steps under on: failure |
| Recovery without rebuilding | Swap the same slots back, or disable the affected flagged feature |
| Limit exposure first | Canary / rolling |
| Serialise protected-resource use | Exclusive lock until the stage completes |
Key pairing: a health-monitoring step under postRouteTraffic can fail after routing; on: failure then runs authored recovery steps.
Trap: non-idempotent deployment scripts. Retries mean a step may run twice.
Lock trap: runLatest is the default. Use sequential when every queued run must proceed.
Flag trap: disabling a feature flag reverses only the behavior controlled by that flag, not unrelated deployment changes.
Sources: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/deployment-jobs · https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/on-success-or-failure-hook · https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals · https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots · https://learn.microsoft.com/en-us/azure/azure-app-configuration/concept-feature-management · https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-script-template