BanyanDB Embedded Time-Series Engine
BanyanDB is an embeddable, Gorilla-compressed columnar time-series store designed for edge sensor gateways and regional observability pipelines. It stores monotonic float64 samples at ~1.4 bytes per data point and serves windowed downsampling queries over HTTP/2 JSON.
2. Columnar Storage & Compaction
Samples append into 2-hour immutable blocks partitioned by metric hash. Background compaction merges cold blocks into 24-hour Zstandard-compressed segments while preserving inverted tag indexes.
| Layer | Encoding | Target Ratio |
|---|---|---|
| Timestamps | Delta-of-delta + ZigZag varint | ~0.35 bytes/sample |
| Values | XOR Gorilla floating-point delta | ~1.05 bytes/sample |
| Tag Index | Roaring Bitmap postings | O(1) intersection |
3. Quickstart
curl -fsSL https://releases.banyandb.example/v1.9/install.sh | sudo sh
banyandb --data-dir /var/lib/banyandb --listen 127.0.0.1:8428
4. Schema & Retention
retention_days: 30
block_duration: 2h
compaction:
workers: 2
max_open_segments: 64
5. HTTP/2 Sync API
Agents push batched OpenMetrics payloads to /api/v2/write and pull range rollups
from /api/v2/query_range. Place a TLS terminator in front of the local port for edge links.
6. Memory Tuning
Keep active memtable flush thresholds at 16 MiB on 2 GB hosts to prevent page-cache pressure during concurrent compaction cycles.