About this project

Kahuna is a server cluster designed to solve common distributed systems problems: distributed locking, consistent key/value storage, and idempotent ordered ID sequences. It gives developers ready-made primitives for building reliable and scalable distributed applications. Key capabilities: - Distributed Locking: synchronizes access to shared resources across nodes to prevent race conditions and maintain data consistency. - Key/Value Store: stores and retrieves structured data across a cluster with fault tolerance and high throughput, suitable for metadata, caches, or application state. - Distributed Sequencer: generates globally ordered identifiers useful for databases, message queues, and event-driven systems. Architecture: Kahuna combines a scalable storage engine with Raft-based consensus. Data is organized into independently managed partitions. It uses Multi-Version Concurrency Control (MVCC) for snapshot isolation, eliminating read-write conflicts. Each partition runs its own Raft group for replication and leader-based write coordination. Transactions use a two-phase commit (2PC) with MVCC, supporting both optimistic and pessimistic concurrency control modes. The system scales horizontally through dynamic partition splitting and redistribution, and maintains availability through Raft replication and automatic recovery. Technical details: - Built with .NET; available as a global tool (`Kahuna.Server` and `Kahuna.Control`). - Ports: 2070 (HTTP/gRPC), 2071 (HTTPS), 2072 (cleartext gRPC). - Storage paths: Linux/macOS `~/.local/share/kahuna`, Windows `%LOCALAPPDATA%\kahuna`. - Supports HTTPS via certificate and mutual TLS for node authentication. - Kubernetes Operator (alpha) available for automated cluster management. - Tested with Jepsen for correctness under network partitions, crashes, and clock skew. - Web dashboard included. License: MIT.