An administrator is planning the deployment of two containerized workloads to Azure Container Instances (ACI):
- A web application container that must run continuously to process incoming HTTP requests.
- A daily data processing container that runs once every 24 hours to aggregate logs, write them to an Azure Storage account, and then exit.
The administrator must minimize ACI compute costs and administrative overhead.
Which deployment architecture and configuration should the administrator implement?
- ADeploy both containers in a single container group, and set the restart policy of the container group to Always.
- BDeploy both containers in a single container group, and set the restart policy of the container group to OnFailure.
- Deploy the web application in a container group with a restart policy set to Always. Deploy the data processing workload in a separate container group with a restart policy set to Never, and trigger it daily using an Azure Logic App.Answer
- DDeploy the web application in a container group with a restart policy set to OnFailure. Deploy the data processing workload in a separate container group with a restart policy set to Always, and configure the container to run a script that sleeps for 24 hours between executions.
Answer
Deploy the web application in a container group with a restart policy set to Always, and deploy the data processing workload in a separate container group with a restart policy set to Never, triggering it daily using an Azure Logic App.
Deploying the continuous web application and the ephemeral daily task in separate container groups is the correct approach. It allows the web application's group to be configured with the Always restart policy to ensure high availability, while the daily task's group is configured with the Never or OnFailure policy. Triggering the daily group externally via an Azure Logic App ensures resources are only provisioned and billed during the execution time, minimizing compute costs.
Step-by-Step Solution
Key Concept
Azure Container Instances (ACI) restart policies and multi-container group lifecycle management
Estimated Time:2m 0s