Restarting Azure Container Instances (ACIs) for Unresponsive Apps | Contoso

Restart ACI1 when App1 stops responding

Question

You have an Azure DevOps organization named Contoso and an Azure subscription.

You use Azure DevOps to build a containerized app named App1 and deploy App1 to an Azure container instance named ACI1.

You need to restart ACI1 when App1 stops responding.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B

For containerized applications that serve traffic, you might want to verify that your container is ready to handle incoming requests. Azure Container Instances supports readiness probes to include configurations so that your container can't be accessed under certain conditions. The readiness probe behaves like a

Kubernetes readiness probe. For example, a container app might need to load a large data set during startup, and you don't want it to receive requests during this time.

YAML is used to setup a liveness probe.

https://docs.microsoft.com/en-us/azure/container-instances/container-instances-readiness-probe

Option A is correct: Add a liveness probe to the YAML configuration of App1.

A liveness probe is used to determine if a container is running and responding to requests. If the probe fails, Kubernetes automatically restarts the container. In this case, App1 is deployed to an Azure container instance named ACI1, which is managed by Kubernetes. Therefore, adding a liveness probe to the YAML configuration of App1 will enable Kubernetes to restart the container if App1 stops responding.

Option B is incorrect: Add a readiness probe to the YAML configuration of App1.

A readiness probe is used to determine if a container is ready to serve requests. If the probe fails, Kubernetes stops sending traffic to the container until the probe passes again. A readiness probe is not useful in this scenario because it does not cause Kubernetes to restart the container if the container stops responding.

Option C is incorrect: Use Connection Monitor in Azure Network Watcher.

Connection Monitor in Azure Network Watcher is used to monitor network connectivity between virtual machines, virtual networks, and on-premises networks. It is not used to monitor container instances or to restart a container when an application stops responding.

Option D is incorrect: Use IP flow verify in Azure Network Watcher.

IP flow verify in Azure Network Watcher is used to verify if traffic is allowed or denied between two endpoints. It is not used to monitor container instances or to restart a container when an application stops responding.