← Roblox Interview InsightsSoftware Engineer

Roblox·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

System design round at Roblox for a software engineer role. One question, the whole session, and it went deeper than I expected for what sounds like a simple feature on the surface.

Questions Asked (1)

Q1

Design a like button counter system similar to Facebook's, supporting like/unlike per user, real-time-ish total counts, and whether the current user has liked a post. How do you scale it to billions of posts with high read throughput?

System DesignData ModelingTechnical Trade-offs
Author's notes

I started with the obvious stuff, a likes table keyed on (user_id, post_id) with a unique constraint for idempotency.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, consistency, latency) and then propose a hybrid storage model: a fast key-value store for per-user like status and a distributed counter for aggregate counts. Discuss trade-offs between strong and eventual consistency, and how to scale reads via caching and sharding.

Pro tip: Emphasize that exact real-time counts are often not required; approximate counts with periodic reconciliation can drastically reduce write contention and improve scalability.

1. Clarify Requirements

Ask about scale (billions of posts, millions of QPS), consistency needs (strong vs eventual), latency targets, and whether real-time exact counts are necessary.

2. Design Data Model

Propose a per-user like table (user_id, post_id) for like status and a separate counter per post for total likes. Consider using a wide-column store like Cassandra for scalability.

3. Handle Writes and Consistency

Use asynchronous writes and eventual consistency for counters, with idempotent operations to handle duplicate likes/unlikes. Discuss using a distributed counter service (e.g., Redis with sharding) to avoid hotspots.

4. Scale Reads

Cache like counts and user-like status in a multi-level cache (e.g., Redis, CDN) with appropriate TTLs. Use read replicas and sharding to distribute load.

5. Address Trade-offs and Edge Cases

Discuss trade-offs between consistency and availability, handling of hot posts, and strategies for reconciliation (e.g., batch jobs) to correct counter drift.

Key Points to Mention

  • Sharding by post_id to distribute write and read load across nodes.
  • Using a distributed cache like Redis to store like counts and user-like status with high read throughput.
  • Eventual consistency for like counts with periodic reconciliation to handle drift.
  • Idempotent operations to prevent duplicate likes/unlikes due to retries.
  • Hot post mitigation: local aggregation, write batching, or approximate counts.
  • Trade-offs: strong consistency vs. scalability, and cost of exact counts vs. approximate.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.