advancedTop 15 System Design Questions

Design a real-time chat application (WhatsApp/Slack).

Messages: Cassandra partitioned by (channelId, bucket); clustered by timestamp Online presence: Redis SETEX presence:{userId} 30; client refreshes every 20s Message delivery: Redis Pub/Sub for real-time; WebSocket connection per user Unread count: Redis HINCRBY unread:{userId} {channelId} 1 Recent messages cache: Redis List (LPUSH; LTRIM 0 49) for fast initial load Search: Elasticsearch on message

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Design a distributed cache system (like Memcached/Redis Cluster).← Back to all NoSQL questions