Question
Design a carrier-grade SIP session routing layer (a stateful SIP proxy / SBC tier) that handles 100k concurrent calls and 5k call setups/sec, routing SIP signaling to the right media gateway / downstream carrier based on dialed number, originating trunk, and least-cost routing rules. Requirements: call-setup p99 under 150ms, five-nines availability, no dropped active calls when a proxy node fails over, and routing-table/LCR updates that converge without misrouting calls mid-flight. Walk through the signaling architecture, the routing/failover model, and the central trade-off.
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.