Modal vs Fly.io Machines
Modal runs short-lived sandboxes inside an AI compute platform, with GPUs and a 24-hour session limit. Fly.io Machines are microVMs for hosting your own apps near users, with no session cap but a root disk that resets.
The companies and products
Modal
Modal is a serverless cloud for AI work: inference, training, batch jobs and sandboxed code, all driven from Python, TypeScript or Go code.
Modal Sandboxes are containers you create from code, run commands in, and then terminate. By default they run under gVisor, a user-space kernel from Google; since October 2026 you can also pick a VM runtime with its own Linux kernel for Docker and FUSE (Battleships tracks that as a separate card, Modal VM Sandboxes). It suits teams that already run models on Modal and want short-lived, scalable code execution next to their GPUs.
Fly.io Machines
Fly.io is an app hosting platform, and Machines are the microVMs underneath it that you can also start and stop through a REST API.
A Fly Machine boots your Docker image as a Firecracker microVM on Fly's own servers, in one of 17 regions. You pick a shared or performance CPU preset, attach at most one Volume for data that must last, and Fly Proxy can stop, suspend and wake Machines as traffic comes and goes. It is built for teams that host web apps and services worldwide; it is not a sandbox product, so this page compares the parts that overlap with agent work.
Which use cases each one fits
For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “19th cheapest of 345” means 18 of the other 344 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.
| Use case and its workload | Modal: price rank | Fly.io Machines: price rank | bochka: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month | Can't run it | 92nd of 367, with limits $836 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB An always-on agent hits Modal's 24-hour sandbox limit, and a Fly Machine keeps only what sits on its one Volume; bochka runs with no session cap and keeps the whole disk. | 196th of 366, with limits $1,924 a month | 125th of 366, with limits $816 a month | 5th cheapest of 366 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month Modal ranks higher for code interpreter bursts, with fast starts and high concurrency, and Fly is cheaper on paper thanks to shared CPUs with no plan fee. | 19th cheapest of 345 $181 a month | 75th of 345, with limits $94 a month | 186th of 345, with limits $2,000 a month |
| Sandboxes for your users 300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month Modal fits sandboxes for your users fully, while Fly's API creates about one Machine per second per app; bochka ranks first here because stopped sandboxes keep their disk for free. | 11th cheapest of 361 $811 a month | 69th of 361, with limits $600 a month | Cheapest of 361 $209 a month |
| RL rollouts 1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month RL rollouts launch many short sandboxes at once, which is what Modal is built for. | 5th cheapest of 360 $19,038 a month | 48th of 360, with limits $2,838 a month | 34th of 360, with limits $2,000 a month |
| Agent evals 250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month | 59th cheapest of 364 $1,244 a month | 117th of 364, with limits $457 a month | 10th cheapest of 364 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month CI keeps the CPU busy, which drains a shared Fly vCPU's burst balance, and Docker builds on Modal need its VM runtime; bochka runs Docker in every sandbox. | 126th cheapest of 377 $1,793 a month | 152nd of 377, with limits $288 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB | 138th of 368, with limits $23 a month | 118th of 368, with limits $53 a month | 18th cheapest of 368 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month Neither Modal nor Fly ships a desktop, so you build and stream one yourself; bochka has a 60fps desktop, Chromium and computer use built in. | 98th of 369, with limits $183 a month | 95th of 369, with limits $173 a month | 6th cheapest of 369 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month | 177th of 367, with limits $136 a month | 160th of 367, with limits $90 a month | 7th cheapest of 367 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 267th of 346, with limits $394 a month | 161st of 346, with limits $67 a month | 6th cheapest of 346 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month Fly ranks well above Modal for mass scraping, since it can spread scrapers across 17 regions and pay only for the seconds they run. | 223rd of 338, with limits $8,795 a month | 44th of 338, with limits $1,232 a month | 71st of 338, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | Can't run it | 118th of 360, with limits $63 a month | 2nd cheapest of 360 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month Modal has GPUs from T4 to B300; Fly discontinued its GPU Machines and bochka has none, so Modal is the pick for GPU jobs. | 19th cheapest of 98 $1,187 a month | Can't run it | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | Modal | Fly.io Machines | bochka |
|---|---|---|---|
| Kind of product | Serverless AI cloud with sandboxes you create from code | App hosting platform; you boot your own image as a microVM | Agent sandbox: a full VM per agent, ready to use |
| Isolation | gVisor by default; VM runtime with its own kernel available | Firecracker microVM with its own kernel | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Docker inside | Only with the VM runtime | Yes, if you install it yourself | Yes, in every sandbox, with root and systemd |
| Nested virtualization | VM runtime only, Team and Enterprise plans, on request | Not offered (no /dev/kvm) | Yes, /dev/kvm on every machine (Android emulator works) |
| Longest session | 24 hours (default 5 minutes) | No documented cap | No cap on paid plans (default TTL 1 h, changeable) |
| Files after a stop | No paused state; only Volumes keep files | Root file system is ephemeral; one Volume per Machine, billed for its full size all month | Whole disk kept, saved every minute and on stop; a stopped sandbox costs nothing |
| Memory snapshots | Yes, in alpha: snapshotting ends the sandbox, snapshots expire after 7 days | Suspend keeps memory for Machines up to 2GB | No (resume reboots from disk) |
| Fork | Snapshot the filesystem into an image and boot new sandboxes from it | Clone copies a Machine's config; a cloned Volume starts empty | Fork a running sandbox without stopping it, disk included |
| Wake on request | No | Fly Proxy stops idle Machines and wakes them when a request arrives | You start and stop machines through the API |
| GPUs | T4 to B300; 10 at once on Starter, 50 on Team | None (GPU Machines discontinued in 2026) | None |
| Desktop and computer use | Not offered; an example shows how to set up VNC yourself | None built in; you add it to your own image | 60fps desktop, Chromium, computer use and browser control built in |
| Coding agents and keys | Examples only; secrets are environment variables or your own sidecar proxy | None built in; secrets are environment variables, or deploy Fly's tokenizer proxy yourself | Claude Code, Codex and more preinstalled, driven from outside; credentials proxy for any HTTPS API |
| Outbound rules | Block all, IP-range allowlist, domain allowlist (beta) | Network policies allow chosen ports and protocols | Open internet; no provider-side allowlist |
| Regions | US, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75x | 17 regions on six continents | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Modal | Fly.io Machines | bochka |
|---|---|---|---|
| Full VM (own kernel) | No | Yes | Yes |
| Docker inside | No | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Yes | No | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | No | Yes | Yes |
| Automatic snapshots | No | Yes | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | No | Yes | Yes |
| Memory fork | Yes | No | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | No | Yes | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | Yes | Yes | Yes |
| Public IPv4 | No | Yes | No |
| Egress allowlist | Yes | Yes | No |
| Secret proxy | No | No | Yes |
| Secret proxy for any API | No | No | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | No | No | Yes |
| MCP server | No | Yes | No |
| GPU | Yes | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | No | No | No |
| BYOC | No | No | No |
| Open source | No | Yes | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | No | Yes |
| Usage per sandbox (API) | Not published | No | Yes |
| Audit logs | Yes | Not published | No |
| SSO | Yes | No | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | Yes | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
In the same public benchmark run at 4 vCPU / 8 GB, bochka finished 26.69 Node.js build-and-test runs per second and Modal's default sandbox finished 12.79, so bochka did about twice the work. Fly.io Machines have no comparable measurement, and their speed depends on the CPU class: shared vCPUs guarantee only 6.25% of a core, performance vCPUs get the full core.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Modal measured on: Sandbox (gVisor), request = size, any region. Fly.io Machines has no published run in this suite yet, so there is no like-for-like number to compare.
Pricing in five scenarios
Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.
| Scenario | Modal, a month | Fly.io Machines, a month | bochka, a month |
|---|---|---|---|
| One coding agent, workdays 4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days | $15 · Starter · with limits | $15 · Pay As You Go · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $178 · Starter · with limits | $36 · Pay As You Go · with limits | $26 · $20/mo |
| 50 agents in parallel 50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside | $2,229 · Starter · with limits | $487 · Pay As You Go · with limits | $317 · $20/mo × 3 seats |
| Sandboxes for your users 2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once | $792 · Team | $110 · Pay As You Go · with limits | $200 · $100/mo × 2 seats |
| 1,000 short jobs at once 2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month | $3,193 · Team · with limits | $232 · Pay As You Go · with limits | $2,000 · $2000/mo · with limits |
Modal: Modal bills by the second for the CPU and memory you request or use, whichever is higher, and an idle sandbox pays until it is terminated. Starter is free with $30 of monthly credit and Team is $250 a month with $100 of credit.
Fly.io Machines: Fly bills each Machine per second while it runs, with no plan fee; stopped Machines pay for their root file system and Volumes are billed for their full size all month. The table uses Fly's lowest rate: shared vCPUs on a 1-year reservation.
Fly.io Machines: bochka plans start at $20 a month and the whole fee becomes usage credit, spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
On Modal, sessions end within 24 hours on Starter and anything outside a Volume resets, and the 50-agent fleet does not fit because Docker needs the VM runtime. Fly's lowest prices need a 1-year commitment and use shared vCPUs that guarantee only 6.25% of each core, so long builds get throttled. Modal is the only one of the three that fits the 1,000-job burst; bochka queues it because of its start limits per minute and per day.
| Scenario | Modal | Fly.io Machines | bochka |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users | None that bite |
| None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use Modal when
your sandboxes need GPUs, or are huge bursts of short jobs that finish within minutes.
- GPUs next to your sandboxes. If your agent trains or runs models, Modal rents GPUs from T4 to B300 on the same platform; Fly no longer sells GPUs.
- Built for huge bursts of short jobs. For RL rollouts and code runs, Modal starts sandboxes fast and runs up to 5,000 containers at once on Team.
- Domain-level outbound rules. If you must limit where code can connect, Modal can block all traffic or allow only chosen IP ranges or domains.
Use Fly.io Machines when
you host web apps or light services near users around the world that sleep between requests and wake on traffic.
- No session cap and a real VM. For long-running work, a Fly Machine runs until you stop it, as a Firecracker microVM where you can install Docker.
- 17 regions worldwide. If your users are spread around the world, Fly runs Machines in 17 regions on six continents.
- Wake on request. For services that sleep between requests, Fly Proxy wakes a Machine when traffic arrives, and small Machines resume with memory kept.
Where bochka fits
If what you are really running is coding or computer-use agents that work for hours, both Modal and Fly make you build the sandbox yourself. bochka gives each agent a full VM with Docker, /dev/kvm, a desktop and coding agents, on a disk that survives every stop.
A disk that keeps everything
On Modal a sandbox ends within 24 hours and only Volumes keep files; on Fly the root file system is ephemeral and the one Volume is billed for its full size even while stopped. bochka keeps the whole disk and a stopped sandbox costs nothing.
Docker, /dev/kvm and a desktop ready
Modal needs its VM runtime for Docker, and Fly has no /dev/kvm and no systemd, so emulators and nested VMs are out. Neither ships a desktop, so you set up VNC yourself. bochka has all of it in every sandbox.
Agents driven from outside, keys kept out
On both, you install the agents, write the code that drives them, and pass keys as environment variables an injected prompt can read, unless you run your own proxy. bochka has agents preinstalled and a credentials proxy for any HTTPS API.
Use bochka when your agents work for hours or days: installs, builds, tests, Docker and a desktop, on a fast full VM that keeps its disk and never cuts them off. Compare it one to one: bochka vs Modal and bochka vs Fly.io Machines.
Questions people ask
Is Modal cheaper than Fly.io Machines?
Usually not. One agent running all month is $178 on Modal and $36 on Fly, and 50 parallel agents are $2,229 against $487. Fly's figures use shared vCPUs on a 1-year reservation, which get throttled under sustained load; bochka is $26 and $317 for the same scenarios.
Which is faster, Modal or Fly.io Machines?
There is no comparable measurement for Fly. In the same benchmark run, Modal's default sandbox did 12.79 Node.js build-and-test runs per second and bochka did 26.69. On Fly, speed depends on whether you choose shared or performance vCPUs.
Can Modal or Fly.io Machines run Docker?
Modal runs Docker only with its VM runtime. On Fly you can install Docker yourself, since a Machine is a microVM with root, but there is no /dev/kvm for nested VMs. Every bochka sandbox has Docker, systemd and /dev/kvm ready.
How long can a session last on Modal and Fly?
A Modal sandbox lasts at most 24 hours, with a 5-minute default. A Fly Machine has no documented cap and runs until you stop it. bochka has no session cap on paid plans.
Do Modal or Fly Machines keep files after a stop?
Only in Volumes on both. Modal has no paused state, and a Fly Machine's root file system is ephemeral. bochka keeps the whole disk, with snapshots every minute and on stop.
Which one has GPUs?
Modal, with GPUs from T4 up to B300. Fly discontinued its GPU Machines in 2026, and bochka has no GPUs.
Try bochka
Install the CLI, then run bochka new.
Product preview