1 GB server test · protocol v2 · Ubuntu 24.04.5 LTS on a $6 droplet (1 vCPU / 1 GB)
Capacity: 4500 VUs at 2324 req/s (139,452 req/min), steady p50 15 ms / p95 319 ms / p99 912 ms, 0 % errors. First fail: 4700 VUs (added after the first release), in two runs, both on a slow host: 2212 req/s (p95 934 / p99 1093 ms, probe 104 ms) and, rerun, 2144 req/s (p95 1188 / p99 1547 ms, probe 148 ms); the 4500 pass ran at probe 82 ms. The CPU was at 100 % and the latency was pool wait in both, so the 4700 failures are server-side, but on a normal-speed host 4700 might pass. Best result of the project so far: +7 % VUs over v02 (4200) and +12 % req/s over v02's best (2078–2097 req/s at 4200–4500 VUs); v02 and v03 both failed 4500 VUs.
Bun.serve cuts the app's work per request by ≈ 25 %. App : Postgres CPU ratio 0.91 (Bun 40.7 % / PG 44.6 %) vs. 1.22 in v03 (same Bun.sql, node:http on Bun's compatibility layer) and 1.30 in v02. CPU per request 0.40 ms vs. 0.48 ms (v02) at the same host speed (probe 82 vs. 83 ms before). Most of the app-side cost on Bun was the node:http compatibility layer, not the runtime.db p95 11 ms).Latency is the client-observed steady phase (60 s hold). Red values miss the pass rule. Server and conn come from the app's Server-Timing header, p50 / p95 in ms.
| VUs | Result | req/s | p50 | p95 | p99 | Errors % | Server | Conn | CPU % (Node / PG) | Used MB | Load gen CPU % |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 4,500 | Pass | 2,324.2 | 15 | 319 | 912 | 0.00 | 2 / 271 | 0 / 194 | 94 (41 / 45) | 464 | 100 |
| 4,700 | Failp95 1188>=800ms, p99 1547>=1000ms | 2,143.5 | 163 | 1,188 | 1,547 | 0.00 | 129 / 1,158 | 0 / 1,096 | 99 (44 / 46) | 461 | 100 |
From k6's 2-second snapshots and the 1-second server samples, aligned on the k6 start. The shaded band is the 60 s ramp; the hold phase follows.
Parent: node-http-v03-bun-sql. One change: the HTTP server, node:http (Bun's Node compatibility layer) → Bun.serve (Bun's native server: fetch(Request) → Response). Same handlers, router, Bun.sql data access, 1 s feed cache and Server-Timing (now computed when the Response is created; Bun adds Content-Length). Request helpers adapted to the Fetch API: req.headers.get(), body via req.text() (JSON only, 100 kB limit), the path parsed from the absolute req.url. Bun.serve's keep-alive idle timeout is its default (10 s; node:http used 5 s); k6 VUs send a request every 1–3 s, so connections never idle out in either. The parity check (39 requests on a fresh DB) gave responses identical to v01–v03. App code from commit d4b36f2.
apps/node-http — Bun.serve, Bun.sql, plain SQL, no ORM, no framework (app code from commit d4b36f2)NODE_ENV=production, no flagsbench-app)GET /posts only, all pages, key limit + before, TTL 1 s, single-flight, no invalidation (labelled trade-off: global feed up to 1 s stale)Server-Timing: conn, db, app, total on every response (cache hit: conn 0, db 0)shared_buffers=128MB, max_connections=100), localhost TCP, SCRAM authdo-blr1-loadgen-4vcpu-8gb), k6 v2.3.0, traffic to the target's private IP 10.122.0.2app_log_tail.txt has no errors.conn p95 880–1096 ms, time outside the app p95 19–30 ms (not k6).Node/Bun is saved here (user's decision). Next phase: Python frameworks (Phase 3: FastAPI + uvicorn + asyncpg first), then Go, Rust and C++. Before any stack is pushed beyond ≈ 4500 VUs, recreate the load generator with 8 vCPU (new LOADGEN_LABEL) and rerun this configuration at its edge for comparability.