Which is better, Cloudflare Sandbox or Prime Sandboxes?
It depends on whether you serve users or train models. For agents that wait on a model, Runtime has the lowest cost, $0.64 on the benchmark against $1.35 on Cloudflare and $1.52 on Prime, and it keeps a sandbox's memory across pauses. Pick Cloudflare Sandbox for Workers apps that want sandboxes at the edge; pick Prime Sandboxes for large, parallel RL rollouts, with 1,024 sandboxes to start.
At a glance
| Cloudflare Sandbox | Prime Sandboxes | Runtime | |
|---|---|---|---|
| Isolation | A container in its own VM | Hardware-virtualized microVM, own guest kernel | Firecracker microVM, own kernel |
| CPU | $0.072 per active vCPU-hour | $0.02 per vCPU-hour while running | $0.025 per vCPU-hour of measured CPU, with a small floor |
| Memory | $0.009 per provisioned GiB-hour, 3 GiB per vCPU at least | $0.0125 per GiB-hour | $0.0075 per reserved GiB-hour |
| Largest | 4 vCPUs, 12 GiB, 20 GB | 16 vCPUs, 64 GiB, 128 GiB of disk | 16 vCPUs and 64 GiB, paid |
| Idle | Filesystem-only snapshots; processes restart | Idle timeout off by default | Pause keeps memory while you have credit |
| Fleet | 1,500 vCPUs per account | 1,024 sandboxes, 4,096 vCPUs to start | 100 sandboxes, 200 vCPUs |
Edge or scale
Cloudflare places a sandbox near the user who asked for it and bills only the CPU that works, but forces memory up with CPU. Its public-beta snapshots preserve files after a stop, but not memory or processes. Prime runs large microVMs in the thousands at a flat low rate. Both suit short tasks; neither keeps a sandbox's memory between steps today.
Cost for the same job
The benchmark, 60 seconds a run (6 GiB and a 12 GB disk on Cloudflare, 5 GiB of disk on Prime):
- CPU
- 1,000 × 20 s × $0.000020
- $0.40
- Memory
- 1,000 × 60 s × 6 × $0.0000025
- $0.90
- Disk
- 1,000 × 60 s × 12 × $0.00000007
- $0.05
- CPU
- 1,000 × 60 s / 3,600 × 2 × $0.02
- $0.67
- Memory
- 1,000 × 60 s / 3,600 × 4 × $0.0125
- $0.83
- Disk
- 1,000 × 60 s / 3,600 × 5 × $0.0002
- $0.02
- CPU
- 1,000 × 20 s / 3,600 × $0.025
- $0.14
- Memory
- 1,000 × 60 s / 3,600 × 4 × $0.0075
- $0.50
With both CPUs busy for the whole minute, the job costs $3.35 on Cloudflare, $1.52 on Prime and $1.33 on Runtime.
Which one to pick
- Cloudflare Sandbox for Workers apps that want sandboxes at the edge.
- Prime Sandboxes for large, parallel RL rollouts.
- Runtime for the lowest cost and memory kept across pauses.
See Runtime vs Cloudflare Sandbox and Runtime vs Prime Sandboxes.
Runtime Cloud
Runtime costs 53% less than Cloudflare and 58% less than Prime on it. 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox with 20 CPU-seconds of work each: $1.35 on Cloudflare Sandbox (priced at its 6 GiB minimum), $1.52 on Prime Sandboxes and $0.64 on Runtime.
Try Runtime free through npx withruntime login. If your code already runs on another provider, the migration guide shows the switch.
Sources
Cloudflare sandbox lifetime, snapshot behavior checked 25 October 2026. Cloudflare rates checked 25 October 2026; Prime Sandboxes rates checked 25 October 2026.
Cloudflare Containers pricing, Containers limits and instance types
Runtime pricing
Facts on this page were checked on 26 October 2026.