NestJS on Xisto, Node and Bun
The TechEmpower pages ask which runtime serves HTTP fastest, with one plain server per runtime. This page asks the question a team with a NestJS service has: the same Nest app, not one line changed, built with Xisto or run on Node or on Bun: what does each give?
Head to head: vs Node and vs Bun.
Two apps:
- The TFB app: NestJS with the TechEmpower routes
/jsonand/plaintext(bench/techempower/xisto/nest), under the TechEmpower rules on the AWS VMs. - Conduit: the public RealWorld app, with guards, JWT, argon2, Postgres and Redis, on an Apple M4.
The TFB app: json and plaintext
15 Nov 2026, main f766bf8, the same round and setup as the TechEmpower page: the server on
the Xeon E5-2686 v4 (2 vCPUs), wrk 4.2.0 on the Graviton2 over the private network, the TFB's levels and rules, 15 s
per level, the median of 3 runs. The app is built with Xisto and run in three modes:
- 2 processes on one port (
XISTO_REUSEPORT=1, one worker each): the kernel spreads the connections, each process has its own singletons and nothing is shared, as Node's cluster or Bun'sreusePort; - workers with the lock (
XISTO_WORKERS=2, the default): one event loop per CPU in one process, the handlers one at a time under a lock, because Nest's singletons are shared; - workers without the lock (
XISTO_LOCK=0): the handlers in parallel. It crashed under load (below).
On Node and Bun the app runs as the TFB's own NestJS app does: compiled with tsc, one process per CPU.
json
The best of the levels, median of 3 runs at each level; Xisto in the accent colour. Every value is in the tables below.
- Xisto + NestJS (2 processes)
- Xisto + NestJS (lock)
- NestJS on Bun
- NestJS on Node.js
Every level of the round; the values are in the table below.
The server's user + system time over the run at its best level, divided by the requests it answered.
The largest resident set size summed over all the server processes, across every level.
- Xisto + NestJS (2 processes)
- Xisto + NestJS (lock)
- NestJS on Bun
- NestJS on Node.js
The 99th percentile of each level's median run, as wrk reports it; each step of the axis is ten times the one below. A level without a value had no p99 in wrk's output.
json in numbers
| server | 16 | 32 | 64 | 128 | 256 | 512 |
|---|---|---|---|---|---|---|
| Xisto + NestJS (2 processes) | 28,056 | 42,587 | 52,819 | 54,049 | 52,432 | 53,117 |
| Xisto + NestJS (lock) | 27,125 | 37,783 | 43,514 | 44,170 | 43,611 | 42,763 |
| NestJS on Bun | 21,171 | 26,149 | 26,807 | 27,306 | 27,013 | 26,174 |
| NestJS on Node.js | 6,986 | 6,974 | 7,027 | 7,021 | 6,775 | 6,712 |
Requests per second at each number of connections. Xisto + NestJS (no lock) crashed under load.
| server | best req/s | connections there | p50 there | p99 there | CPU ms per 1k requests | peak RSS |
|---|---|---|---|---|---|---|
| Xisto + NestJS (2 processes) | 54,049 | 128 | 1.8 ms | 11.3 ms | 36.1 | 16.2 MB |
| Xisto + NestJS (lock) | 44,170 | 128 | 2.5 ms | 10.4 ms | 36.8 | 10.7 MB |
| NestJS on Bun | 27,306 | 128 | 4.4 ms | 13.0 ms | 72.1 | 233.3 MB |
| NestJS on Node.js | 7,027 | 64 | 7.9 ms | 23.1 ms | 281.7 | 354.4 MB |
p99 at each level:
| server | 16 | 32 | 64 | 128 | 256 | 512 |
|---|---|---|---|---|---|---|
| Xisto + NestJS (2 processes) | 1.6 ms | 1.9 ms | 5.5 ms | 11.3 ms | 18.7 ms | 31.8 ms |
| Xisto + NestJS (lock) | 1.9 ms | 2.4 ms | 5.0 ms | 10.4 ms | 16.9 ms | 29.8 ms |
| NestJS on Bun | 2.6 ms | 3.9 ms | 7.6 ms | 13.0 ms | 23.0 ms | 35.3 ms |
| NestJS on Node.js | 9.6 ms | 14.3 ms | 23.1 ms | 75.9 ms | 1270 ms | 4980 ms |
plaintext
The best of the levels, median of 3 runs at each level; Xisto in the accent colour. Every value is in the tables below.
- Xisto + NestJS (2 processes)
- Xisto + NestJS (lock)
- NestJS on Bun
- NestJS on Node.js
Every level of the round; the values are in the table below.
The server's user + system time over the run at its best level, divided by the requests it answered.
The largest resident set size summed over all the server processes, across every level.
plaintext in numbers
| server | 256 | 1,024 | 4,096 | 16,384 |
|---|---|---|---|---|
| Xisto + NestJS (2 processes) | 239,831 | 224,576 | 208,115 | 159,455 |
| Xisto + NestJS (lock) | 115,557 | 112,929 | 109,779 | 84,875 |
| NestJS on Bun | 28,184 | 29,629 | 29,232 | 19,171 |
| NestJS on Node.js | 8,546 | 11,092 | 9,907 | — |
Requests per second at each number of connections (HTTP pipelining 16 deep). Xisto + NestJS (no lock) crashed under load.
| server | best req/s | connections there | p50 there | p99 there | CPU ms per 1k requests | peak RSS |
|---|---|---|---|---|---|---|
| Xisto + NestJS (2 processes) | 239,831 | 256 | 9.7 ms | 30.9 ms | 8.5 | 73.8 MB |
| Xisto + NestJS (lock) | 115,557 | 256 | 20.1 ms | — | 11.9 | 74.9 MB |
| NestJS on Bun | 29,629 | 1,024 | 297 ms | 1000 ms | 67.3 | 1480.4 MB |
| NestJS on Node.js | 11,092 | 1,024 | 454 ms | 1200 ms | 181.2 | 2270.3 MB |
p99 at each level:
| server | 256 | 1,024 | 4,096 | 16,384 |
|---|---|---|---|---|
| Xisto + NestJS (2 processes) | 30.9 ms | 92.6 ms | 402 ms | 2880 ms |
| Xisto + NestJS (lock) | — | 192 ms | 1380 ms | 3300 ms |
| NestJS on Bun | 185 ms | 1000 ms | 2940 ms | 7420 ms |
| NestJS on Node.js | 6120 ms | 1200 ms | 5400 ms | — |
What this says
- In two processes the app built with Xisto serves 54,049 json requests per second with 16.2 MB of memory: 2.0× Bun's 27,306 (233 MB) and 7.7× Node's 7,027 (354 MB), with half of Bun's CPU per request and an eighth of Node's (36.1 ms per 1,000 requests against 72.1 and 281.7).
- On plaintext (HTTP pipelining 16 deep) the gap grows: 239,831 requests per second against Bun's 29,629 (8.1×) and Node's 11,092 (21.6×), with 74 MB at the peak against 1.5 GB and 2.3 GB.
- At 16,384 connections Node answered the first of the three runs (7,944 requests per second, 2,053 requests past wrk's 8 s timeout) and none in the next two: it was still working through the first run's queue. That level has no Node row.
- With the lock, in one process: 44,170 json and 115,557 plaintext requests per second, with 10.7 MB on json. Still ahead of Bun's cluster on both.
- Without the lock the workers crash under load: Nest's singletons are shared by the workers and touched without synchronization. The lock is the default for that reason, and the multi-process mode is the one that scales.
Conduit: a real NestJS app
Conduit, the public RealWorld example built with NestJS
(guards, JWT, argon2, Postgres, Redis), built with Xisto and run on Node v26.12.0 and Bun 1.4.4, in one session on an
Apple M4, 15 Nov 2026 (bench/results/conduit-mac-2026-11-15.txt).
The median of 5 fresh starts, until GET /api/tags answers.
Resident memory of the server process after every route's load; at rest in the tooltip.
Requests per second, 20 connections, 30 s per route:
| route | Xisto | Node | Bun |
|---|---|---|---|
| current user (guard, JWT, query) | 8,134 | 6,528 | 7,213 |
| tags | 17,373 | 15,731 | 15,124 |
| login (argon2) | 65 | 45 | 44 |
| article list, cache warm | 15,361 | 14,497 | 19,572 |
| article by slug, cache warm | 23,803 | 34,153 | 38,660 |
| article list, no cache | 5,956 | 5,431 | 5,237 |
| article by slug, no cache | 8,550 | 7,920 | 7,508 |
Xisto answers the most on five of the seven routes; on the two served from the Redis cache Bun is first and Node is ahead of Xisto on the article by slug. Every route, latency, CPU and memory number is on vs Node and vs Bun.
See also
- TechEmpower: the runtimes' plain servers
- HTTP: hello, Todo API, threads, resilience and slow dependencies against Node, Bun, Rust and Go
- NestJS with Xisto