#realtime
8 articles
Design a Realtime Voice AI Agent
Design a realtime voice AI agent for PSTN and WebRTC calls with sub-800ms voice-to-voice latency: cascade STT-LLM-TTS pipeline, turn detection, barge-in.
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)
Design a real-time collaborative editor like Google Docs: Operational Transformation, the Jupiter model, CRDTs, doc sharding, presence, and offline sync.
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.