This article was drafted with AI help and reviewed by the author.
Most ASP.NET Core services on Kubernetes handle short requests. A rolling deploy replaces pods, a few in-flight requests finish during the grace period, and nobody notices.
A service that handles Twilio bidirectional Media Streams is different. Each phone call holds one WebSocket open for its whole length, carrying audio in both directions. If the pod handling that socket goes away, the caller's conversation with your agent goes with it.
This post covers what to change when that service runs on AKS. It looks at what Twilio does when the socket closes, how to drain pods, how to recover a call that does get cut, and how to keep the audio loop fast. Twilio behavior is taken from its TwiML and Media Streams reference, and Kubernetes behavior from the upstream pod lifecycle page, both read on 27 November 2026.…