Design Group Chat Delivery With Multi-Device Sync
Last updated: November 29, 2026
Quick Overview
Design the messaging backend for a chat app where users belong to groups of up to 500 members and are logged in on phone, desktop and web at once, so every device sees every message exactly once and in a consistent order.
Tencent
November 29, 20260
0
0 solved
Design the messaging backend for a chat app where users belong to groups of up to 500 members and are logged in on phone, desktop and web at once, so every device sees every message exactly once and in a consistent order.
WeChat runs one of the largest messaging systems in the world, with groups of hundreds of people and simultaneous phone, PC and web clients. Senior backend candidates are expected to reason about per-user sequence numbers, push versus pull sync, storage fan-out choices, and what happens when a device has been offline for a week.
What the Interviewer Expects
- Clarifies scale: daily active users, messages per second, group size, devices per user
- Chooses a sync model based on per-user (or per-conversation) monotonic sequence numbers
- Discusses write fan-out versus read fan-out for group messages
- Explains notify-then-pull delivery so devices recover from gaps
- Covers idempotent sends with client message IDs
- Addresses read receipts, unread counts and offline catch-up
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you keep a 500-member group from causing write amplification storms?
- How would you implement message recall within 2 minutes across all devices?
- Where does end-to-end encryption break this design and what do you give up?
- How do you keep unread counts correct across devices?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: 1:1 and group chat (up to 500 members), multi-device login, offline catch-up, read state sync, message recall. Non-functional: no lost messages, no duplicates on any device, consistent per...
High-Level Design
Components: an access layer holding long TCP connections per device; a logic layer that validates sends, assigns sequence numbers and writes storage; a message store keyed by conversation;...