System DesignMedium
When should you choose Azure App Service vs Container Apps?
Two managed compute options on Azure that overlap heavily. Pick based on your operational needs.
Azure App Service
- PaaS for web apps: deploy .NET, Node, Python with zero ops
- Built-in slot-based deploys, auto-scale up to ~30 instances
- One container or one runtime per app — no sidecars
az webapp up --runtime "DOTNETCORE:9.0" --name prepstack-api
Cost: ~$13/mo (B1, 1.75 GB RAM, always-on) up to ~$280/mo (P1V3, 8 GB RAM, advanced autoscale).
Azure Container Apps
- Managed Kubernetes (you don't see the cluster), built on KEDA + Dapr
- Scale-to-zero when idle
- Multi-container support (sidecars OK)
- Built-in revision-based traffic splitting for canaries
- Event-driven autoscale (HTTP, Kafka, Service Bus)
properties:
template:
containers:
- { name: api, image: ghcr.io/me/api:1.4 }
scale:
minReplicas: 0 # ← scale to zero
maxReplicas: 20
rules:
- name: http
http: { metadata: { concurrentRequests: "30" } }
Cost: pay-per-vCPU-second + memory-second. Idle workloads ≈ free. Active workload pricing similar to App Service Premium but more granular.
Decision matrix:
| Need | App Service | Container Apps |
|---|---|---|
| Single .NET / Node / Python app | ✓ simplest | ✓ overkill |
| Multiple containers (sidecars) | ✗ | ✓ |
| Scale to zero (cost optimisation) | ✗ | ✓ |
| Slot swap deploys | ✓ native | ✓ via revisions |
| Custom routing / Dapr | ✗ | ✓ |
| Windows containers | ✓ | ✗ |
| Learning curve | Lowest | Medium |
Start with App Service unless you specifically need multi-container, scale-to-zero, or Dapr. Migration App Service → Container Apps is straightforward; the reverse is rarely worth it.