← Roblox Interview Insights

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

SeniorPrefer not to say
Jul 2026

Summary

System design round at Roblox for a software engineer role, focused entirely on building a like/unlike system that could handle massive write throughput. Pretty deep dive, they pushed hard on the tradeoffs.

Questions Asked (1)

Q1

Design a Like/Unlike system that can operate at scale, supporting operations like liking a post, unliking it, fetching like counts, checking if a user has liked something, and showing a user's liked posts feed.

System DesignData ModelingTechnical Trade-offs
Author's notes

This one went longer than I expected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., read/write ratio, latency, consistency). Then design a data model and architecture that separates the write path (like/unlike) from the read path (counts, user feed), using appropriate storage and caching. Finally, discuss trade-offs and optimizations for scale, such as sharding, denormalization, and asynchronous processing.

Pro tip: Emphasize the read-heavy nature of like systems and propose a hybrid storage approach: use a fast key-value store for like counts and a wide-column store for user-like relationships. Also, mention idempotency and handling concurrent likes/unlikes to avoid race conditions.

1. Clarify Requirements and Scale

Ask about expected QPS, read/write ratio, latency requirements, and consistency needs (e.g., eventual vs. strong). Estimate storage and bandwidth based on user base and post volume.

2. Design Data Model and Storage

Choose a schema for likes (e.g., (user_id, post_id) with timestamp) and counters. Select databases: e.g., Cassandra for like relationships, Redis for counters, and a graph or wide-column store for user liked posts feed.

3. Define API and Core Operations

Outline endpoints: POST /like, DELETE /like, GET /likes/count, GET /likes/check, GET /users/{id}/liked_posts. Specify request/response formats and idempotency keys.

4. Address Scale and Performance

Discuss sharding by user_id or post_id, caching hot counts, using write-ahead logs or queues for asynchronous counter updates, and precomputing feeds for active users.

5. Discuss Trade-offs and Edge Cases

Compare consistency models (strong vs. eventual), handle concurrent likes/unlikes, prevent duplicate likes, and consider privacy and data retention policies.

Key Points to Mention

  • Read-heavy workload: optimize for fast like count and check operations using caching (e.g., Redis) and denormalized counters.
  • Sharding strategy: shard like data by user_id or post_id to distribute load and enable horizontal scaling.
  • Idempotency: ensure like/unlike operations are idempotent to handle retries and avoid double-counting.
  • Asynchronous processing: use message queues (e.g., Kafka) to update counters and feeds asynchronously for eventual consistency.
  • Data modeling: store likes as (user_id, post_id, timestamp) in a wide-column store like Cassandra for efficient lookups by user or post.
  • Trade-offs: balance consistency vs. availability; consider using CRDTs or versioning for concurrent updates.

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