← Back to Features Overview

Native KRaft Consensus Quorum

Krabka implements the Apache Kafka KRaft consensus protocol directly in memory-safe Rust (krabka-raft and krabka-kraft-core), delivering instantaneous leader elections, metadata compaction, and zero ZooKeeper baggage.

KIP-595 Wire RPC Interoperability

Krabka speaks the exact KIP-595 Raft RPC protocol on the wire. Controller voters communicate via native Rust serialization of metadata records (PartitionRecord, TopicRecord, UserScramCredentialRecord) matching JVM Kafka byte-for-byte.

Split Roles

Nodes operate as dedicated controllers, dedicated brokers, or combined broker+controller nodes in flexible node pools.

Dynamic Reconfiguration

Add or decommission controller voters on live clusters through krabka-voters without restarting the metadata quorum.

Sub-Second Failover

Randomized election timers and async heartbeats trigger leader elections in under 800ms upon node partitions.

Quorum Configuration

# krabka.toml - KRaft Quorum Configuration
[broker]
node_id = 1
cluster_id = "krabka-cluster-prod-01"
process_roles = ["broker", "controller"]

[controller]
quorum_voters = [
  "1@broker-1.prod.internal:9093",
  "2@broker-2.prod.internal:9093",
  "3@broker-3.prod.internal:9093"
]
heartbeat_interval_ms = 2000
election_timeout_ms = 5000

In-Memory Metadata Image & Snapshots

Metadata logs are periodically compacted into zero-copy in-memory snapshot states (krabka-metadata). When a new node joins or an existing broker reconnects after a network partition, snapshot catch-up finishes in milliseconds instead of replaying thousands of historical log batches.

Formally Verified Kernels & Deterministic Seeding

Core consensus invariants and quota token buckets are mathematically verified using the Creusot deductive verification tool (krabka-verified, krabka-throttle). Log directories are seeded deterministically with krabka-format.

$ krabka-broker format --log-dir /var/lib/krabka --cluster-id krabka-cluster-prod-01 --node-id 1