1 GB server test · protocol v2 · Ubuntu 24.04.5 LTS on a $6 droplet (1 vCPU / 1 GB)

node-http-v02-bun

node:http (no framework) · pg 8.23.1 · pool: pg.Pool defaults (max 10) · Node v24.21.0 · Postgres 16.15 · load from do-blr1-loadgen-4vcpu-8gb · app 6dc1d73

Capacity4,200 VUs 2,077.8 req/s steady
First failing level4,500 VUs
Highest throughput seen2,097.4 req/s
Pass rulep50 < 500 · p95 < 800 · p99 < 1000 ms
errors < 1 %
Steady throughput2,077.8req/s · 124,666 req/min
Client p95 / p99752 / 851ms, steady phase
Server time p5021.9ms inside the app
Spent getting a connection0 %of server p50 (0.0 ms)
CPU (1 vCPU)97 %Node 50 · Postgres 38
Memory used498 MBof 961 MB · Node 108 · PG 136

Summary

Capacity: 4200 VUs at 2078 req/s (124,668 req/min), steady p50 47 ms / p95 752 ms / p99 851 ms, 0 % errors (added after the first release; near-marginal: p95 6 % under its limit, fast host). 4000 VUs passed comfortably at 2082 req/s (p95 436 / p99 823 ms). The first failing level is 4500 VUs: 2097 req/s, p95 902 ms / p99 1045 ms (limits 800 / 1000), still 0 % errors. +31 % VUs and +24 % req/s over node-http v01 on Node (3200 VUs / 1678 req/s), with the same code and driver: only the runtime changed. Best result so far.

Levels tested

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.

VUsResultreq/sp50p95p99Errors %ServerConnCPU % (Node / PG)Used MBLoad gen CPU %
3,500Pass1,854.761664250.001 / 1490 / 10289 (45 / 35)498100
4,000Pass2,081.6144368230.002 / 4210 / 36894 (47 / 38)489100
4,200Pass2,077.8477528510.0022 / 7260 / 68797 (50 / 38)498100
4,500Failp95 902>=800ms, p99 1045>=1000ms2,097.42479021,0450.00217 / 88460 / 861100 (51 / 40)499100

Across levels

Client latency vs. users steady phase, ms; dashed = limits
Where server time goes p50 per request, ms

During the run

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.

Load active users, req/s, failed req/s
Latency over time 2 s windows, ms
Target droplet CPU % of 1 vCPU, memory used MB
p95 by endpoint client vs. server, ms, whole run

What changed vs. the previous tag

Parent: node-http-v01-express-v06-port. One change: the runtime, Node v24.21.0 → Bun 1.4.2. start.sh runs bun src/server.js instead of node src/server.js. Same source (node:http server, pg 8.23.1 pool max 10, prepared statements, CTE writes, 1 s in-process feed cache), same node_modules (npm ci). Bun is installed by scripts/server/setup.sh as a pinned release binary (/usr/local/bin/bun, bun-linux-x64; the droplet has AVX2). The parity check (39 requests on a fresh DB) gave responses identical to v01 on Node; headers are the same (Connection: keep-alive, Keep-Alive: timeout=5). App code from commit f64fc95.

Full configuration

Observations

Next idea

node-http-v03-pool-20 (parent v02): pg.Pool max 10 → 20, the only change, tested at 4500 VUs (user's request). On Node (node-express v03) pool 20 doubled query time and lowered capacity; check whether Bun's lower app overhead changes that. Further: Bun's native Postgres client (Bun.sql) or Bun.serve, then Go / Rust.