What It Takes to Design a System Like LeetCode
Most of the time, a LeetCode-style system serves read-heavy traffic. Then a contest starts, and within a few minutes thousands of users submit code that has to be evaluated in language-specific execution environments under strict limits. That shift from browsing to a burst of untrusted execution is what the architecture has to be built around.
The platform also supports workloads with very different demands. Practice emphasizes problem discovery and submission feedback; contests add plagiarism checks and frequent leaderboard updates; and discussions and history depend more heavily on persistent storage and retrieval.