1 GB server test · protocol v2 · Ubuntu 24.04.5 LTS on a $6 droplet (1 vCPU / 1 GB)
Capacity: 3000 VUs at 1541 req/s (92,462 req/min), steady p50 29 ms / p95 573 ms / p99 855 ms, 0 % errors. The first failing level is 3200 VUs: 1604 req/s, p99 1641 ms (limit 1000), still 0 % errors. Every level from 1000 to 3000 VUs passed. 2.1× v05's capacity in VUs (1400) and 2.4× in req/s (645), the biggest step since the pool (v02). Labelled trade-off: the global feed can be up to 1 s stale.
GET /posts is ≈ 47 % of requests (first page ≈ 36 %, second page ≈ 11 %); the first page is the same URL for every VU, and while it is cached its next_before is too, so the second page is a shared key as well. The app log shows 99.0–99.6 % hits with 2 live keys; misses are ≈ 25 per 10 s (one per key per second, plus a few rare keys).pg row parsing and JSON.stringify; server time for a cached GET /posts is p95 0.3 ms.conn p95 452 ms at 3000, 482 ms at 3200) while query time stays at p95 ≈ 19 ms, the same overload pattern as v02–v05. 0 % errors at every level.app_log_tail.txt has no errors, and the load generator averaged 18–40 % CPU. From 2000 VUs it peaked at 96–98 % in single samples (8 samples > 70 % at 3000 and at 3200). 3000 passed with the same spikes, so they do not explain the 3200 failure, but they may add to the tail at the top levels.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 % |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1,000 | Pass | 543.0 | 2 | 8 | 24 | 0.00 | 1 / 4 | 0 / 0 | 53 (33 / 12) | 472 | 34 |
| 1,500 | Pass | 810.1 | 3 | 33 | 62 | 0.00 | 1 / 13 | 0 / 0 | 73 (46 / 19) | 497 | 60 |
| 2,000 | Pass | 1,079.1 | 4 | 48 | 96 | 0.00 | 1 / 26 | 0 / 8 | 79 (49 / 22) | 501 | 96 |
| 2,500 | Pass | 1,324.8 | 12 | 192 | 436 | 0.00 | 1 / 166 | 0 / 127 | 92 (57 / 27) | 515 | 96 |
| 3,000 | Pass | 1,541.0 | 29 | 573 | 855 | 0.00 | 8 / 552 | 0 / 452 | 98 (60 / 30) | 541 | 98 |
| 3,200 | Failp99 1641>=1000ms | 1,604.2 | 42 | 725 | 1,641 | 0.00 | 19 / 710 | 0 / 482 | 99 (60 / 31) | 548 | 97 |
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-express-v05-prepared. One change: GET /posts (global feed, all pages) is cached in the Node process for 1 s. Key limit:before (validated values), value = the serialized JSON body, sent with res.type('json').send(...) (same Content-Type: application/json; charset=utf-8 and ETag as res.json). The TTL counts from the moment the query starts. Concurrent misses for one key share one query (single-flight: the cache holds the pending promise); a failed query is removed from the cache so the next request retries. Expired entries are swept every 10 s, when the app also logs feed cache: hit=… miss=… keys=…. No invalidation on writes: a new post or a new like/comment count shows in the global feed after at most 1 s (verified on the droplet). The other endpoints are unchanged (/posts/:id, /users/:id/posts and /me/posts use random ids or are per user, so a cache would rarely hit). App code from commit 887f64c.
apps/node-express — Express 5.3.0, pg 8.23.1, plain SQL, no ORM (app code from commit 887f64c)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 invalidationServer-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, a new droplet this session, private IP 10.122.0.4), k6 v2.3.0, traffic to the target's private IP 10.122.0.2epoll/writev, and Postgres serving the remaining queries in batches. v05 showed the same trend, smaller.GET /posts is p95 0.3–1.2 ms up to 2500 VUs but 204 ms at 3000 and 219 ms at 3200, although 99.6 % are hits. Likely cause: when a key expires, its refresh query waits in the same pool queue as everyone else (conn p95 ≈ 450 ms), and every feed request for that key arriving meanwhile waits on the same promise. Waiters record that wait as app time (they did not borrow a connection themselves), so the feed's app time at saturation is pool wait, not Express overhead. Serving the old body while one request refreshes (stale-while-revalidate) would remove these stalls.node-express-v07-feed-cache-5s (parent v06): the same cache with TTL 5 s, the only change (user's plan). Compare at 1000 VUs (CPU per request) and at the edge (3000 / 3200 VUs). Expect a small difference: hits are already 99.6 %, so 5 s only removes ≈ 2 refresh queries per second and makes the refresh stalls 5× rarer.