Meridian KV

A geo-replicated key-value store with per-operation consistency levels and sub-millisecond local reads.

Domain
Distributed Systems
Status
published

Rust · Raft · gRPC · mmap

Meridian started as a way to understand quorum behaviour under real partitions and turned into something I actually run.

Problem

Teams kept choosing one global consistency level for an entire database, then paying for it on every read.

Solution

Expose consistency as a per-operation parameter — local, causal, or linearizable — with a lease-based fast path for the strict case.

Architecture

Raft groups per shard, a shared lease service for linearizable reads, and an mmap-backed log with in-place compaction.

Key decisions

Chose leases over read-index because the tail latency was more predictable, at the cost of a hard dependency on bounded clock drift.

Challenges

Compaction stalls under sustained write pressure. Fixed by moving compaction off the write path entirely and bounding it per epoch.

Results

1.2M coordinated writes/sec across a 40-node fleet, p99 local read 0.4ms.

ShareXLinkedIn