System Design
Design a Resumable Streaming AI Chat
Asked by:Sierra
streamingreal_timemessagingstorageconcurrency
Problem Overview & Requirements
Design a real-time AI chat that streams audio, survives disconnects, and drains WebSocket servers safely during deployment.
Key Pillars: High Availability, Low Latency, Scalability, Fault Tolerance.
Topics & Components: streaming, real_time, messaging, storage, concurrency.
System Design Breakdown
1. Requirements & Scope
Functional & non-functional requirements, DAU/MAU estimates, read/write throughput.
2. High Level Architecture
API Gateway, Load Balancers, Application Microservices, Caching Layer & Message Queue.
3. Data Model & Storage
SQL vs NoSQL selection, schema design, sharding keys, indexing, and replication strategy.
4. Bottlenecks & Trade-offs
CAP theorem trade-offs, consistency models, rate limiting, and cache invalidation strategies.