Code Room
System designHardsd-g708
Subject Rtp media relay protocolLevel Senior–Staff~45 minCommon in Networking & APIs interviewsIndustries Telecom, Technology

Question

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?

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.