PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Meta

Design an online coding judge

Last updated: Jun 15, 2026

Quick Overview

A Meta software-engineer onsite system-design question: design an online coding judge (LeetCode/HackerRank-style) that compiles and executes untrusted user submissions against hidden tests and grades them asynchronously. It tests secure sandboxed execution with CPU/memory/time limits, a distributed queue-backed worker fleet, data modeling and APIs, test-data versioning and re-judging, anti-cheat, rate limiting/fairness, caching, observability, and contest-scale failure handling.

  • hard
  • Meta
  • System Design
  • Software Engineer

Design an online coding judge

Company: Meta

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

##### Question Design an online coding practice and judging platform (think LeetCode / HackerRank / Codeforces) where users submit solutions that are compiled and executed against hidden test cases, then graded asynchronously. Walk through the end-to-end architecture, APIs, data models, scaling strategy, and failure handling. Address the following: 1. **User-facing features** – user accounts/auth, problem browsing, full-text search and filtering, and per-user submission history. 2. **Submissions** – multi-language support (e.g., Python, Java, C++), an intake API that returns a submission id, and idempotent handling of duplicate/retried submits. 3. **Secure execution** – compile and run *untrusted* code in sandboxed environments with strict CPU, memory, and wall-clock limits, no outbound network, and isolation strong enough to contain a malicious submission. 4. **Asynchronous grading** – a distributed judge worker fleet pulling from a task queue, per-test execution, result aggregation/verdict computation (AC/WA/TLE/MLE/RE/CE), and live status updates (queued / running / accepted / failed). 5. **Storage** – data models for users, problems, submissions, and per-test results; object storage for source code, compile/run logs, and test-data bundles. 6. **Test-data versioning and re-judging** – immutable, versioned test bundles; pinning the exact version a submission ran against; and re-running cohorts of submissions when tests, checkers, or limits change. 7. **Anti-cheat / plagiarism detection** – scalable code-similarity clustering plus behavioral signals. 8. **Rate limiting and fairness** – per-user/IP submission limits, contest priority, and queue backpressure so contest spikes don't starve regular users. 9. **Caching, observability (metrics/tracing/logging), and security isolation.** 10. **Scaling strategy and failure handling** – how the system scales to contest spikes (e.g., 1k submissions/min) and stays correct when workers crash or the queue redelivers a job. Discuss the key trade-offs you make along the way (e.g., container vs. microVM isolation, managed queue vs. event stream).

Quick Answer: A Meta software-engineer onsite system-design question: design an online coding judge (LeetCode/HackerRank-style) that compiles and executes untrusted user submissions against hidden tests and grades them asynchronously. It tests secure sandboxed execution with CPU/memory/time limits, a distributed queue-backed worker fleet, data modeling and APIs, test-data versioning and re-judging, anti-cheat, rate limiting/fairness, caching, observability, and contest-scale failure handling.

Related Interview Questions

  • Design Top-K, Crawler, and Chess Systems - Meta (hard)
  • Design Search And Web Crawling Systems - Meta (medium)
  • Design an Instagram-Style Social Feed - Meta (medium)
  • Design an Online Game Leaderboard - Meta (hard)
  • Design an On-Demand Delivery Platform - Meta (medium)
Meta logo
Meta
Aug 14, 2025, 12:00 AM
Software Engineer
Onsite
System Design
2
0
Question

Design an online coding practice and judging platform (think LeetCode / HackerRank / Codeforces) where users submit solutions that are compiled and executed against hidden test cases, then graded asynchronously. Walk through the end-to-end architecture, APIs, data models, scaling strategy, and failure handling.

Address the following:

  1. User-facing features – user accounts/auth, problem browsing, full-text search and filtering, and per-user submission history.
  2. Submissions – multi-language support (e.g., Python, Java, C++), an intake API that returns a submission id, and idempotent handling of duplicate/retried submits.
  3. Secure execution – compile and run untrusted code in sandboxed environments with strict CPU, memory, and wall-clock limits, no outbound network, and isolation strong enough to contain a malicious submission.
  4. Asynchronous grading – a distributed judge worker fleet pulling from a task queue, per-test execution, result aggregation/verdict computation (AC/WA/TLE/MLE/RE/CE), and live status updates (queued / running / accepted / failed).
  5. Storage – data models for users, problems, submissions, and per-test results; object storage for source code, compile/run logs, and test-data bundles.
  6. Test-data versioning and re-judging – immutable, versioned test bundles; pinning the exact version a submission ran against; and re-running cohorts of submissions when tests, checkers, or limits change.
  7. Anti-cheat / plagiarism detection – scalable code-similarity clustering plus behavioral signals.
  8. Rate limiting and fairness – per-user/IP submission limits, contest priority, and queue backpressure so contest spikes don't starve regular users.
  9. Caching, observability (metrics/tracing/logging), and security isolation.
  10. Scaling strategy and failure handling – how the system scales to contest spikes (e.g., 1k submissions/min) and stays correct when workers crash or the queue redelivers a job.

Discuss the key trade-offs you make along the way (e.g., container vs. microVM isolation, managed queue vs. event stream).

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Meta•More Software Engineer•Meta Software Engineer•Meta System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.