You are deploying different containerized workloads to Azure Container Instances (ACI). You need to configure the appropriate restart policy for each workload. Match each workload scenario to its corresponding container group restart policy.
- A containerized API gateway that listens for incoming HTTP requests and must remain continuously available.Always
- A nightly batch job that downloads transaction files, updates a database, and must terminate when the task completes successfully or retry if the container exits with an error.OnFailure
- A database schema migration container that runs a setup script once upon deployment, and must not execute again even if the initialization fails.Never
Answer
The API gateway matches the Always restart policy; the nightly batch job matches the OnFailure restart policy; the database schema migration matches the Never restart policy.
Matching the API gateway to Always ensures continuous uptime. Matching the batch job to OnFailure ensures retries only occur when errors happen. Matching the database migration to Never prevents unintended reruns.
Step-by-Step Solution
Key Concept
Azure Container Instances restart policies determine the container lifecycle behavior based on exit conditions.
Estimated Time:1m 30s