Media relay for RTP calls
Your task
Design a globally-distributed media relay / TURN service that relays RTP audio/video for a real-time calling product when peers can't connect directly (symmetric NAT, restrictive firewalls). It handles 500k concurrent relayed sessions, must add minimal latency (<30 ms relay overhead), allocate/free relay ports efficiently, and steer each call to a relay near both peers. How do you allocate relays, pick locations, and keep latency low?
It covers
- Turn
- Relay
- Nat traversal
- Jitter buffer