TL;DR
A comprehensive guide to Azure Container Apps, including deployment strategies, scaling, networking, and best practices for running containerized applications
Azure Container Apps: Serverless Container Platform Guide
Executive Summary
Azure Container Apps runs containers without giving you a cluster to operate. It sits between App Service and AKS: you bring container images, declare CPU, memory, ingress, and scaling rules, and the platform — built on Kubernetes and KEDA underneath — handles placement, scaling (including to zero), and revision rollout. This guide covers the concepts that matter in practice: environments as the isolation boundary, revisions and traffic splitting for safe releases, KEDA-based scaling on HTTP and event signals, Dapr integration, and the networking and secrets model. After reading it you will be able to judge when Container Apps is the right host and when you genuinely need a cluster.
Why This Matters
The common failure this service prevents is organisational, not technical: a team adopts Kubernetes for three microservices and spends more time operating the cluster — upgrades, node pools, ingress controllers, certificate plumbing — than building the product. Container Apps removes that entire layer for workloads that fit its model. The opposite failure also exists: teams adopt it for workloads that need capabilities it deliberately hides, such as custom scheduling, privileged containers, or direct control of the data plane, and discover the ceiling mid-project. Choosing correctly requires understanding what the platform abstracts and what it does not.
Core Concepts
Environments and Apps
The unit of deployment is a container app: one or more containers (an app plus optional sidecars) with ingress, secrets, and scaling configuration. Apps live in a Container Apps environment, which is the network and observability boundary — apps in the same environment share a virtual network and a Log Analytics workspace, and can discover each other by name. Group apps that belong to the same system in one environment; separate environments by trust or lifecycle boundary, not by team habit.
A basic app definition declares the environment, ingress, and template:
import { ContainerApp, ContainerAppEnvironment } from '@azure/arm-appcontainers';
const containerApp = {
location: 'eastus',
managedEnvironmentId: environment.id,
configuration: {
ingress: {
external: true,
targetPort: 80
}
},
template: {
containers: [
{
name: 'myapp',
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest',
resources: {
cpu: 0.5,
memory: '1Gi'
}
}
],
scale: {
minReplicas: 1,
maxReplicas: 10
}
}
};Revisions and Traffic Splitting
Every template change creates a revision — an immutable snapshot of the app. In single-revision mode the new revision replaces the old; in multiple-revision mode you control traffic weights between revisions, which gives you canary and blue-green releases without extra tooling:
# traffic-split.yaml
properties:
configuration:
ingress:
traffic:
- revisionName: myapp-v1
weight: 90
- revisionName: myapp-v2
weight: 10Each revision also gets its own URL, so a new version can be smoke-tested before it receives any production traffic. This is the release mechanism to design around: ship a revision, test it on its own endpoint, shift weight gradually, and roll back by moving weight back — no redeployment.
Scaling with KEDA
Scaling rules map signals to replica counts. HTTP scaling reacts to concurrent requests; event-driven scalers react to external backlogs such as queue depth, which is what makes scale-to-zero practical for workers — replicas exist only while there is work:
# container-app.yaml
properties:
managedEnvironmentId: /subscriptions/.../environments/myenv
configuration:
activeRevisionsMode: Multiple
secrets:
- name: redis-password
value: mypassword
ingress:
external: true
targetPort: 80
transport: http
allowInsecure: false
template:
containers:
- name: myapp
image: myregistry.azurecr.io/myapp:latest
env:
- name: REDIS_HOST
value: redis.internal
- name: REDIS_PASSWORD
secretRef: redis-password
scale:
minReplicas: 1
maxReplicas: 10
rules:
- name: http-rule
http:
metadata:
concurrentRequests: "100"const eventDrivenScale = {
scale: {
minReplicas: 0,
maxReplicas: 10,
rules: [
{
name: "azure-queue",
azureQueue: {
queueName: "myqueue",
queueLength: 100
}
}
]
}
};Two scaling realities to plan for: scale-to-zero means the next request after an idle period pays a cold start while a replica starts, and scaling is reactive — a burst that arrives faster than replicas start will queue or fail at the front door. Set minimum replicas above zero for latency-sensitive user-facing apps, and treat maximum replicas as a cost and downstream-protection control, not just a capacity number.
Dapr Integration
Container Apps offers Dapr (Distributed Application Runtime) as a managed sidecar option, providing building blocks — service invocation, state management, pub/sub, bindings — through a standard API instead of per-language SDKs wired to specific Azure services:
# security-config.yaml
properties:
configuration:
secrets:
- name: ssl-cert
value: base64-encoded-cert
ingress:
external: true
targetPort: 443
transport: http2
allowInsecure: false
customDomains:
- name: app.example.com
certificateRef: ssl-cert
dapr:
enabled: true
appPort: 3000
appProtocol: httpDapr earns its place when several microservices need the same plumbing and you want the backing services swappable. For a single app calling one database, it is an extra hop and an extra abstraction to debug — use the service's own SDK.
Networking and Identity
By default an environment is Azure-managed networking with optional external or internal ingress. For private estates, deploy the environment into your own VNet so apps can reach private endpoints and be reached only internally. Apps authenticate to Azure services with managed identities, and pull images from ACR using that identity rather than stored registry credentials. Secrets can be referenced from Key Vault through the identity, keeping values out of the app definition.
Observability
Container stdout/stderr and system logs flow to the environment's Log Analytics workspace, and Application Insights or Azure Monitor OpenTelemetry gives you request-level tracing. Alert on the signals that predict user pain: replica restarts, failed requests at ingress, and scaling pinned at maximum — the last one means the platform wants to grow and a limit is stopping it.
Decision Framework
| Situation | Recommendation |
|---|---|
| Microservices or APIs, small team, no platform staff | Container Apps |
| Background workers driven by queues or events | Container Apps with KEDA scalers and min replicas 0 |
| Latency-sensitive public API | Container Apps with min replicas above zero to avoid cold starts |
| Workload needs privileged containers, custom scheduling, or full Kubernetes API control | AKS |
| Single simple web app with no containers today | App Service may be simpler still; containers pay off when you need image-based deployment parity |
| Stateful workload with local disk expectations | Reconsider the design — Container Apps suits stateless apps with state in managed services |
Implementation Checklist
Trade-offs
Container Apps trades control for operational simplicity. You give up the Kubernetes API surface — no custom resource definitions of your own, no node access, no privileged workloads — and some behaviours (scaling reaction time, cold starts at zero replicas) are platform properties you tune around rather than fix. Per-replica pricing with scale-to-zero is excellent for spiky workloads and can exceed AKS cost for large, constantly busy fleets running at high utilisation around the clock. Debugging also changes: when the platform is the infrastructure, your evidence is its logs and metrics, not the node.
When Not to Use
Conclusion
Container Apps is the right default for containerised microservices and event-driven workers when the team is small and the workload fits the stateless, HTTP-or-queue-driven model. Design around revisions for releases, KEDA rules for scaling, and managed identities for credentials, and you get most of Kubernetes' deployment value without operating Kubernetes. When the workload outgrows the model, the exit to AKS is a redeployment of the same images — not a rewrite.
References
Why This Matters
Understanding the business and technical context helps you make informed decisions rather than blindly following patterns.
Trade-offs to Consider
Every architectural decision involves trade-offs. Consider your specific requirements, team expertise, and scale when evaluating options.
When NOT to Use This
Knowing when a solution doesn't apply is as valuable as knowing when it does. Consider alternatives for your specific situation.
Decision Framework
Use this framework to evaluate whether this approach is right for your use case based on your specific constraints and requirements.