Methodology
We compare the cost per execution-second: the cost of running one isolated execution for one second.- Sandbox providers: minimum allocatable memory × provider’s per-GiB-second rate. We use the cheapest provider (Cloudflare Containers) as the baseline.
- Secure Exec: EC2/Hetzner instance cost ÷ number of concurrent executions that fit in RAM, with 30% empty capacity overhead to account for bin-packing inefficiency.
Results
All pricing as of March 2026. Almost all software runs on ARM today — we recommend comparing against ARM as a baseline.| Provider | Arch | $/exec-second | vs. Sandbox |
|---|---|---|---|
| Cloudflare Containers (baseline) | — | $6.25 × 10⁻⁷ | 1× |
| AWS t4g.micro (ARM/Graviton) | arm64 | $1.11 × 10⁻⁸ | 56× cheaper |
| AWS t3.micro (x86/Intel) | x86_64 | $1.38 × 10⁻⁸ | 45× cheaper |
| Hetzner CAX11 (ARM/Ampere) | arm64 | $1.64 × 10⁻⁹ | 380× cheaper |
| Hetzner CX22 (x86/Intel) | x86_64 | $2.69 × 10⁻⁹ | 232× cheaper |
Pricing Sources
- Cloudflare Containers: $0.0000025/GiB·s, 256 MB minimum
- AWS EC2 t4g.micro: $0.0084/hr, 1 GiB RAM
- AWS EC2 t3.micro: $0.0104/hr, 1 GiB RAM
- Hetzner CAX11: €3.29/mo, 4 GiB RAM
- Hetzner CX22: €5.39/mo, 4 GiB RAM
Scenario Breakdown
Lightweight Code Snippets
This is where Secure Exec shines the most.- ~3.4 MB baseline instead of 256 MB — you fit ~75× more executions per GB of RAM
- Executions are bin-packed onto instances to maximize capacity utilization
- Cold starts are ~16 ms (p95) instead of ~950 ms — you’re not paying for time waiting for a sandbox to boot
- On Hetzner ARM, lightweight snippets are 380× cheaper than the cheapest sandbox provider
Heavyweight Execution (e.g. Dev Servers)
Memory overhead matters less when dev servers use 512 MB+ regardless.- The advantage shifts to hardware choice: you pick your cloud, instance type, and region
- Sandbox providers vendor-lock you to their hardware and pricing
- Self-hosted options like Hetzner or AWS Spot instances can dramatically reduce costs
- No egress fees on most self-hosted providers
Summary
| Workload | Primary cost advantage |
|---|---|
| Light snippets | 56–380× cheaper (memory + cold start) |
| Heavy (dev servers) | Hardware choice, no vendor lock-in |
| High concurrency | Bin-packing, no per-sandbox minimums |