Azure Container Instances CPU Limits vs Requests

Answer Correct answer: C — Remove the resource limit for both containers to cap their maximum usage at their resource request and prevent bursting.

You have an Azure subscription that contains a container group named Group1. Group1 contains two Azure container instances as shown in the following table. You need to ensure that container2 can use CPU resources without negatively affecting container1. What should you do? - image

  1. Increase the resource limit of container1 to three CPUs.
  2. Increase the resource limit of container2 to six CPUs.
  3. Remove the resource limit for both containers. Correct Answer
  4. Decrease the resource limit of container2 to two CPUs.

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

Removing a container's resource limit sets its maximum usage to its resource request, preventing bursting that could starve other containers in the group.

This page explains how to configure CPU resource limits and requests in an Azure Container Instances group to prevent one container from negatively affecting another. It establishes that removing resource limits caps usage at the request value, ensuring fair allocation.

Choosing D (Decrease limit of container2 to two CPUs) because it seems to restrict container2, but a limit must be greater than or equal to the request, making this configuration invalid.

Community Discussion (8 comments)

wind123 👍 8 Selected: C
Surprisingly C because 'If you don't specify a resource limit, the container instance's maximum resource usage is the same as its resource request.' https://learn.microsoft.com/en-us/azure/container-instances/container-instances-container-groups Hence none will go above their initial resource request. Actually makes sense that not specifying it wouldn't let it just be unlimited or something as was my initial thought.
8ac3742 👍 1 Selected: D
Exactly, you've got it right! Azure Container Instances (ACI) are charged based on the allocated resources, such as CPU and memory, which means they do not support automatic scaling of CPU resources. On the other hand, Azure Container Apps (ACA) can automatically scale CPU resources because they operate on a pay-as-you-go model. So, to ensure that container2 doesn't use the CPU allocated to container1, you need to decrease the resource limit of container2 to 2 CPUs, matching its resource request. This way, container2 will not exceed its allocated resources and will not impact container1's performance.
Josh219 👍 2 Selected: C
Correct is C
RVivek 👍 2 Selected: C
If you don't specify a resource limit, the container instance's maximum resource usage is the same as its resource request https://learn.microsoft.com/en-us/azure/container-instances/container-instances-container-groups
Josh219 👍 1
Its D not C. Why ? see below Unpredictable Performance: Without defined limits, the performance of each container becomes unpredictable. Under heavy load, one container might starve the other of resources, leading to instability and degraded performance for both. This is not what we want to achieve in the question. Fair Resource Allocation: Setting resource limits ensures that each container gets a fair share of resources. This is particularly important in environments where resource usage needs to be predictable and stable.
117b84e 👍 2
chatGPT D. Decrease the resource limit of container2 to two CPUs. Here’s why: In this scenario, container2 has a resource request of 3 CPUs and a resource limit of 4 CPUs, while container1 has both a request and a limit of 2 CPUs. Since container2 has a higher resource request (3 CPUs) than container1 (2 CPUs), it could potentially starve container1 of the CPU resources it needs, especially if the CPU load increases. By decreasing the resource limit of container2 to 2 CPUs, you ensure that both containers have equal access to CPU resources (i.e., 2 CPUs each), preventing container2 from consuming more resources than necessary and negatively impacting container1.
Milad 👍 2 Selected: C
C should be the right answer
FatFatSam 👍 3 Selected: C
I think the Answer is C. The resources allocated to Group1 is 5 CPUs Option D must be wrong. It is because the resource limit of a container instance must be greater than or equal to the mandatory resource request property. The resource limit of container 2 must be 3 or greater. Option B is wrong as well. The maximum resource limit you can set for a container instance is the total resources allocated to the group. Thus, maximum request limit of container2 is 5. Also, Resource limit of container2 is 4. Container2 could use up to 4 CPUs that will negatively impact container1. Increase it 6 CPUs will make the situation even worse. Option A can not stop container2 use up to 4 CPUs.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Removing the resource limit for both containers (Option C) ensures that neither container can consume more CPU than its requested amount. According to Azure documentation, if a resource limit is not specified, the container's maximum resource usage defaults to its resource request. This prevents container2 from bursting beyond its 3 CPU request and stealing CPU time from container1, which guarantees container1 always has its 2 CPUs available.

Why the Other Options Are Wrong

Option A increases container1's limit, allowing it to burst, but does nothing to restrict container2 from bursting and consuming shared CPU resources. Option B increases container2's limit to six CPUs, which exceeds the container group's total allocation of 5 CPUs and exacerbates the risk of container2 starving container1. Option D suggests decreasing container2's limit to two CPUs, but Azure requires that a container's resource limit be greater than or equal to its resource request; since container2 requests 3 CPUs, a limit of 2 is invalid.

Community Comment Notes

Several learners initially doubted option C but confirmed its correctness based on Microsoft documentation stating "If you don't specify a resource limit, the container instance's maximum resource usage is the same as its resource request." As FatFatSam noted, option D is invalid because "The resource limit of a container instance must be greater than or equal to the mandatory resource request property." Some, like 117b84e, incorrectly favored D based on AI suggestions, failing to recognize the Azure constraint on limits versus requests.

Official Reference

Exam Strategy

When dealing with Azure Container Instances resource limits, remember that omitting a limit caps the container at its request, preventing bursting. Always verify that any proposed limit is greater than or equal to the request and does not exceed the container group's total resources.

Related Analysis

Practice All AZ-104 Questions

Access 100 questions with complete answers and detailed explanations.

View Full AZ-104 Practice Test →

← Back to AZ-104 Study Guide