Design a Red Packet Grab Service for Spring Festival Peak
Last updated: November 29, 2026
Quick Overview
Design the backend that lets a user send a lucky red packet to a group chat and lets members grab shares, handling a New Year's Eve peak where traffic is tens of times higher than normal.
Tencent
November 29, 20260
0
0 solved
Design the backend that lets a user send a lucky red packet to a group chat and lets members grab shares, handling a New Year's Eve peak where traffic is tens of times higher than normal.
WeChat red packets see their most extreme load in a few minutes around midnight on Lunar New Year's Eve, and the money must be exactly right. The interviewer wants separation of the hot grab path from the money ledger, correct concurrency without global locks, and a capacity plan for the spike.
What the Interviewer Expects
- Separates send, grab and settle into distinct steps
- Keeps the hot path off the main ledger database
- Prevents double grabs and over-grabs with atomic operations
- Plans capacity and degradation for a known, sharp peak
- Handles expiry and refunds of unclaimed money
- Explains reconciliation between cache state and ledger
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
- Would you precompute shares at send time or compute them at grab time?
- How do you shard so that one viral group does not overload one node?
- What do you show the user if settlement to their balance is delayed?
- How do you load test a peak that happens once a year?
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
Send: debit the sender's balance or card, create a packet with total and count, post it to a chat. Grab: each member can grab at most once; total grabbed never exceeds the total. Open: show the amount...
High-Level Design
- Send service: debits the sender through the payments ledger in a normal ACID transaction, creates the packet record, and precomputes the share list (double-mean split) so grabs are cheap.
- **...