- The pool keeps
warm_containersidle containers booted and waiting. - Creating a sandbox from the pool claims a warm container if one is available; otherwise a new container cold-starts on demand.
- After a claim, the pool boots a replacement to restore the warm buffer.
max_containerscaps the pool’s total (warm + claimed) containers. At the cap, new sandboxes staypendinguntil a slot frees up.
Creating a Pool
- Python
- TypeScript
- HTTP
- CLI
Pool configuration
The HTTP API additionally accepts
exposed_ports, network (egress policy), and allow_unauthenticated_access, with the same semantics as sandbox creation. Root disk size is server-managed for pool containers; ephemeral_disk_mb is accepted but ignored.
Creating a Sandbox from a Pool
Passpool_id to Sandbox.create(). This claims a warm container when one is available.
- Python
- TypeScript
- HTTP
- CLI
When claiming from a pool, the sandbox
name and file_systems parameters are ignored because the container is already booted from the pool’s template.Managing Pools
Get a Pool
get_pool returns the pool configuration plus its current containers. Containers with no sandbox_id are warm and unclaimed.
- Python
- TypeScript
- HTTP
List Pools
- Python
- TypeScript
- HTTP
Update a Pool
update_pool replaces the pool configuration. image is required on update. The warm buffer reconciles to the new settings; already-claimed sandboxes are unaffected.
- Python
- TypeScript
- HTTP
Delete a Pool
Deleting a pool tears down its warm containers. If sandboxes claimed from the pool are still active, the delete fails withPoolInUseError (HTTP 409). Terminate the sandboxes first, or pass force=true over HTTP to terminate them along with the pool.
- Python
- TypeScript
- HTTP
Async
AsyncSandboxClient exposes the same pool methods (create_pool, get_pool, list_pools, update_pool, delete_pool, claim) as coroutines, and AsyncSandbox.create(pool_id=...) claims from a pool. See Async.
Related Guides
Lifecycle
Create, suspend, resume, and terminate sandboxes.
Build and Import Images
Build the custom images your pools boot from.
Snapshots
Capture and restore sandbox state. Snapshot restores cold-boot and don’t claim warm containers.
Networking
Egress policies you can set on a pool’s template.