AO
Back
Roblox Common Problems

Like / Unlike System Design

System DesignhardLast reported July 2026
By AceOffer · Updated July 2026 · Reported 14× across 150+ reports

Understanding the Problem

Design a scalable like/unlike system (in context of Roblox Marketplace items, games, or generic social media items). Core functional requirements: (1) A user can like or unlike any item (idempotent); (2) Any user can view the total like count for any item; (3) Any user can check whether they have liked a specific item; (4) A user can retrieve the full list of items they have previously liked. Some variants also include: dislike functionality with state transitions (like→dislike, dislike→like), a leaderboard of most-liked items, and geographic popular items. Scale: ~1M QPS reads and ~100K–1M QPS writes.

Functional Requirements

Structured requirements coming soon. For now, see the full problem statement above and the deep-dive prompts below.

Non-Functional Requirements

Latency, throughput, availability, consistency targets — being authored.

The Set Up

Defining the Core Entities

Core entities (Request, Batch, Worker, Cache, etc.) — being authored.

The API

POST /endpoint → describe request shape GET /endpoint → describe response shape (API spec being authored)

High-Level Design

Component diagram + walkthrough mapping each functional requirement to a system flow — being authored.

Potential Deep Dives

These are the directions the interviewer is likely to push you. Each one has multiple valid solutions at different quality tiers.

1)How do you handle 1M QPS on reads? How do you prevent the like count query from hammering the DB? (when: Candidate proposes basic DB-only solution)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

2)How do you handle a burst of writes on a popular (hot) item? (when: Candidate proposes Redis + DB writes synchronously)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

3)What exactly does the Redis key look like? What does the DB query look like when writing or reading? (when: Candidate describes architecture at high level)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

4)How do you quickly reflect like updates to users currently viewing the item page? (when: Candidate completes basic design)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

5)What if the user wants to see all items they've previously liked? (when: Candidate proposes like/unlike only)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

6)What happens when a user transitions from liked to disliked? How do you ensure correctness? (when: Candidate proposes like/dislike variant)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

7)How do you shard the user_likes table? What are the tradeoffs of sharding by user_id vs. item_id? (when: Candidate discusses sharding)

Bad

Naive approach with serious trade-off — being authored.

Good

Solid baseline with reasonable trade-offs — being authored.

Great

Production-grade approach with explicit trade-off rationale — being authored.

What is Expected at Each Level?

L4 / Mid-level

Cover happy path. Clarify scope. Identify the obvious bottleneck. Pick a reasonable storage and reasonable scaling approach.

L5 / SeniorTarget

All of the above plus: explicit failure handling, durability vs latency trade-offs, choose the right batching/caching strategy, articulate why.

L6 / Staff+

All of the above plus: organizational concerns (rollout, migration, on-call), quantitative analysis, multi-region considerations, what could go wrong with the proposed solution at 10x scale.

Insider Notes

Common mistakes: Staying at high-level architecture without specifying Redis key names, data types, or DB query patterns; Not proactively driving the interview — waiting for interviewer prompts instead of leading the deep dive; Not addressing the hot/popular item problem (hotkey) unprompted; Proposing synchronous DB writes without caching or queuing, which cannot handle 1M QPS; Forgetting idempotency: not handling double-like or concurrent like/unlike race conditions; Not defining state transitions for like→unlike or like→dislike clearly; Answering only the basic 2 FRs and not covering user's liked-items list or leaderboard; Not discussing sharding strategy or DB choice justification

Interviewer hints: Interviewer explicitly asked: 'What does the Redis key look like?' when candidate stayed at high level; Interviewer asked: 'What does the DB query look like when you write or read a like?' to push for schema detail; Interviewer guided toward hotkey handling when candidate didn't mention it; Interviewer probed: 'How do you make the like count update visible to users quickly?'; Interviewer continuously guided the candidate throughout when stuck

What passers do: Proactively clarified all 3–4 functional requirements before designing; Explicitly stated Redis key schemas and DB table schemas with column names; Addressed the hotkey/hot-item problem without being prompted; Combined Kafka (write decoupling) + Redis (fast read/write) + DB (persistence) cleanly; Drove the interview rather than waiting for prompts; Discussed idempotency and concurrent write handling; Covered both write path and read path explicitly

Why people fail: High-level answer that never got to specific implementation details (keys, queries, schemas); Did not handle hot item / burst write scenario; Could not articulate Redis key design or DB query when probed; Passive in the interview — answered questions but did not proactively identify and address design challenges; Missed idempotency and state transition correctness entirely; Good clarification but poor technical depth in the design itself

Edge cases probed: Concurrent like/unlike from the same user (race condition → duplicate likes); Hot/popular item with millions of simultaneous likes (hotkey problem); Exact vs. approximate like count (tradeoff at high scale); User liking their own item (business rule clarification); Like count going negative on unlike if counter not guarded; State transition correctness: like → unlike → like idempotency; Like → dislike transition and dual counter update atomicity; Stale cache read after unlike (cache invalidation timing)

Alternative approaches: CDC (Change Data Capture) pattern (Cleaner separation of concerns — primary DB captures writes, CDC stream feeds downstream counter service and cache. Adds operational complexity (need Debezium or similar); eventual consistency for counts.); Synchronous DB counter with optimistic locking (Simpler architecture; accurate counts. Does not scale to 1M WPS — DB becomes bottleneck; hotkey contention on popular items.); Kafka + Flink stream processing (Handles very high throughput with real-time aggregation via Flink windowing. Higher infrastructure cost; more complex failure recovery; introduces latency vs. direct Redis increment.); Kafka + batch consumer (no Flink) (Simpler than Flink; batch writes to DB and Redis reduce write amplification. Slight lag before counts are updated; less granular stream processing.); Client-side optimistic update + SSE reconciliation (Immediately reflects user's own like action in UI without waiting for backend confirmation. Counts may be approximate/stale until SSE pushes server truth; complex client-side rollback on failure.)

More Roblox Questions

Free preview

Every question in the Roblox catalog gets this depth

What you just read — canonical solution, follow-up arc, what passing candidates actually did — exists for all 34 Roblox questions, refreshed monthly from new candidate reports.

$59/mo — or $50/mo with the 3-month pass · cancel anytime
Roblox · System Design · Last reported July 2026
Is this helpful?