Azure Container Apps Consumption Based Workload Profile seems less stable?

John Wong Yek Hon 275 Reputation points
2026-11-19T03:01:35.61+00:00

I have APP-A deployed as Azure App Service, while APP-B deployed as Azure Container Apps with Consumption based workload profile.

Both APPs have similar connectivity to other azure services e.g. Azure Cache for Redis, Service Bus etc, and they are the same common code and configs on those connectivity. Both of them have similar workload.

Somehow I observed that the APP-B on Container Apps seems significantly less stable in terms connectivity to other services. Could it be due to the "noisy neighbour" that draining the network resource causing the connectivity less stable? I am thinking to move it to dedicated workload profile instead, not sure if this could help?

Any advice please?

Azure Container Apps
Azure Container Apps

An Azure service that provides a general-purpose, serverless container platform.


1 answer

Sort by: Most helpful
  1. AI answer

    2026-11-19T03:02:38.77+00:00

    Moving APP-B to a Dedicated workload profile will provide single-tenant compute isolation, but it is not a documented fix for intermittent outbound connectivity; first determine whether the failures correlate with connection/SNAT pressure, replica lifecycle, resource saturation, DNS, or the destination service.

    1. Identify the failing connection stage

    At the timestamp of an incident, record the exact exception and determine whether it represents:

    • DNS: EAI_AGAIN, ENOTFOUND, UnknownHostException
    • TCP connection: connect timeout, SocketException, connection reset
    • TLS: handshake or certificate failure
    • Authentication: HTTP 401/403
    • Service response: Redis command timeout or Service Bus ServiceTimeout

    From Container App → Console, select an affected revision and replica, then test the same host and port used by the application:

    nslookup <service-hostname>
    nc -vz -w 5 <service-hostname> <port>
    curl -v --connect-timeout 5 --max-time 15 https://<service-hostname>/
    

    Run the test on multiple replicas. For VNet-integrated environments, custom DNS, routing, firewall rules, private endpoint DNS, and destination access rules can prevent access to dependencies. ^1^

    2. Correlate failures with each replica’s load and lifecycle

    In Container App → Metrics, chart these over the failure window and split them by Revision or Replica:

    • CPU Usage Percentage and Memory Percentage
    • Network Out Bytes
    • Replica count
    • Total Replica Restart Count
    • Resiliency Connection Timeouts
    • Resiliency Requests Pending Connection Pool

    These metrics can distinguish a platform-wide symptom from one overloaded or restarting replica. ^2^

    Also query console and system logs by replica and timestamp:

    ContainerAppConsoleLogs_CL
    | where TimeGenerated > ago(24h)
    | where ContainerAppName_s == "<app-b>"
    | where Log_s has_any ("timeout", "SocketException", "Redis", "ServiceBus")
    | project TimeGenerated, RevisionName_s, ContainerGroupName_g, Log_s
    | order by TimeGenerated desc
    

    Container Apps exposes application console logs and platform system logs through Log Analytics, including revision and replica identifiers. ^3^

    If APP-B can scale to zero, or frequently replaces replicas, set its minimum replica count to at least one for a controlled comparison. This keeps capacity warm and avoids cold-start effects; it does not prove that shared compute caused the network failures. A Consumption profile with a nonzero minimum can maintain warm capacity. ^4^

    3. Check client and connection lifecycle

    The same code can behave differently when replica counts and process lifetimes differ. Confirm that each replica:

    • Uses one long-lived Redis ConnectionMultiplexer, not one per operation.
    • Reuses a singleton ServiceBusClient.
    • Reuses HTTP connections through IHttpClientFactory or a long-lived client.
    • Uses bounded exponential retries rather than immediate retry loops.

    Creating a ServiceBusClient per message or request creates new AMQP connections and can exhaust sockets. Microsoft recommends reusing the client and using asynchronous APIs end to end. ^5^

    For Redis, use a singleton ConnectionMultiplexer; reconnection should be controlled rather than repeatedly creating new connections during a timeout event. ^6^

    A typical .NET registration pattern is:

    builder.Services.AddHttpClient("dependencies");
    
    builder.Services.AddSingleton(_ =>
        ConnectionMultiplexer.Connect(redisConnectionString));
    
    builder.Services.AddSingleton(_ =>
        new ServiceBusClient(serviceBusNamespace, credential));
    

    For Redis-specific timeouts, inspect Redis resource → Monitoring → Metrics → Errors, split by ErrorType, to determine whether a failover occurred during the same window. ^7^

    4. When Dedicated would help

    A Dedicated profile is appropriate when the evidence shows that APP-B needs:

    • Single-tenant compute isolation
    • Steadier compute performance
    • More CPU or memory per replica
    • Sustained utilization where per-instance billing is preferable

    Dedicated profiles run on reserved compute in a dedicated pool and provide compute isolation. ^8^ ^9^

    That isolation can reduce compute contention, but it does not automatically correct connection churn, DNS, firewall rules, private endpoint configuration, or destination-side throttling.

    5. If diagnostics show outbound port pressure

    If APP-B uses public endpoints and failures increase with traffic:

    1. Reuse and pool connections first.
    2. If using a workload profiles environment in a custom VNet, attach Azure NAT Gateway to the environment subnet for controlled outbound connectivity.
    3. Consider private endpoints for supported Azure dependencies so traffic stays on the private path.

    Workload profile environments support NAT Gateway egress, whereas legacy consumption-only environments do not. ^10^ NAT Gateway integration supplies a static outbound public IP for the environment’s traffic. ^11^

    If these checks remain inconclusive, collect the UTC failure window, revision and replica names, exact exceptions, destination resource-health data, and relevant metrics before opening an Azure support case.


    References

    1. Troubleshoot start failures in Azure Container Apps
    2. Monitor Azure Container Apps metrics
    3. Monitor logs in Azure Container Apps with Log Analytics
    4. Deploy microservices with Azure Container Apps and Dapr
    5. Handle timeouts and configure retries in Azure Service Bus
    6. Connection resilience
    7. Troubleshoot Azure Cache for Redis latency and timeouts
    8. Workload profiles in Azure Container Apps
    9. Azure Container Apps plan types
    10. Networking in an Azure Container Apps environment
    11. Virtual network configuration
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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