Skip to main content

Sandbox Architecture Overview

StateSet Sandbox runs in Kubernetes with a controller that manages sandbox lifecycles, a warm pod pool for fast startup, and isolated execution runtimes.

Core Components

  • Controller: Stateless API service that provisions and manages sandboxes
  • Warm Pod Pool: Pre-initialized pods to reduce startup latency
  • State Stores: Redis for coordination and Postgres/CloudSQL for persistence
  • Isolated Runtimes: gVisor, Kata, or container isolation by policy

Request Flow

  1. Client calls the Sandbox API.
  2. Controller claims a warm pod (or creates one).
  3. Pod is configured for the org and timeout.
  4. Exec/WebSocket streams connect to the sandbox.

Performance Model

Warm pool provisioning keeps sandbox creation typically under 100ms for common profiles.