Question

Difficulty: Very hardConfigure Azure Container Instances (ACI)

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?

  1. A
    Deploy both containers in a single container group, and set the restart policy of the container group to Always.
  2. B
    Deploy both containers in a single container group, and set the restart policy of the container group to OnFailure.
  3. 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
  4. D
    Deploy 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

1
Analyze the execution lifecycles of the two workloads.
The web application must run continuously, whereas the data processing script is an ephemeral task that runs once daily.
Understanding the lifecycle differences helps determine whether they can share a container group's restart configuration.
2
Evaluate the scoping of ACI restart policies.
ACI restart policies (Always, Never, OnFailure) are applied at the container group level, affecting all containers in that group.
Since individual containers within a group cannot have different restart policies, workloads with mismatching execution models must be evaluated for separation.
3
Compare the cost and operational implications of shared vs. separated container groups.
Placing both in one group forces a shared restart policy, causing either infinite restart loops for the daily task or failure to reschedule it. Separating them allows the daily task to run only on-demand.
Separation satisfies the requirement to minimize compute billing by avoiding idle resource allocation or infinite execution loops.
4
Identify the orchestration mechanism for the daily task.
An Azure Logic App triggers the ephemeral container group's deployment or start action once every 24 hours.
ACI lacks built-in cron scheduling, requiring an external trigger such as Logic Apps or Azure Functions to automate the execution of the group configured with a 'Never' restart policy.

Key Concept

Azure Container Instances (ACI) restart policies and multi-container group lifecycle management
Estimated Time:2m 0s
Rate this question