Table of Contents
Question
You have an Azure web app that is deployed by using Azure Pipelines. You need to ensure that when a new version of the app is deployed to production, you can roll back to the previous version. The solution must meet the following requirements:
- Minimize downtime during the deployment.
- Minimize the time it takes for the rollback.
What should you use?
A. a single web app and two deployment slots
B. a single web app and two deployment pipelines
C. two web apps and an Azure Standard Load Balancer
D. two web apps and an Azure Traffic Manager instance
Answer
A. a single web app and two deployment slots
Explanation
The answer is A. a single web app and two deployment slots.
In Azure Web Apps, the best way to ensure easy rollbacks with minimal downtime is through the use of deployment slots. Deployment slots are live apps with their hostnames and are part of the Azure Web App. They allow you to test a new deployment without affecting the production app. You can swap content between slots easily, promoting or rolling back deployments with minimal downtime.
When you have a new version to deploy, you would deploy it to the staging slot first, then you would “swap” the staging and production slots, moving the new version into production. If something goes wrong, you can quickly swap back to the previous version, minimizing the time it takes for the rollback.
Here’s a brief explanation of why the other options are less appropriate:
B. A single web app and two deployment pipelines: Having two separate deployment pipelines doesn’t directly help with rollback. You’d still have to manually roll back an update from production, potentially leading to more downtime.
C. Two web apps and an Azure Standard Load Balancer: While this situation could technically handle rollbacks by redirecting traffic, it doesn’t minimize the deployment or rollback time, as the app would have to be duplicated on both web apps, leading to more resource usage and possible downtime during synchronization.
D. Two web apps and an Azure Traffic Manager instance: Similar to using an Azure Standard Load Balancer, this setup would also require maintaining duplicate web apps, increasing costs and complexity. Traffic Manager is more about global routing and not ideal for instant rollback as required in the question.
Reference
- Azure Web App Deployment Rollback | Harness Developer Hub
- Stage a web app deployment for testing and rollback by using App Service deployment slots – Training | Microsoft Learn
- Is there a way to rollback a deployment in Azure? – Stack Overflow
- Deployment best practices – Azure App Service | Microsoft Learn
Designing and Implementing Microsoft DevOps Solutions AZ-400 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Designing and Implementing Microsoft DevOps Solutions AZ-400 exam and earn Designing and Implementing Microsoft DevOps Solutions AZ-400 certification.