Luigit
repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by admin

pi/agent/skillz/node-style/references/canonical.md

Raw
Rendered preview

Canonical sources

Current facts and APIs live at these links. Verify there before quoting defaults or numbers. This file deliberately contains no version-pinned claims beyond pointers.

Doctrine

Node.js official guides

Node.js API authority

Runtime internals

HTTP client

Facts that drift

These change between Node and libuv releases. Never hardcode them from memory, read the links above:

  • libuv worker pool size defaults and maximum.
  • Buffer pool size and the pooled-slice threshold.
  • Stream highWaterMark defaults for bytes and object mode.
  • HTTP keep-alive defaults, client and server, and proxy idle-timeout mismatches.
  • Framework overhead rankings, see the fastify benchmarks repository for current runs.
# Canonical sources

Current facts and APIs live at these links.
Verify there before quoting defaults or numbers. This file deliberately contains no version-pinned claims beyond pointers.

## Doctrine

- TigerStyle, source of the doctrine: <https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TIGER_STYLE.md>
- TigerBeetle performance concepts, why batching and interface design win: <https://docs.tigerbeetle.com/concepts/performance/>

## Node.js official guides

- Don't block the event loop: <https://nodejs.org/en/learn/asynchronous-work/dont-block-the-event-loop>
- Event loop, timers, and nextTick: <https://nodejs.org/en/learn/asynchronous-work/event-loop-timers-and-nexttick>
- Backpressuring in streams: <https://nodejs.org/en/learn/modules/backpressuring-in-streams>
- Tracing garbage collection: <https://nodejs.org/en/learn/diagnostics/memory/using-gc-traces>

## Node.js API authority

- Buffer, pooling and `allocUnsafe` semantics: <https://nodejs.org/api/buffer.html>
- perf_hooks, `monitorEventLoopDelay` and `eventLoopUtilization`: <https://nodejs.org/api/perf_hooks.html>
- worker_threads, transfer lists and `SharedArrayBuffer`: <https://nodejs.org/api/worker_threads.html>
- v8 module, heap statistics and snapshots: <https://nodejs.org/api/v8.html>

## Runtime internals

- libuv thread pool, what uses it and `UV_THREADPOOL_SIZE`: <https://docs.libuv.org/en/v1.x/threadpool.html>
- V8 hidden classes and inline caches: <https://github.com/v8/v8/blob/main/docs/runtime/hidden-classes-and-ics.md>
- V8 objects and maps, dictionary mode: <https://github.com/v8/v8/blob/main/docs/heap/objects-and-maps.md>

## HTTP client

- undici, pooling and pipelining: <https://github.com/nodejs/undici>

## Facts that drift

These change between Node and libuv releases. Never hardcode them from memory, read the links above:

- libuv worker pool size defaults and maximum.
- Buffer pool size and the pooled-slice threshold.
- Stream `highWaterMark` defaults for bytes and object mode.
- HTTP keep-alive defaults, client and server, and proxy idle-timeout mismatches.
- Framework overhead rankings, see the fastify benchmarks repository for current runs.