Soru

Zorluk: OrtaConfigure Azure Container Instances (ACI)

An organization requires the deployment of three independent workloads using Azure Container Instances (ACI). Which container restart policy should be matched to each workload scenario to align with the specified operational requirements?

  • A telemetry collector that continuously listens for incoming IoT device data and must automatically recover if the container agent experiences a fault.Restart policy set to Always
  • A daily data validation utility that executes a check, reports status, and must restart only if the validation run terminates with an error code.Restart policy set to OnFailure
  • A data migration script designed to perform a one-time database schema upgrade and must not run again under any circumstances after its execution completes.Restart policy set to Never

Cevap

Match the telemetry collector to 'Restart policy set to Always', the daily data validation utility to 'Restart policy set to OnFailure', and the data migration script to 'Restart policy set to Never'.
Matching the continuous telemetry collector with the Always restart policy ensures it recovers from faults. Matching the daily validation utility with the OnFailure policy ensures it completes once successfully but retries if it fails. Matching the database schema upgrade with the Never policy prevents unintended execution attempts.

Adım Adım Çözüm

1
Evaluate the telemetry collector requirements.
The workload is continuous and requires high availability, needing recovery from any unexpected exits or faults.
For workloads that must run indefinitely, the Always restart policy is the correct choice because it restarts the container regardless of the exit code.
2
Evaluate the daily data validation utility requirements.
The utility is a run-to-completion task that should only restart if it terminates with an error code, and must remain stopped on successful completion.
The OnFailure restart policy restarts the container only when the process exits with a non-zero code, preventing duplicate executions upon success.
3
Evaluate the data migration script requirements.
The script runs once and must never execute again under any circumstances, even if it fails.
The Never restart policy disables all automated restarts, preventing a failed or succeeded migration script from running a second time.

Anahtar Kavram

Azure Container Instances (ACI) supports three restart policies: Always, OnFailure, and Never. Always is for continuous services, OnFailure is for run-to-completion tasks that need retry logic on error, and Never is for one-time tasks that must not run again.
Bu soruyu puanla