Features
PugDB is a Rust LSM you can embed — with soak, crash-loop, and product-shaped benches you can re-run.
✅ Embed path
Tagged train for memoirs & RAG:
v0.2.5 + v0.3.6.
Server v0.2.0 is the reliability harness — cluster stays lab.
Built for self-hosted and embedded use with a clear release pin.
🛡️ Proven under load
- ✓ Docker staging — multi-node smoke and lifecycle
- ✓ Cluster scenarios — replication, delete, health (9/9)
- ✓ Fault injection — partition, crash, and durability suites green
- ✓ Crash-loop — 50× SIGKILL, 0 loss (2026-08-17)
- ✓ Soak + restart anchors — 1,661,444 cache ops at 462/s, data still there after restart
- ✓ QL smoke gate — 71 tests
📊 Scale for chunked data
100,000 × 4096B product-shaped keys — bulk durable writes, fast prefix catalogs, integrity after reopen.
- ~61k durable ops/s bulk ingest (native engine)
- Prefix scan of the full keyset in a few milliseconds
⚡ Performance
- ✓ YCSB (10k, partitioned server) — 4.1× vs PostgreSQL (3.7×–4.5×). Not the embed story; see /bench.
- ✓ YCSB vs ScyllaDB — 2.63× (2×–3.8×) on the same 10k campaign
- ✓ Sub-millisecond latency - P50: 0.04–0.09ms, P99: 0.17–0.46ms
- ✓ Excellent concurrency - Scales well up to 32 threads
- ✓ Optimized batch operations - Connection reuse and parallel processing
*Benchmark Methodology: YCSB A/B/D, 10K records, 512B values, 4 workers, 30s per workload, partitioned storage (server path) (last updated: 2026-08-22). Quality metrics collected 2026-08-22. Real-world performance may differ.*
💾 Storage Engines
Memory Storage - Beta - Well Tested
HashMap and BTreeMap backends optimized for high-performance in-memory operations. 813 tests, 80%+ coverage.
LSM-Tree Storage - Beta - Well Tested
Canonical persistent engine (v0.3.6) — compaction, crash recovery, WAL, prefix scan. Shared by the server and the C/Go embed path.
Partitioned Storage - Beta - Well Tested
Horizontally scalable storage with partition management, stress-tested concurrency, and comprehensive crash recovery. 6+ test suites.
File System Storage
Not available in v2 (intentionally not migrated from v1).
🏗️ Modular Architecture
PugDB follows a clean, layered architecture with five distinct layers:
- • Foundation Layer - Core abstractions and memory storage
- • Extensions Layer - Advanced storage engines, query language, monitoring
- • Distributed Layer - Server, client, and clustering capabilities
- • Cloud Layer - S3-compatible storage and intelligent tiering
- • Application Layer - CLI tools and utilities
🔧 Additional Features
Compression Support
LZ4, Zstd, Gzip, and Snappy compression algorithms for efficient data storage.
Monitoring & Metrics
Prometheus metrics, health checks, and performance monitoring hooks.
Query Language
Beta (Approaching Production) SQL support with 1,627+ tests. QL line coverage 68%. Window functions, JOINs, and query optimization GA; transactions in progress.
Privacy-First
Encryption support, audit logging, and offline-first architecture.
Multi-Language Support (FFI)
Production embed is C ABI + Go wrappers (v0.2.5). Cursor pages and prefix scan on the current pin. Other languages can bind the same C header.