Hacker News
TigerBeetle Core System Architecture: Deconstructing Performance Engineering
TigerBeetle, a financial ledger database written in Zig, eliminates all dynamic memory allocation after startup, pre-allocating static arrays and ring buffers for network, cache, logs, and consensus state. This static allocation prevents heap fragmentation, guarantees deterministic sub-millisecond tail latency, and aligns memory to cache lines and pages, enabling hundreds of thousands of transactions per second. The design also uses zero-copy interfaces and a single-threaded loop with Viewstamped Replication to further reduce CPU-to-memory overhead.