Advanced
High-Throughput Chat Architecture
Design a scalable distributed architecture for a real-time messaging platform.
📝 Prompt-Inhalt
Design a distributed backend architecture for a real-time chat application similar to WhatsApp or Discord, capable of supporting 100 million daily active users with 10 million concurrent connections. Your design must address the following requirements: 1) End-to-end encryption for message privacy. 2) Message durability and ordering guarantees in the event of server failures. 3) Low latency delivery (<100ms) globally. 4) Efficient handling of group chats with up to 50,000 members. In your response, detail the data models, choice of transport protocols (e.g., WebSockets vs. MQTT), sharding strategy for user data, consensus mechanisms for leader election, and a disaster recovery plan. Include a trade-off analysis regarding CAP theorem compliance.