Design an Online Coding Judge
Company: Whatnot
Role: Software Engineer
Category: System Design
Difficulty: easy
Interview Round: Technical Screen
Design a large-scale online coding practice and contest platform.
Users should be able to browse programming problems, submit code in multiple languages, run sample or custom tests, view verdicts and execution details, and see their submission history. The platform also supports timed competitions with leaderboards.
Assume the following scale:
- 10 million registered users and 500,000 daily active users.
- Normal traffic peak: about 2,000 submissions per second.
- Contest peak: 50,000 concurrent participants and up to 10,000 submissions per second during bursts.
- Simple submissions should usually receive a verdict within 5 seconds, but long-running problems may be asynchronous.
Discuss:
1. Core APIs and data models.
2. How code submissions are compiled, sandboxed, executed, and scored.
3. How large test data, execution logs, or artifacts are uploaded and downloaded using signed URLs.
4. How to scale the system during a high-traffic competition.
5. Reliability, security, observability, and trade-offs.
Quick Answer: This question evaluates system design and scalability skills, including distributed architectures, API and data model design, secure sandboxed code execution, artifact storage with signed URLs, and operational concerns such as observability, fault tolerance, and security.