Kahuna

Raft-replicated cluster for locks, key/value transactions and ordered IDs

Image 1 of 2: Terminal session of kahuna-cli setting keys and running a transactional leader election

Each partition has its own Raft group, and MVCC with two-phase commit gives snapshot-isolated transactions. Locks with fencing tokens, a consistent key/value store, an ID sequencer and rate limiters share one cluster, built on .NET.

Trade-offs

  • Two concurrency control modes. Optimistic commits are faster when conflicts are rare, and pessimistic locks prevent conflicts on contended keys.
  • A cleartext gRPC port for clients without TLS. Plain HTTP/2 works out of the box, but port 8083 has no encryption or authentication, so it belongs on a trusted network.

Q&A4

Each partition has its own Raft group with one elected leader. Every write becomes a log entry that the leader replicates to the followers holding that partition.

Reviews

Loading reviews

    More in Distributed systems

    See all 20 →
    • arbiterPostgreSQL job queue for Haskell, with no broker and no leader
    • RRQClosed-loop payment ledger on sharded Postgres with a Kafka outbox
    • RuvioRust key-value server that speaks RESP, with locks and queues as commands
    • EgresPostgres-compatible database in Zig for heavy, multi-tenant workloads
    • clinkC++ stream processing engine that stays correct when processes die
    • pg-statusSidecar that reports PostgreSQL master, replicas and replication lag

    More in Database internals

    See all 29 →
    • PaganelData migration engine that verifies the destination down to the row
    • FeOxDBEmbedded key-value store in Rust with write-behind durability
    • SNKVEmbedded key-value store built directly on SQLite's B-tree
    • musqlSQLite-compatible SQL engine on columnar storage and a JIT
    • MongrelDBEmbedded Rust database with vector, sparse and text indexes
    • MenteDBRust storage engine built for AI agent memory

    More in C#

    See all 12 →
    • Localization Resource ManagerLocalization files from one binary, as a CLI, terminal UI, web UI or in VS Code
    • SharpTSTypeScript interpreter and ahead-of-time compiler to .NET IL, written in C#
    • tfplan2mdTerraform plans as readable Markdown for pull requests
    • K7Self-hosted media server for movies, series and music for family and friends
    • NetWasmCompile C# and .NET CIL to small standalone WebAssembly
    • OverTranslateWindows screen translator that overlays translations on games, manga and video