KeplorDB is an embeddable engine purpose-built for high-throughput, time-ordered event ingestion. No server process. No SQL parser. No background threads. You open the engine, append events, query columns.
Queries touch only the columns they need. Aggregations scan contiguous arrays.
Columns are read directly from mmap'd segment files via zerocopy — no deserialization.
Per-segment bloom on the primary dimension. Skip entire files on mismatch.
Vectorized sum, count and filter using 256-bit registers with scalar fallback.
Zero String allocations on the write hot path. Hash and equality resolved through a contiguous arena.
Bulk column writes via zerocopy::IntoBytes — single write_all per column.
Every event persisted to disk before returning. Configurable fsync interval, default every 64 events.
Deleting old data is rm segment_file. No compaction, no write amplification.
Engine::open() in your Rust binary. No TCP, no SQL, no background threads.
Measured with Criterion across 100,000 events in 2 segments. Appends are WAL-durable; aggregates scan real, on-disk column data via mmap + SIMD.
Run cargo bench locally to reproduce on your hardware. Throughput scales linearly with
batch size and CPU vector width.
| operation | latency | throughput |
|---|---|---|
| write path | ||
| batch append · 1024 ev | 1.05 ms | 973K ev/s |
| batch append · 256 ev | 291 µs | 878K ev/s |
| single append × 256 | 304 µs | 843K ev/s |
| in-memory push ceiling | 428 µs | 2.33M ev/s |
| read path | ||
| aggregate · no filter | 54 µs | — |
| aggregate · time range ½ | 18.5 µs | — |
| aggregate · user filter | 1.80 ms | — |
| query_recent · 50 | 1.80 ms | — |
| query_recent · 1000 | 1.98 ms | — |
InternTable with hashbrown::HashTable. Hash and equality resolved through a contiguous Vec<u8> — zero String allocations per event.zerocopy::FromBytes. Segment-level time skip using min_ts/max_ts before mmap open. Lazy intern decompression.Engine::open() replays the log. Max data loss = one sync interval (default: 63 events).rm — no compaction, no write amplification, no read pause.| field | type | description |
|---|---|---|
| id | String | Unique event identifier. |
| ts_ns | i64 | Nanosecond timestamp. Sorted, binary-searchable per segment. |
| metric | i64 | Primary signed metric — cost, duration, value. |
| counters[0..5] | u32 | Five unsigned counters — tokens, bytes, retries. |
| latency_ms | u32 | Primary latency in milliseconds. |
| status | u16 | Status code — HTTP, gRPC, application. |
| flags | u16 | 16 boolean bitflags. |
| dims[0..5] | String | Five indexed, filterable dimensions. Interned per segment. |
| labels[0..3] | String | Three free-form string labels. |
| payload | String | JSON metadata — opaque to the engine. |