Where the Work Goes — Two Kitchens, Live
Scripted traffic, including one burst — watch what each kitchen does with it
Kitchen One
the order board (OS sockets, epoll)
network calls — HTTP, Postgres,
fetch, Redis
active: 0
No threads — waiting costs nothing, at any scale.
Kitchen Two
four chefs (libuv thread pool)
fs.*, dns.lookup, crypto,
zlib (gzip, deflate...)
chefs busy: 0/4 · queue: 0
Pool size 4 by default — shared by everything above.
Thread pool exhaustion, happening live
Kitchen one absorbs the burst — more lights on the board, same speed.
Kitchen two's four chefs saturate — the queue above is real backlog, not a bug.
UV_THREADPOOL_SIZE sets the chef count (default 4, max 128) — set before the process starts.
Normal traffic — steady trickle of requests
both kitchens keep up easily
Pause
Restart
Step ▶
0.5×
1×
2×
outline = pending / queued · filled = light on (ready) or chef cooking · Step ▶ jumps to the next event