A single-node time series database for home server observability, written in Rust. Implements the Prometheus HTTP query API so existing Grafana dashboards work unchanged. Aims for under 100MB resident memory for 10,000 active series, 5,000 samples/sec ingest, p99 query latency under 500ms on 24-hour range queries.
Ingestion is hybrid IPC. Publishers register over a Unix domain socket and receive a shared memory segment. Sample batches travel through a per-publisher SPSC ring buffer and are signaled with DataReady messages on the socket. Writes land in an in-memory head block (immediately queryable) and an async-fsynced WAL in parallel. The head block flushes to an immutable Gorilla-compressed block file with an inverted label index every two hours or at a size threshold. Queries hit an HTTP API that runs the PromQL pipeline (lexer, parser, planner, executor) and merges results from the head block with on-disk blocks (head block wins on overlapping timestamps).
Flush atomicity uses POSIX rename: write to .tmp, fsync, rename to .db, then truncate the WAL. On startup, stray .tmp files from interrupted flushes are discarded, the in-memory block manifest is rebuilt by scanning .db headers, and WAL replay (idempotent via overwrite-by-timestamp) restores the head block.
Cargo workspace of seven crates: ipc, write-path, query-engine, storage, api, arena, and the main binary. Dependencies follow data flow, which keeps the graph acyclic.