System Design
20. System Design Case StudiesAnimated
Cloud-Based Code Execution Platform
Run untrusted user code safely.
The idea
Sandboxed containers with CPU, memory and time limits run each submission.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
Untrusted code arrives with limits.
- step:
- 1/4
- at:
- Code + tests
1/10
The green dot is a request moving through the system.
Step by step
- 1Receive code
- 2Queue it
- 3Run in an isolated sandbox with limits
- 4Return output
Where it is used
Online judges and notebooks.
Watch out for
Sandbox escapes and abuse.