← Meta Interview Insights

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

Senior
Apr 2026

Summary

Meta onsite for a software engineer role, two back-to-back system design sessions. Both questions were meaty and required going deep on architecture, trade-offs, and security. Left feeling like I could've structured my time better on the first one.

Questions Asked (2)

Q1

Design an online judge platform that compiles and runs user-submitted code across multiple languages, evaluates it against public and hidden test cases, enforces time and memory limits, and returns verdicts like Accepted, Wrong Answer, Runtime Error, and Time Limit Exceeded. Cover APIs, storage, worker scheduling, sandboxing, burst handling during contests, and security.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This one ate most of my mental energy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., number of users, submissions per contest, language support), then design a high-level architecture with separate submission, compilation, and execution services. Focus on the critical components: sandboxed execution with resource limits, a scalable worker pool with priority queues for contests, and robust security measures. Discuss trade-offs like synchronous vs asynchronous processing and containerization vs VMs.

Pro tip: Emphasize the importance of idempotency and exactly-once processing for submissions, and how you would handle partial failures in the pipeline. Also, mention the need for a feedback loop to detect and mitigate new attack vectors in the sandbox.

1. Clarify Requirements and Scale

Ask questions to understand expected load (e.g., submissions per second during contests), supported languages, and security requirements. Define functional and non-functional requirements.

2. High-Level Architecture

Outline the main components: API gateway, submission service, compilation service, execution workers, result evaluator, and storage. Explain the flow from submission to verdict.

3. Sandboxing and Resource Limits

Detail how to isolate user code using containers or microVMs, enforce CPU/memory limits, and prevent network/file system access. Discuss time and memory limit enforcement.

4. Scaling and Burst Handling

Describe worker pool autoscaling, queue prioritization for contest submissions, and strategies to handle bursts (e.g., pre-warming workers, rate limiting).

5. Security and Reliability

Cover security measures like seccomp, AppArmor, and regular sandbox updates. Discuss monitoring, logging, and failure recovery to ensure reliability.

Key Points to Mention

  • Use of containerization (Docker) or microVMs (Firecracker) for sandboxing with resource limits via cgroups.
  • Asynchronous processing with message queues (e.g., Kafka, RabbitMQ) to decouple submission from execution and handle bursts.
  • Priority queues to ensure contest submissions are processed with lower latency than practice submissions.
  • Idempotent submission processing and exactly-once semantics to avoid duplicate evaluations.
  • Security best practices: seccomp profiles, read-only file systems, no network access, and regular sandbox updates.
  • Storage design: object storage for code and test cases, relational DB for metadata, and caching for frequently accessed data.

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

Q2

Design a live comment feature for a social media post where new comments appear in near real-time for users viewing the post. Walk through the write path, read path, comment ordering, moderation, and how clients receive updates. Compare long polling, Server-Sent Events, and WebSockets, and explain how you'd handle hot posts with very high fan-out.

System DesignTechnical Trade-offsData Modeling
Author's notes

Felt more comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, latency, consistency) and then walk through the write and read paths, emphasizing how comments are stored and ordered. Compare long polling, SSE, and WebSockets, and explain how you'd handle hot posts with high fan-out using a hybrid approach.

Pro tip: Demonstrate awareness of trade-offs by acknowledging that no single solution fits all scenarios; propose a hybrid approach (e.g., WebSockets for active users, long polling as fallback) and discuss how to handle hot posts with techniques like sharding and fan-out on write vs. read.

1. Clarify Requirements and Scope

Ask about scale (DAU, comments per post), latency expectations (near real-time), consistency (eventual vs. strong), and moderation needs. This sets the stage for design decisions.

2. Design Write and Read Paths

Outline how comments are written (API gateway, validation, moderation, storage) and read (fetching comments, ordering, pagination). Discuss data modeling (e.g., comment ID, post ID, timestamp, author) and storage choices (SQL vs. NoSQL).

3. Compare Real-Time Delivery Mechanisms

Compare long polling, SSE, and WebSockets in terms of latency, overhead, scalability, and client support. Recommend a primary mechanism (e.g., WebSockets) with fallbacks.

4. Address Hot Posts and High Fan-Out

Explain strategies for hot posts: sharding by post ID, fan-out on write vs. read, using a pub/sub system (e.g., Kafka, Redis Pub/Sub), and possibly rate limiting or batching updates.

5. Discuss Moderation and Ordering

Describe moderation pipeline (pre- or post-moderation, automated filters, human review) and how it affects real-time delivery. Explain comment ordering (chronological, threaded, ranked) and how to handle updates.

Key Points to Mention

  • Write path: API gateway, validation, moderation, storage (e.g., Cassandra for scalability).
  • Read path: fetching comments with pagination, caching, and ordering (e.g., by timestamp or rank).
  • Real-time delivery: WebSockets for bidirectional, SSE for server-to-client, long polling as fallback; trade-offs in scalability and latency.
  • Hot posts: sharding, fan-out on write vs. read, pub/sub, and load balancing.
  • Moderation: automated filters, human review, and how to handle moderated comments in real-time.
  • Comment ordering: chronological vs. threaded vs. ranked; handling updates and deletions.

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