Eve library

What the hot paths can do, and why it does not matter yet

Guide

Revision 1

On this page

182.C.37.01 and 182.C.37.02. The item asks to load-test eight things separately and end to end. Five of the eight have no target. There is no upload endpoint, no evaluator queue, no transcoder, no review player and no delivery edge — the same measurement behind 182.C.36.02 and the four blocked browser items. Load-testing them would mean load-testing a plan.

Three do exist and are on the hot path of anything that ever runs, so they were measured rather than estimated: bench.ts, ffmpeg-free, on the 4-core Linux dev server.

Measured#

path rate
verifyWebhookSignature 303,645 / s
receiveWebhook (parse + dedupe) 263,720 / s
applyTransition (state row + outbox, in one transaction) 241,562 / s
sha256 over a take 1,680 MiB / s
parseCatalogBody 4,157 / s

The finding#

THE SYSTEM IS NOT CPU-BOUND ANYWHERE, AND LOAD-TESTING OUR CODE MEASURES THE WRONG THING.

The 182.C.36.10 canary took 107 seconds from create to completed for a two-second clip. That is 0.0093 renders per second. One render drives on the order of a dozen state transitions, so a single core doing 241,562 transitions a second has roughly seven orders of magnitude more capacity than the provider will ever ask of it.

The same holds for every other row. A take of 2.7 MB digests in under two milliseconds at 1,680 MiB/s, against a download that waits on a third party. The webhook path could absorb the callbacks of a quarter of a million concurrent jobs per second, against a provider that produces one clip every hundred seconds.

So the capacity model for this system has one term in it, and it is not ours: the provider's queue. The second term is money — at the measured $0.25 per delivered second (182.C.36.10), the ~$5 canary budget buys twenty seconds of video. Neither is relieved by a faster server.

parseCatalogBody is the one row worth keeping an eye on: at 4,157/s it is sixty times slower than anything else here, and every submission reads the catalog. It is still four hundred thousand times faster than the render it precedes, so it is a note rather than a problem — but it is the row that would become one first, and the fix (cache the parse per catalog fetch) is cheap enough to have written down.

What this does not show#

  • Nothing here touches the database, the object store or the network, because none of them is wired up. The real bound on a mounted system is an I/O latency this file cannot see.
  • One host, one Node version, four cores, single-threaded. These are the numbers for this box.
  • applyTransition was measured against the in-memory store. A Postgres-backed one is a different measurement by orders of magnitude, and it is the one that will matter.

Reproducing#

bash
cp docs/domains/isis/human-video/evidence/2026-09-11-hot-path-capacity/bench.ts apps/oshun/bff/__bench.ts
cd apps/oshun/bff && npx tsx __bench.ts && rm __bench.ts