What is Azure container saturation?

浩 笹川 20 Reputation points
2025-05-26T07:51:28.7733333+00:00

The following document "Configuring Key Vault Alerts" has a description "Example: Configuring dynamic alert thresholds for container saturation".

https://learn.microsoft.com/ja-jp/azure/key-vault/general/alert

What does container saturation mean here?

A container is assumed to have resources such as CPU, memory, and disk, but which resources should we think of?

Also, is there a fixed upper limit of 100% of resources, and is it possible for Microsoft to automatically scale it up, or for us to scale it up?

Sorry for asking a basic question, but I couldn't find anything even after searching the documentation.

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,443 questions
{count} votes

Accepted answer
  1. Bheemani Anji Babu 430 Reputation points Microsoft External Staff Moderator
    2025-05-27T09:48:59.33+00:00

    Hi @浩 笹川

    I’m posting this answer to help others in the community who might face the same issue.

    The issue is due to container saturation in azure container app this means your app container used up all the CPU or Memory it was given, and it got overloaded.

    ex: just like a small bag trying to carry too many things in it.

    This happens because of the app receives too many requests or does too much work, azure has limits like how much CPU/Memory each container can use if the app crosses that limit azure cannot help unless scaling is enabled or resource limits are increased.

    To fix:

    Increase resource by giving CPU/Memory let say if you have cpu: 0.25 and memory: 0.5Gi change them to cpu: 0.5 memory: 1Gi this gives the app boost up and it prevents saturation if load increases slightly

    Let azure automatically add more container instances when load increases example scale rule

    scale:
      minReplicas: 1
      maxReplicas: 5
      rules:
        - name: httpscale
          http:
            concurrentRequests: 20
    

    This means azure adds more app instances when more then 20 people hit your app at the same time.

    Better you can add alerts like add azure monitor to track when saturation happens set an alert like if cpu >80% for 5 minutes set notification to your mail by giving your mail id, if memory > 90% scale up or investigate.

    Key Vault Performance Consideration:

    Azure Key Vault is a managed service, so you cannot scale it like a virtual machine. If your application is experiencing performance issues or delays when using Key Vault, it's often because the app is calling it too frequently.

    For example, if your app is fetching secrets or keys on every request, this adds extra load and can lead to throttling or slower responses. This repeated access is unnecessary and impacts performance.

    To fix:

    Instead of calling key Vault every time you need a secret, cache the secret in your app like in memory or securely. for example, store the value for 5 to 10 mints in memory. also, you can use managed identity for authentication instead of secretes it's faster and doesn't hit the same limits.

    Note: you can't scale key vault directly but by caching optimizing usage and maybe upgrading to premium you can improve performance, also try removing dapr helps too if it's not essential to your setup.

    Doc:
    https://learn.microsoft.com/en-us/azure/container-apps/containers

    https://learn.microsoft.com/en-us/azure/key-vault/general/best-practices#use-caching-to-improve-performance


    I hope this has been helpful! If above is unclear and/or you are unsure about something add a comment below.

    Please click the answer as original posters help the community find answers faster by identifying the correct answer. User's image

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.