Benchmarks · all pages

Start

Guides

Reference

Project

  1. Docs
  2. Project
  3. Benchmarks

Benchmarks

Measured against Docker and Kubernetes, with the setup and what the numbers don't show.

  • 4 min read
  • 1 sections

10 nodes, a one-line change rolled out (bench/fleet: Node 24 + Express, a 123 MiB tree; one VM, against kind with 10 workers):

diaporos Kubernetes
One-line change, rollout 1.9–2.5 s 10.9–16.4 s
One-line change, bytes from the server 0.6 KiB once 103 KiB
Cold, bytes from the server 36.8 MiB once 568–811 MiB
Cold at 100 Mbit, rollout 54.3 s 104.2 s

One node, a production NestJS API (277 MiB tree, 67k files; the same Linux VM as Docker + k8s on kind):

Scenario diaporos Docker + k8s
Cold node 26.1 s 42.8 s 1.6×
Cold node at 100 Mbit 55.6 s 106.2 s 1.9×
One-line change 18.9 s (3.7 KiB to the node) 90.4 s 4.8×
Dependency bump 26.0 s (85 KiB to the node) 245.3 s (1.01 GB layer) 9.4×

Three runtimes on one node (examples/: Python 3.12, Node 22 and Go, each a small HTTP service; one sandboxed node on distroless/base, glibc 2.36, with no Python and no libstdc++ installed; local store):

Service Tree Cold deploy One-line change
Python (interpreter + stdlib + bundled libs) 48 MiB, 1144 files 1.5 s (14.7 MiB) 0.15 s (0.8 KiB)
Node (runtime + bundled libstdc++) 119 MiB 1.2–1.6 s (35.8 MiB) 0.10 s (0.6 KiB)
Go (one static binary) 4.4 MiB 0.12–0.15 s (1.7 MiB) 0.11 s (1.0 KiB, a patch)

The node has no per-language code: each tree’s contract names its program. The three one-line deploys ran under continuous traffic to all three services: 44,343 requests, 0 failed.

Zero-downtime swaps: clients keep hitting the public port while releases are redeployed.

Service Load Swaps Requests Failed
hello-svc (Mac, process runner) 8 clients 2 58,466 0
NestJS API (Linux, sandbox runner) 16 clients 2 58,511 / 73,478 0
hello-svc, broken release (exec /usr/bin/false) 8 clients rejected in 0.8 s 28,606 0 (v1 kept serving)
hello-svc, secret rotation (backend → node store; then a failing backend is rejected) 8 clients 2 restarts 96,540 0
NestJS API, secret set + restarts (sandbox) 16 clients 2 restarts 58,534 0
NestJS API under systemd (examples/systemd, sandbox) 16 clients 2 restarts 63,406 0

Under systemd the daemon also survives its own restart: systemctl restart diaporos-node brings the API back from <node>/state in 4.5 s with no fetch (a daemon restart is not zero-downtime; a deploy is). systemctl stop leaves no processes or cgroups behind.

What these show, and don’t:

  • The gains come from transport (trees and patches against what the node runs) and from fast health gating, not from faster builds: your compiler runs the same.
  • Everything ran on one VM or machine with a local network. The single-node Dockerfile copies node_modules from the build context, the worst case for layers. Lazy-pull images (eStargz, Nydus, zstd:chunked) and registry mirrors weren’t compared; they narrow the cold-start gap.
  • Kubernetes spends most of its rollout time on pod churn and 1 s readiness periods: the cost of a general scheduler, which diaporos doesn’t have.

Reproduce them with bench/fleet/ and bench/node/ (with recycled releases, a one-line change materializes in 50–158 ms). examples/ turns a Node, Python or Go service into a tree.

P0: a single 503 KiB Rust binary, and why releases became trees
Scenario Shipped Reuse Timing
Cold node, first deploy 502.8 KiB (32 chunks) n/a fetch 18 ms, assemble 8 ms, healthy 21 ms (48 ms total)
One-line change (same-length constant) 10.7 KiB (2 chunks) 97.9% push 6 ms, warm deploy 27 ms total
Logic change (new HTTP route) 426.7 KiB (25 chunks) 15.1% ⚠️ n/a
Logic change as a binary delta (lzma estimate) ≈ 9–12 KiB ≈ 98% n/a

Content-defined chunking alone fails on real code changes: inserted code shifts addresses throughout the binary. Patches against the release the node already runs fix that, and are how tree releases ship. scripts/one-line-change.sh and scripts/logic-change.sh rerun these.

Kill criteria

Set before phase 1, to stop the project with data rather than a hunch if it isn’t worth it:

Criterion Where it stands
Commit → healthy ≥ 5× faster than docker build + push + pull + run Met for a dependency bump (9.4×). Borderline for small changes: 4.8× on one node, 4.4–8.6× for a 10-node rollout
Bytes shipped ≤ 5% of Docker’s changed layer Met: 85 KiB against a 1.01 GB layer; 0.6 KiB against 103 KiB for a fleet
Someone new deploys a service from the Quickstart in under 10 minutes Not tested yet

If they fail, the conclusion is “BuildKit plus a good CI cache is close enough”. Each roadmap phase has its own exit criterion.

↑↓ to move ↵ to open