Documentation Index
Fetch the complete documentation index at: https://docs.podflare.ai/llms.txt
Use this file to discover all available pages before exploring further.
Why a pool
A fresh microVM cold-boot from scratch (kernel + init + agent-ready) takes around 1.4 s. A snapshot-restore is ~12 ms. Agents want sandboxes in under 100 ms server-side, every time. The only way is to pre-boot them and hand them out.The shape
create() pops one and
returns instantly; a background refill tops the queue back up.
Lifecycle
Startup
The pool manager launches N boot tasks in parallel. Each task
restores a VM from the seed snapshot (~12 ms per VM).
Steady state
create() pops from the head of the idle queue and returns
instantly — ~6 ms server-side (the actual pop_front + DB
write), ~187 ms end-to-end p50 including network round-trip
from a US laptop (via api.podflare.ai, SDK 0.0.20). The manager
is woken to refill.Choosing the pool size
How many idle VMs the manager tries to keep ready. Production
default is 120 on each US/SG region (96 GB hosts) and 64 on EU
(62 GB host). Set this close to your peak concurrent-create rate on
the host. Each idle warm VM consumes only ~40 MB RSS thanks to
the Pod runtime’s lazy snapshot restore — the nominal RAM allocation
doesn’t get committed until the guest touches a page.
- Too small → bursts hit on-demand boot fallback (slower hot path).
- Too large → committed RAM grows past your host’s headroom; leave ~40 % free for on-demand customer creates and Space resumes.
Observability
Each pool event is logged with structured fields. The hostdpool stats line emits per minute per template:
pool_hit_rate_bp is in basis points (9793 = 97.93 %). /v1/capacity
exposes the same counters as JSON for the edge router and
/status page to consume.
