Design Like Counts That Survive Celebrity Post Hot Keys
Last updated: November 29, 2026
Quick Overview
Design the service that records likes on Instagram posts and shows an accurate-enough like count, including posts from accounts with hundreds of millions of followers that receive millions of likes per minute.
Meta
November 29, 20260
0
0 solved
Design the service that records likes on Instagram posts and shows an accurate-enough like count, including posts from accounts with hundreds of millions of followers that receive millions of likes per minute.
This is a classic Meta onsite design prompt because write hot spots on a few celebrity objects are a real operational problem for Instagram and Facebook. The interviewer is checking whether you separate the source of truth (who liked what) from the displayed aggregate, and whether you can handle skewed write load without locking a single row.
What the Interviewer Expects
- Separate the per-user like edge (idempotent, needed for 'did I like this') from the aggregate count
- Identify the hot-key problem explicitly and propose sharded counters or write buffering
- State the consistency the product actually needs: exact for your own like, approximate for the total
- Handle unlike and double-tap idempotency
- Estimate QPS and storage with real numbers
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 would you show 'liked by Alice and 3M others' where Alice is a friend?
- How do you reconcile the count if a counter shard loses buffered increments?
- How would you detect and discount like-bot spikes without delaying honest counts?
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: like / unlike a post, check whether I liked it, show total count, show a few friends who liked it. Non-functional: like action p99 < 200 ms, own state read-your-writes, total count...
High-Level Design
- Like API (stateless) writes the edge to a Like Edge Store sharded by
post_idwith a secondary index byuser_id(or a TAO-style association:post -> likers,user -> liked). - The edge...