Forum Discussion
Migrating Teams Calling Bot (EchoBot) from VMSS to Windows Containers / ACI?
Hi, Building on what Jamony shared — here's a more detailed breakdown for each of your questions.
1. Windows Containers (ACI / AKS)
ACI is not viable for Application-Hosted Media bots. Three hard blockers:
- No per-instance public IP — each media worker needs its own reachable IP; ACI shares IPs behind NAT in most configurations
- Dynamic port binding (UDP/TCP ranges like 8445, 10000–20000) doesn't map cleanly to ACI's port model
- ACI is simply not in the supported host list — AKS and VMSS are
AKS with a Windows node pool is supported, but you must ensure each pod/node has a unique public IP. A standard Kubernetes LoadBalancer VIP (single shared IP) won't work. Use HostNetwork mode with node-level public IPs as the most practical setup.
2. On-Demand / Spin-up-on-call-start
Do not provision ACI or new VMSS instances after the call arrives. Windows container/VM cold start takes 2–10 minutes; Teams call setup negotiation closes in seconds — the call will fail before the worker is ready.
The practical cost-optimized pattern is: keep 1 warm worker always running, scale out on active call count or incoming call signal metrics, and use scale-in protection (VMSS instance protection or AKS PodDisruptionBudget) to prevent active calls from being terminated during scale-in. You won't reach zero idle cost, but you'll pay for one small instance instead of a full VMSS fleet.
3. Alternative Approaches
The biggest cost reduction by far is switching to service-hosted media — if your bot only needs audio prompts, DTMF, or short recordings, Microsoft hosts the media processing and your compute cost is essentially zero. Your Azure Functions signaling code is already compatible with this model.
If you genuinely need raw audio access (custom DSP, mixing, echo processing), stay on AKS Windows node pools and combine 1 on-demand node as your baseline with Spot node pools for burst capacity — Spot Windows nodes are roughly 60–80% cheaper than on-demand.