Skip to content

Fast Sandbox Integration ​

Fast Sandbox is a runtime backend that connects OpenSandbox to the external fast-sandbox platform. It provisions template-backed sandboxes — containers, gVisor, Kata, or Firecracker microVMs — inside pre-warmed Fastlet pods, removing the per-sandbox Kubernetes scheduler, watch propagation, and kubelet path from the creation hot path.

The adapter and endpoint integration live in this repository. FastPath, the Fastlet runtime, and the sandbox.fast.io CRDs are owned by the fast-sandbox platform and consumed as-is.

How it fits ​

  • Backend selection: Fast Sandbox is not a separate runtime.type. Under runtime.type = "kubernetes", CompositeSandboxService routes create requests carrying templateId to FastSandboxService, and dispatches operations on existing fsb- prefixed sandbox IDs to it. Image- and snapshot-based requests keep using the Kubernetes workload providers.
  • Control protocol: the server and ingress talk to the fast-sandbox control plane (FastPath v2) over gRPC. FastPath owns mutations and live runtime operations; reads of persisted state use Kubernetes LIST/WATCH on sandbox.fast.io custom resources.
  • Tenancy: a tenant provider maps each authenticated tenant to a fast-sandbox namespace; request-scoped operations resolve it from context, background work falls back to a lookup by sandbox ID.

Fast Sandbox architecture

Core components ​

ComponentResponsibilityDesign goal
FastPath (gRPC control plane)Serves every mutation and live operation: create, update, expiry, endpoint resolution, snapshotsConstant-time create via in-memory placement; restartable because durable state lives in CRDs, not here
Reconcilers (controller)Drive CRs to reality: build templates, run pools, place sandboxes, finish snapshotsConverge by observation — no leader election, replay from CRs after any restart
Sandbox CRDs (sandbox.fast.io)Durable record of intent, placement, policy bindings, and observations per sandboxIntent survives every component failure; the CR is the source of truth
Fastlet (pre-warmed pod)Hosts many sandboxes in one network domain; provides runtime capacity and shared servicesDensity with isolation: pre-provisioned network slots, shared egress and DNS amortized across sandboxes
Runtime agent (per node)Owns Firecracker VM lifecycle over a unix socket; node readiness checks and self-labeling; installs assetsNode autonomy: the control plane delegates, the node verifies itself before admitting workloads
DART (per node)Peer-to-peer artifact delivery between node state rootsAmortize the origin: each block fetched from the store roughly once cluster-wide
Egress process (per Fastlet)Multi-sandbox outbound policy: subjects, Sandbox Actions handler, DNS and network enforcementFail-closed per-sandbox policy without per-sandbox sidecars — policy may be late, never open
Template builderConverts OCI images into golden-image artifacts (guest wiring, init, execd baked in)Workload fixed before any request: creates express intent, not configuration
JanitorSweeps orphaned resources of failed operationsReconciliation finishes interrupted work; the janitor removes what should no longer exist

Design principles ​

  • No new public API: template-based creation and fsb- ID dispatch ride the existing lifecycle contract. SDKs work unchanged across backends, and no sandbox-to-backend registration store exists — the ID prefix is the dispatcher.
  • CRD-first control: durable per-sandbox intent lives in sandbox.fast.io resources; FastPath gRPC carries the mutation hot path. The Kubernetes scheduler, watch propagation, and kubelet leave the create path — the durable write does not.
  • Fail-closed multi-tenant egress: every subject denies traffic from registration until its data plane is ready — policy delivery can be late, never early-open.
  • Authenticated routing: sandbox routes are signed f1. scopes verified at ingress; endpoint issuance is decoupled from readiness.
  • MicroVM-ready: one integration serves container and Firecracker golden images, selected by template rather than by request.

Documentation ​

PageContent
TemplatesTemplate catalog, golden-image builds, artifact publication
SchedulingPools and Fastlets, the create hot path, lifecycle and pause/resume
NetworkingNetwork slots, inbound route scopes and resolution, outbound egress enforcement
Pause, Resume, and SnapshotsCheckpoint artifacts, pause/resume across Fastlets, snapshot publication and restore
High AvailabilityWhat survives which failure: control plane, nodes, sandboxes
StorageArtifact store, peer-to-peer block delivery, node state roots
FirecrackerHost requirements, per-VM networking model, agent delegation
PerformanceMeasured create, boot, and pause/resume characteristics

Released under the Apache 2.0 License.