1 GB server test · protocol v2 · Ubuntu 24.04.5 LTS on a $6 droplet (1 vCPU / 1 GB)
Capacity: 3200 VUs at 1678 req/s (100,656 req/min), steady p50 11 ms / p95 392 ms / p99 835 ms, 0 % errors. The first failing level is 3500 VUs: 1779 req/s, p99 1175 ms (limit 1000), p50 30 ms / p95 471 ms, still 0 % errors. Express v06 failed 3200 VUs (p99 1641 ms) and passed 3000, so dropping the framework moves the edge by one step: +7 % VUs, +9 % req/s vs. node-express v06 (3000 VUs / 1541 req/s). The gain is real but modest, and part of the req/s difference is host speed.
res.json, ETag sha1).conn p95 360 ms, query time p95 16 ms). Postgres is now ≈ 40 % of the busy CPU, so further app-side savings pay off less and less.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 % |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 3,200 | Pass | 1,677.6 | 11 | 392 | 835 | 0.00 | 2 / 362 | 0 / 263 | 92 (51 / 33) | 523 | 99 |
| 3,500 | Failp99 1175>=1000ms | 1,778.5 | 30 | 471 | 1,175 | 0.00 | 7 / 428 | 0 / 360 | 95 (52 / 35) | 537 | 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.
New stack apps/node-http/. Parent: node-express-v06-feed-cache-1s (different stack). One change: Express removed — the same app on plain node:http. Everything else is a 1:1 port of node-express v06: pg.Pool defaults (max 10), prepared statements (named queries), single-statement CTE writes, the 1 s in-process cache of GET /posts (same code), Server-Timing on every response. Done by hand instead of by Express: a small router (method + path segments, trailing slash ignored), JSON body parsing (JSON content types only, 100 kB limit, like express.json), JSON responses with Content-Type: application/json; charset=utf-8 and Content-Length. Not carried over (not part of the contract): the ETag and X-Powered-By headers. A parity check on a fresh DB (39 requests: every endpoint, 400 / 401 / 404, invalid JSON, idempotent like/unlike, FK errors) gave identical status codes, bodies and content types for both apps. App code from commit 656bdc8.
apps/node-http — plain node:http, pg 8.23.1, plain SQL, no ORM, no framework (app code from commit 656bdc8)NODE_ENV=production, default heap, no flagsbench-app, no cluster/pm2)pg.Pool defaults, max 10GET /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 time p95 is 3.4 ms at 3200 VUs vs. 120 ms for Express at the same level. Most of that difference is not framework cost: app also holds the wait of requests sharing a feed-cache refresh (single-flight), which follows pool wait (conn p95 263 vs. 482 ms). At 3500 VUs, with pool wait at 360 ms, app p95 is 127 ms again.app_log_tail.txt has no errors; feed-cache misses ≈ 25 per 10 s, as in node-express v06.proxy_cache for the feed instead of the app cache (3000 VUs: FAIL, 1473 req/s, nginx 17 % CPU). On 1 vCPU a proxy costs about as much CPU as it saves.A faster runtime / HTTP layer for the same code: Bun (Bun.serve or node:http on Bun) as node-http's next tag, or uWebSockets.js. Before pushing past ≈ 3500 VUs, recreate the load generator with 8 vCPU (new LOADGEN_LABEL) and rerun the current best at its edge for comparability. Then other stacks (Go, Rust) with the same 1 s feed cache.