Soru

Zorluk: KolayConfigure Azure Container Instances (ACI)

You are deploying different containerized workloads to Azure Container Instances (ACI). Match each workload execution requirement to the most appropriate container restart policy.

  • A continuous web server that must remain running and restart automatically if it crashes or stops.Always
  • A data migration task that runs to completion once, but must retry if the process terminates with an error.OnFailure
  • A one-time setup script that should execute only once and must never be restarted under any circumstance.Never

Cevap

Continuous web server matches with Always restart policy; data migration task matches with OnFailure restart policy; one-time setup script matches with Never restart policy.
The correct matches align the execution patterns with their corresponding ACI restart policies. A continuous web server aligns with Always to maintain availability. A batch processing migration that should retry only on error aligns with OnFailure. A script that must run once and never rerun under any condition aligns with Never.

Adım Adım Çözüm

1
Determine the restart requirement for the continuous web server.
Since the server must stay online indefinitely and restart if it stops for any reason, the Always restart policy is required.
The Always policy ensures container groups are restarted upon exit regardless of the exit code.
2
Determine the restart requirement for the data migration task.
Since the task runs once but must be retried only if it fails, the OnFailure restart policy is required.
The OnFailure policy restarts containers only if they exit with a non-zero code, indicating a failure.
3
Determine the restart requirement for the one-time setup script.
Since the script must not run again even if it exits with an error or succeeds, the Never restart policy is required.
The Never policy ensures the container group is never restarted after execution stops.

Anahtar Kavram

Azure Container Instances supports restart policies (Always, Never, and OnFailure) that determine whether containers restart when their execution terminates.
Bu soruyu puanla