Chat System Design
Design a real-time chat service with persistent connections, ordered delivery, presence and offline sync across devices.
3 objectives 5 steps about 105 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Choose a real-time transport (WebSocket, server-sent events, long polling) and design a connection gateway tier that scales to millions of concurrent connections.
- Guarantee per-conversation ordering, delivery receipts and at-least-once delivery with client-side deduplication.
- Design message storage, presence and multi-device sync, including fan-out for group chats.
Lesson plan
5 steps, about 105 min · 4 of 4 lessons available so far
- Scoping chat and estimating connections Worked example · 20 min
- Real-time transports and connection gateways Concept · 20 min
- Ordering, receipts and retries Worked example · 25 min
- Message storage, presence and multi-device sync Concept · 25 min
- Chat design check Knowledge check · 6 questions
Practise it
Write a design doc for a chat service with 50M daily users and groups of up to 500 members, and prototype the routing table (user to gateway node) with a pub/sub channel that delivers messages between two gateway instances.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own Chat ServerIntermediate · 8–16 h
References
Hard prerequisites
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.