Skip to main content

Server Configuration

Kahuna server options are passed as command-line flags to Kahuna.Server. The table below documents the options exposed by KahunaCommandLineOptions.

Network and TLS

Command Line Option(s)DescriptionDefault Value
-h, --hostHost option accepted by the CLI. The current Kestrel setup listens on all interfaces for configured HTTP/HTTPS ports.*
-p, --http-portsOne or more HTTP ports for external REST/gRPC traffic. If omitted, Kahuna listens on HTTP port 2070.2070
--https-portsOne or more HTTPS ports for external REST/gRPC traffic. If omitted, Kahuna listens on HTTPS port 2071.2071
--https-certificatePath to the HTTPS certificate used by Kestrel and trusted for internal HTTPS communication.empty
--https-certificate-passwordPassword for the HTTPS certificate.empty

Storage

Command Line OptionDescriptionDefault Value
--storageMaterialized Kahuna state backend for persistent locks, key/value entries, revisions, and sequences. Supported values are rocksdb, sqlite, and memory.rocksdb
--storage-pathFile system path for materialized state storage. Use a durable local disk for rocksdb or sqlite.empty
--storage-revisionRevision name used to select a materialized state database or file set under --storage-path.empty
--wal-storageRaft WAL backend used by Kommander. The server startup path supports rocksdb and sqlite.rocksdb
--wal-pathFile system path for Raft WAL storage. Use a durable local disk.empty
--wal-revisionRevision name used to select the WAL database or file set under --wal-path.v1

Cluster Identity and Discovery

Command Line OptionDescriptionDefault Value
--initial-clusterStatic discovery list for the initial Raft cluster. Pass one or more node addresses.none
--initial-cluster-partitionsNumber of Raft partitions created for the initial cluster.128
--raft-nodenameHuman-readable node name used by Raft. If omitted, the server uses the machine name.machine name
--raft-nodeidNumeric node identifier used by Raft.0
--raft-hostHost advertised for Raft consensus and replication traffic.localhost
--raft-portPort advertised for Raft consensus and replication traffic.2070

Workers and Runtime

Command Line OptionDescriptionDefault Value
--locks-workersNumber of lock actors/workers. Values less than or equal to 0 are normalized to at least 256 or Environment.ProcessorCount * 4, whichever is larger.128
--keyvalue-workersNumber of key/value actors/workers. Values less than or equal to 0 are normalized to at least 256 or Environment.ProcessorCount * 4, whichever is larger.128
--background-writer-workersNumber of background persistence writer workers. Values less than or equal to 0 are normalized to 1.1
--default-transaction-timeoutDefault transaction timeout in milliseconds.5000
--script-cache-expirationScript parser cache expiration in seconds.600
--revisions-to-cacheNumber of key revisions intended to stay cached in memory. This flag is defined by the server CLI; the current server startup path does not pass it into KahunaConfiguration.4
--cache-entry-ttlMaximum in-memory cache entry age before eviction, in seconds.1800
--cache-entries-to-removeMaximum number of cache entries removed per eviction pass. Values less than or equal to 0 are normalized from the collection batch size.100
--dirty-objects-writer-delayDelay between dirty object writer flush passes, in milliseconds.200

Raft Communication

Command Line OptionDescriptionDefault Value
--read-io-threadsNumber of Raft read I/O threads.8
--write-io-threadsNumber of Raft write I/O threads.16
--raft-http-schemeHTTP scheme used by Raft REST communication.https://
--raft-http-auth-bearer-tokenBearer token sent with Raft REST communication.empty
--raft-http-timeoutRaft REST request timeout in seconds.5
--raft-http-versionHTTP protocol version used by Raft REST communication.2.0

Raft Timing

Command Line OptionDescriptionDefault Value
--raft-heartbeat-intervalLeader heartbeat interval in milliseconds.500
--raft-recent-heartbeatRecent-heartbeat window in milliseconds.100
--raft-voting-timeoutVote wait timeout in milliseconds.1500
--raft-check-leader-intervalLeader check interval in milliseconds.250
--raft-timer-initial-delayInitial delay before Raft timers start, in milliseconds.2500
--raft-update-nodes-intervalNode registry update interval in milliseconds.5000
--raft-start-election-timeoutMinimum election timeout in milliseconds.2000
--raft-end-election-timeoutMaximum election timeout in milliseconds.4000
--raft-start-election-timeout-incrementMinimum election timeout increment in milliseconds.100
--raft-end-election-timeout-incrementMaximum election timeout increment in milliseconds.200

Raft Logging and Compaction

Command Line OptionDescriptionDefault Value
--raft-slow-state-machine-logSlow state-machine operation log threshold in milliseconds.50
--raft-slow-wal-machine-logSlow WAL state-machine operation log threshold in milliseconds.25
--raft-compact-every-operationsNumber of committed operations between automatic Raft WAL compaction checks.10000
--raft-compact-number-entriesNumber of Raft WAL entries removed per compaction batch.100
--raft-max-entries-per-compactionMaximum Raft WAL entries processed per compaction run.5000

Configuration Notes

  • --wal-storage and --storage configure different layers. WAL storage persists Raft logs; materialized storage persists Kahuna object state after committed operations are applied.
  • Use stable --storage-revision and --wal-revision values for existing data directories. Changing revisions points the server at different local storage files.
  • The embedded node exposes additional cache and eviction settings as .NET options. See Embedded Kahuna Node for the full embedded configuration surface.