NestJS: Xisto vs Bun
The same NestJS app, not one line changed, built with Xisto or run on Bun. On Bun it runs as the TFB's own Nest app
does: compiled with tsc, one process per CPU with node:cluster. On Xisto, in two processes on one port (each with
its own singletons, as the cluster) and in one process with workers and the handler lock. The setup and both apps are
described on NestJS.
The app built with Xisto in two processes against NestJS on Bun, at a glance:
- json: 54,049 against 27,306 requests per second at best (1.98× more), with 2.0× less CPU per request and 14.4× less memory (16.2 MB against 233.3 MB).
- plaintext: 239,831 against 29,629 requests per second at best (8.09× more), with 7.9× less CPU per request and 20.1× less memory (73.8 MB against 1480.4 MB).
Conduit: a real NestJS app
Conduit is the public RealWorld example built with
NestJS: controllers, guards, JWT, argon2, a Postgres database and a Redis cache. The same source, not one line
changed, built with Xisto (main c684667) and run on Bun 1.4.4 (the same npm run build output), on an Apple M4 (10 cores), 15 Nov 2026;
Postgres 16 and Redis 7 in local containers. 20 connections, 30 s per route, startup the median of 5 fresh starts,
cold latency the median of 10; every request of every run answered correctly. Source:
bench/results/conduit-mac-2026-11-15.txt (Xisto, Node and Bun in one session).
20 connections, 30 s per route; the first five with the Redis cache warm, the last two with Redis stopped. The dashed line is 1×; grey: the routes where Bun answers more. Every value is in the tables below.
The server's user + system time over the run divided by the requests it answered; login (argon2: 127 s against 221 s per 1,000) is in the table.
Resident memory of the server process; startup to the first 200: 26 ms with Xisto, 214 ms with Bun.
Bun is ahead on the two routes served from the cache: the article list (19,572 against 15,361 requests per second) and the article by slug (38,660 against 23,803), with less CPU per request and a lower p99 on both. Xisto answers more on the current user (guard, JWT and a query), the tags, the login and both routes without the cache, with less CPU on all of them and a lower p99 on all of them but the cached ones. Memory is where the two differ most: Bun holds 131 to 259 MB under load (758 MB during the argon2 logins), Xisto 11 to 13 MB (203 MB during the logins); at rest 76.5 against 7.5 MB, and Bun starts in 214 ms against 26.
| Xisto | Bun | |
|---|---|---|
| startup (to the first 200) | 26 ms | 214 ms |
| RSS at rest | 7.5 MB | 76.5 MB |
| RSS after the load | 11.6 MB | 130.8 MB |
Under load, with the Redis cache warm:
| route | Xisto req/s | Bun req/s | Xisto p99 | Bun p99 | Xisto CPU per 1k req | Bun CPU per 1k req | Xisto RSS | Bun RSS |
|---|---|---|---|---|---|---|---|---|
| article list (2 queries) | 15,361 | 19,572 | 2.81 ms | 2.35 ms | 43.9 ms | 35.5 ms | 12.5 MB | 258.8 MB |
| article by slug | 23,803 | 38,660 | 2.03 ms | 1.46 ms | 25.0 ms | 14.5 ms | 11.5 MB | 155.8 MB |
| current user (guard, JWT, query) | 8,134 | 7,213 | 4.27 ms | 5.53 ms | 63.1 ms | 83.0 ms | 11.2 MB | 131.3 MB |
| tags | 17,373 | 15,124 | 2.40 ms | 3.06 ms | 26.7 ms | 31.1 ms | 11.0 MB | 131.5 MB |
| login (argon2) | 65 | 44 | 379.83 ms | 877.17 ms | 127,182.7 ms | 220,663.1 ms | 203.3 MB | 757.6 MB |
Without the cache (Redis stopped; every request reads Postgres):
| route | Xisto req/s | Bun req/s | Xisto p99 | Bun p99 | Xisto CPU per 1k req | Bun CPU per 1k req | Xisto RSS | Bun RSS |
|---|---|---|---|---|---|---|---|---|
| article list | 5,956 | 5,237 | 6.10 ms | 7.59 ms | 92.1 ms | 114.6 ms | 11.5 MB | 150.4 MB |
| article by slug | 8,550 | 7,508 | 4.15 ms | 4.84 ms | 32.2 ms | 56.1 ms | 11.6 MB | 130.8 MB |
Single-request latency, cold (cache flushed) / warm, in ms:
| route | Xisto | Bun |
|---|---|---|
| article list | 2.09 / 0.65 | 2.64 / 0.53 |
| article by slug | 2.14 / 0.50 | 2.25 / 0.48 |
| current user | 1.71 / 0.72 | 1.74 / 1.11 |
| tags | 1.44 / 0.50 | 1.09 / 0.50 |
| login | 21.83 / 22.75 | 29.60 / 28.53 |
The TFB app: json
15 Nov 2026 round (main f766bf8): the server on the Xeon E5-2686 v4 (2 vCPUs), wrk 4.2.0 on the Graviton2, the TFB's levels and
rules, 15 s per level, the median of 3 runs.
The best of the levels, median of 3 runs at each level; Xisto in the accent colour. Every value is in the tables below.
The dashed line is 1×, the same requests per second. Accent: the levels where Xisto answers more; grey: where NestJS on Bun does.
- Xisto + NestJS (2 processes)
- Xisto + NestJS (lock)
- NestJS on Bun
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
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 |
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 |
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 |
The TFB app: 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.
The dashed line is 1×, the same requests per second. Accent: the levels where Xisto answers more; grey: where NestJS on Bun does.
- Xisto + NestJS (2 processes)
- Xisto + NestJS (lock)
- NestJS on Bun
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 |
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 |
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 |
See also
- NestJS and vs Node
- TechEmpower vs Bun:
Bun.serve, Bun's own server