Case study: design a chat system
Interview question: design a chat app for 500 million daily users, with one-to-one and group chats, online status, and delivered and read ticks. Messages must arrive in a blink, in the right order, and never get lost when a phone is offline. Where do you start?
In this lesson you'll learn to
- Turn the chat question into requirements and rough numbers, including messages a second and connection servers.
- Route messages between WebSocket gateways with a connection registry, and design presence that scales.
- Order messages per conversation with server-assigned sequence numbers, and build delivery and read receipts from them.
- Deliver to offline devices and to groups without losing or duplicating messages.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.