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

node-http-v03-bun-sql

node:http (no framework) · Bun.sql (Bun 1.4.2 native client) · pool: Bun.sql pool max 10 · Node v24.21.0 · Postgres 16.15 · load from do-blr1-loadgen-4vcpu-8gb · app 59a30b1

Capacity< 4,500 VUs no level passed
First failing level4,500 VUs
Highest throughput seen1,954.7 req/s
Pass rulep50 < 500 · p95 < 800 · p99 < 1000 ms
errors < 1 %
Steady throughput1,954.7req/s · 117,280 req/min
Client p95 / p991,088 / 1,547ms, steady phase
Server time p50397.7ms inside the app
Spent getting a connection24 %of server p50 (95.5 ms)
CPU (1 vCPU)100 %Node 50 · Postgres 41
Memory used500 MBof 961 MB · Node 109 · PG 132

Summary

Only one level tested: 4500 VUs FAIL — 1955 req/s, steady p50 417 ms / p95 1088 ms / p99 1547 ms (limits 800 / 1000), 0 % errors. Capacity by the rule is therefore "< 4500" (not measured below); the parent v02 (pg on Bun) passed 4200 VUs and also failed 4500. No measurable gain from Bun's native Postgres client. Kept as the base for Bun.serve (v04) by the user's decision.

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 %
4,500Failp95 1088>=800ms, p99 1547>=1000ms1,954.74171,0881,5470.00398 / 1,06095 / 999100 (50 / 41)500100

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-v02-bun. One change: the Postgres client, node-postgres (pg 8.23.1) → Bun.sql (Bun 1.4.2's built-in client, new SQL({ url, max: 10 })). Every request still reserves one connection (sql.reserve()) for all its queries, timed as conn; queries are tagged templates (prepared and cached per connection by Bun.sql), timed as db. Adjustments needed for identical responses: every parameter has an explicit cast (::bigint, ::int, ::text, ::boolean) so numbers never travel as float8; Bun.sql returns int8 columns as strings, so id, user_id and post_id are converted with Number() in the query wrapper (node-postgres did the same with a type parser); the SQLSTATE of a server error is in err.errno (err.code is Bun's own code). The pg dependency is removed. The parity check (39 requests on a fresh DB) gave responses identical to v01/v02. App code from commit ed0c70a.

Full configuration

Observations

Next idea

node-http-v04-bun-serve (parent v03): Bun.serve (Bun's native HTTP server, fetch(Request) → Response) instead of node:http on Bun's compatibility layer, the only change. Test at 4500 VUs.