AZ-305 Question 211
Select 2A company hosts an on-premises ASP.NET monolithic application consisting of a web front-end that must scale automatically and a background job that runs nightly. They want to migrate to Azure with minimal code modifications, optimize operating costs, and reduce management overhead. Which two Azure migration approaches should you recommend to meet these requirements?
- A
Migrate both the front-end and the background job to Azure Virtual Machines with an availability set and a scheduled task.
- B
Deploy the front-end to Azure App Service and run the background job as an Azure WebJob.
- C
Containerize the entire solution in Azure Kubernetes Service (AKS) to leverage microservices architecture.
- D
Deploy the front-end to Azure App Service and reimplement the background job on Azure Functions with a Timer trigger.
- E
Move all components to Azure Container Instances for container-based hosting without additional orchestration.
Show answer and explanation
Correct answers: B, D
Explanation
Using Azure App Service for the front-end offloads many operational tasks (patching, scaling, infrastructure management), which is in line with a PaaS approach. Azure App Service supports WebJobs natively, allowing you to run background processes in the same environment with minimal code changes. Alternatively, if the background job can be split out, Azure Functions with a Timer trigger offers a serverless, pay-per-execution model that can be more cost-effective for low-frequency tasks. For more information, refer to the official Microsoft documentation on Azure App Service (https://learn.microsoft.com/azure/app-service) and Azure Functions (https://learn.microsoft.com/azure/azure-functions/).
- A. Incorrect.
Option 1: Migrate both the front-end and the background job to Azure Virtual Machines. (Incorrect) While moving everything to VMs can minimize code changes, Azure VMs require ongoing OS maintenance, patching, and management. Additionally, cost optimization and auto-scaling for the front-end are more complex compared to using PaaS solutions like Azure App Service.
- B. Correct.
Option 2: Deploy the front-end to Azure App Service and run the background job as an Azure WebJob. (Correct) This approach offers a straightforward way to handle existing .NET background tasks with minimal code changes. App Service provides built-in auto-scaling capabilities, and WebJobs can run the background process seamlessly using the same code base.
- C. Incorrect.
Option 3: Containerize the entire solution in Azure Kubernetes Service (AKS). (Incorrect) AKS is useful for microservices or container-based applications, but migrating a legacy monolithic application to a container-orchestrated environment typically requires more extensive refactoring and management overhead. This goes beyond 'minimal code modifications.'
- D. Correct.
Option 4: Deploy the front-end to Azure App Service and reimplement the background job on Azure Functions with a Timer trigger. (Correct) Azure Functions allow scheduling background tasks easily, and migrating a nightly job often requires only minor refactoring. App Service still provides fully managed auto-scaling for the web front-end, reducing infrastructure management.
- E. Incorrect.
Option 5: Move all components to Azure Container Instances for container-based hosting without additional orchestration. (Incorrect) While Azure Container Instances can host containers without managing VMs or orchestrators, migrating a monolithic application directly to containers may require more redevelopment effort than running it on App Service. It also lacks some of the scaling and integration features offered by App Service and Functions.