AZ-400 ยท Deployment strategies
Resilient deployments
Rollback and roll-forward, automated health checks and gates, retry and timeout settings, region-by-region (safe deployment practices), deployment idempotency, handling partial failures.
Key points
- Roll out in small groups (for example region by region) with health checks and bake time before the next group.
- Bake time should grow with each group.
- On problems: halt, then roll back to the last known good version or roll forward with a hotfix.
- Rollback is harder for data changes: keep schema changes backward compatible.
- Idempotent steps: a retry after a partial failure converges to the same result.
Source: https://learn.microsoft.com/en-us/azure/well-architected/operational-excellence/safe-deployments
Practice questions
In an Azure Pipelines deployment job, which hook is meant for rollback or clean-up steps when the deployment fails?
- preDeploy
- on: failure
- routeTraffic
- postRouteTraffic
Show answer
Answer: B. on: failure
on: failure runs the failure steps (and on: success runs after success). preDeploy initializes resources and routeTraffic serves traffic to the new version.
A release includes a database schema change. Which practices make recovery safer?
- Make schema changes backward compatible so old and new app versions both work
- Drop the old column in the same release as the new code
- Write migration scripts so they are safe to run twice
- Keep versioned build artifacts so you can redeploy a previous one
- Assume rolling back the app also reverts the data
Show answer
Answer: A. Make schema changes backward compatible so old and new app versions both work, C. Write migration scripts so they are safe to run twice, D. Keep versioned build artifacts so you can redeploy a previous one
Backward-compatible (expand then contract) changes let old and new app versions coexist, idempotent scripts survive retries, and versioned artifacts allow rolling back or forward. Dropping columns in the same release makes rollback impossible.
True or false: if smoke tests pass right after deployment, waiting a bake time before the next rollout group is unnecessary.
Show answer
Answer: False
False. Bake time lets different users, regions and usage patterns exercise the release; many issues appear only over hours or days.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
