Skip to content
StackDecode
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.

Code + testsAPIJob queueSandboxed worke…Results
  • 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

  1. 1Receive code
  2. 2Queue it
  3. 3Run in an isolated sandbox with limits
  4. 4Return output

Where it is used

Online judges and notebooks.

Watch out for

Sandbox escapes and abuse.

Related