#realtime
8 articles
Design a Realtime Voice AI Agent
Build a full-duplex voice agent that answers PSTN and WebRTC calls with sub-800ms voice-to-voice latency — covering the cascade pipeline (STT→LLM→TTS), turn detection, barge-in, telephony transport, and scaling to thousands of simultaneous calls.
Design Nearby Friends (Real-Time Friend Location Sharing)
How to stream real-time friend locations to millions of users without collapsing under the write amplification of a 30× social-graph fanout.
Design a Real-Time Leaderboard (gaming)
Rank millions of players by score and answer "top N" and "my rank" instantly. Redis sorted sets, sharding by score range, and approximate ranks at scale.
Design a Video Conferencing System (Zoom)
Carry live audio/video among many participants with low latency. WebRTC, the SFU vs MCU vs mesh trade-off, simulcast, and adaptive bitrate.
Design Slack (team chat at scale)
Channels, threads, presence, and search across huge workspaces. Real-time fan-out over WebSockets, the gateway problem, and read-state per user.
Design Google Docs (real-time collaborative editor)
Multiple people editing the same document simultaneously, every keystroke synced, never a corrupt merge. Operational Transformation, CRDTs, presence, and the architecture that's run quietly at Google for 17+ years.
Design Uber / Lyft (ride hailing)
Match drivers to riders in real time at city scale. Geohashing, dispatch algorithms, surge pricing, and the realtime location pipeline.
Design WhatsApp / Chat System
Realtime 1:1 and group messaging at billions-of-users scale. WebSocket gateways, message store, presence, end-to-end encryption.