You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tier 2 prior art — hosting per-app server-side runtimes #13
How do platforms host per-app server-side code for many tenants at once? Isolates (Cloudflare Workers, Deno Deploy, Vercel Edge), microVMs (Firecracker, Fly Machines), containers, functions (AWS Lambda), and worker models (Windmill, Val Town): cold start, isolation boundary, secrets, egress control, per-tenant limits, and what the app developer actually sees and writes.
Product-level output: what tier 2 can offer, at what cost. docs/research/tier-2-prior-art.md on branch research/tier-2-prior-art. Waits on it: Runtime tiers 0 / 1 / 2.
Three isolation boundaries are in production use. V8 isolate in a shared process (Cloudflare Workers, Deno Deploy Classic, Vercel Edge); OS process with namespaces + seccomp (Val Town, Windmill, Docker/gVisor); Firecracker microVM with its own kernel (Lambda, Fly Machines, Cloudflare Containers, Vercel Sandbox, Deno Sandbox, Lambda MicroVMs). Every vendor that lets strangers run arbitrary Linux code (not just permission-flagged JS) chose the microVM; the isolate vendors document extra layers and workerd's own README says it is not safe for malicious code without a VM around it.
Cold start is set by the boundary, not the vendor: isolate ≈ 0–5 ms; pooled process ≈ tens of ms (Windmill ~50 ms queue-to-result overhead, Val Town "cut 100 ms"); Deno Deploy "within 100 ms" for hello-world; Firecracker ≤ 125 ms to /sbin/init plus app init; Lambda "under 100 ms to over 1 second", under 1% of invocations; container images 1–3 s.
Snapshot-restore is what makes VM-per-app affordable at low traffic: Lambda SnapStart, Lambda MicroVMs (Dockerfile → Firecracker snapshot), Fly suspend (≤ 2 GB, "a few hundred ms" vs "~2+ seconds" cold), Vercel/Deno sandbox snapshots. The products that clone one snapshot into many VMs (Firecracker, SnapStart, Lambda MicroVMs) all document the same caveat: identifiers, entropy and network connections must be regenerated after restore.
Secrets mostly converge on one contract: write-only after creation (Cloudflare, Deno Deploy, Vercel "sensitive" variables, Fly, Val Town), delivered as env vars or bindings at start. Lambda is the exception: env vars are KMS-encrypted at rest but readable back by anyone with kms:Decrypt. The weakness is universal: anyone who can deploy can print them (Fly says so verbatim). Two outliers worth copying: Windmill fetches secrets at run time through a per-job token with audit logging; Deno Sandbox never lets secrets into the VM and substitutes them at the egress proxy for approved hosts only.
Egress control is the least standardised dimension. Cloudflare has Outbound Workers and container allowedHosts / outbound handlers; Vercel Sandbox and Deno Sandbox have optional host allowlists; Lambda defaults to public internet with VPC + security groups as the only filter; Fly documents static egress IPs but no filtering; Firecracker does "no network traffic filtering" itself, the host must; Val Town publishes egress IP ranges only.
Per-tenant limits follow the boundary too. Isolates meter CPU time, not wall time (Workers: 10 ms free, 30 s default, 5 min max, 128 MB per isolate; Workers for Platforms lets the dispatcher set cpuMs and subRequests per request). VMs and containers meter reservations (Fly 256 MB minimum; Lambda 128 MB–10 GB and 15 min; Cloudflare Containers lite = 1/16 vCPU, 256 MiB). Process platforms sit between (Val Town 1 min free / 10 min paid, 4 GiB worker; Deno Deploy 512 MB–4 GB per app, billed in CPU-hours + GB-hours).
Scale-to-zero with short idle timeouts is universal: Deno Deploy stops an app after 5 s–10 min idle; Val Town idles workers at 10 s; Fly's proxy stops or suspends machines on traffic; Lambda freezes after each invoke. A tier-2 promise should be "starts on request, stops when idle", not "always on".
The developer writes one of three things: (a) a fetch handler(Request) => Response (Workers, Val Town, Vercel, Deno Classic); (b) a whole app — an OCI image or build that listens on a port (Fly, new Deno Deploy, Cloudflare Containers, Lambda via container image or Web Adapter); (c) a main(args) function whose signature becomes a form and an HTTP route (Windmill). The handler shape gives the platform the most control; the whole-app shape gives the developer the most freedom and the platform the least.
Products built to host other people's small apps (Workers for Platforms, Deno Subhosting, Val Town) all landed on a handler shape in an isolate or pooled process; only Workers for Platforms adds per-request CPU-ms limits and in-runtime outbound interception. Products built for arbitrary/agent code (Vercel Sandbox, Deno Sandbox, Lambda MicroVMs, Fly Sprites) all landed on a microVM with snapshot or checkpoint restore. Nobody serves both from one runtime.
Cost of each model for Patchy: isolate — best density and cheapest metering, but JS/Wasm only, no filesystem, 128 MB, and you must run workerd yourself inside a VM plus namespaces/seccomp; process — cheapest to build (Deno/Bun under nsjail or permission flags, pooled) but shares the host kernel, and Val Town confines it to Deno-permissioned JS, not binaries; microVM — any language, kernel boundary, ≤ 125 ms boot, ~5 MiB VMM overhead, but needs KVM on bare metal, jailer, host firewalling, one Firecracker process per tenant, and a snapshot story.
For a platform hosting many small internal tools the field's answer is a two-shape offer: handler-shaped TS in a pooled per-app process (or isolate) as the default, and a Firecracker microVM from an OCI image for "bring a whole app".
Pricing anchors the trade-off: Workers for Platforms is $25/month incl. 1,000 scripts, 20 M requests and 60 M CPU-ms; a running Fly shared-cpu-1x 256 MB machine is ~$2/month and a stopped one $0.15/GB-month of rootfs; Vercel Sandbox is $0.128 per active-CPU-hour. CPU-ms metering lets a platform hold thousands of near-idle tools for roughly nothing; VM reservations do not, unless the VMs are stopped or suspended between requests.
Open questions
What the new Deno Deploy's "isolated Linux environment" actually is (container, gVisor, microVM); the docs do not say.
Whether Windmill's PID-namespace isolation is on by default: the README says "enabled by default", the isolation page says it "must be manually configured".
Deno Deploy and Val Town publish no per-request CPU-time limit — only wall-clock and memory — so it is unknown whether a CPU-bound tenant is throttled or merely timed out.
Fly's Sprites blog does not say whether the outer VM is Firecracker (the Sprites post only says "KVM micro-VMs") or what the inner "container" is.
Fly documents no egress filtering at all; whether it exists as an undocumented feature is unknown.
No primary source gives a measured cold-start distribution for pooled process-per-app at scale; Val Town's "cut 100 ms" is a delta, not an absolute.
Lambda MicroVMs' launch/resume time is described only as "near-instant"; no number is published.
The Lambda security whitepaper's SnapStart paragraph still says "Java11 runtime" only while the developer guide lists Java, Python and .NET; the whitepaper is stale in places.
Deno Sandbox and Vercel Sandbox both restore VMs from snapshots but neither documents a uniqueness/entropy caveat; whether they reset entropy per tenant is unknown.
"What the app developer actually sees" is answered only for the code shape and HTTP surface; logs, metrics and error surfaces per platform were not surveyed.
Activity
allisonmahmood commentedon Aug 26, 2026
Resolution
Research written and adversarially verified against every cited source (95 sources; each factual claim re-opened and checked). File: https://github.com/allisonmahmood/patchy-cloud/blob/research/tier-2-prior-art/docs/research/tier-2-prior-art.md
Summary
/sbin/initplus app init; Lambda "under 100 ms to over 1 second", under 1% of invocations; container images 1–3 s.kms:Decrypt. The weakness is universal: anyone who can deploy can print them (Fly says so verbatim). Two outliers worth copying: Windmill fetches secrets at run time through a per-job token with audit logging; Deno Sandbox never lets secrets into the VM and substitutes them at the egress proxy for approved hosts only.allowedHosts/ outbound handlers; Vercel Sandbox and Deno Sandbox have optional host allowlists; Lambda defaults to public internet with VPC + security groups as the only filter; Fly documents static egress IPs but no filtering; Firecracker does "no network traffic filtering" itself, the host must; Val Town publishes egress IP ranges only.cpuMsandsubRequestsper request). VMs and containers meter reservations (Fly 256 MB minimum; Lambda 128 MB–10 GB and 15 min; Cloudflare Containerslite= 1/16 vCPU, 256 MiB). Process platforms sit between (Val Town 1 min free / 10 min paid, 4 GiB worker; Deno Deploy 512 MB–4 GB per app, billed in CPU-hours + GB-hours).(Request) => Response(Workers, Val Town, Vercel, Deno Classic); (b) a whole app — an OCI image or build that listens on a port (Fly, new Deno Deploy, Cloudflare Containers, Lambda via container image or Web Adapter); (c) amain(args)function whose signature becomes a form and an HTTP route (Windmill). The handler shape gives the platform the most control; the whole-app shape gives the developer the most freedom and the platform the least.shared-cpu-1x256 MB machine is ~$2/month and a stopped one $0.15/GB-month of rootfs; Vercel Sandbox is $0.128 per active-CPU-hour. CPU-ms metering lets a platform hold thousands of near-idle tools for roughly nothing; VM reservations do not, unless the VMs are stopped or suspended between requests.Open questions