Soru

Zorluk: OrtaConfigure Azure Container Instances (ACI)

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

Cevap

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.

Adım Adım Çözüm

1
Analyze the lifecycle requirements of the API gateway workload.
The API gateway must run indefinitely and handle continuous traffic, meaning it should always be restarted upon termination.
Web services require the Always restart policy.
2
Analyze the nightly batch job workload.
The batch job runs to completion. It should stop on success but restart if a failure occurs.
This behavior aligns with the OnFailure restart policy.
3
Analyze the database schema migration workload.
The migration script must run exactly once and must not rerun on failure.
To avoid corruption from duplicate attempts, the Never restart policy is required.

Anahtar Kavram

Azure Container Instances restart policies determine the container lifecycle behavior based on exit conditions.
Tahmini Süre:1m 30s
Bu soruyu puanla