struct
Raft::Config
- Raft::Config
- Struct
- Value
- Object
Overview
Configuration parameters for a Raft node.
All timeout values are in milliseconds. Sensible defaults are provided for production use. For testing, use shorter timeouts (e.g., 50-100ms election timeout, 25ms heartbeat).
Defined in:
raft/config.crConstructors
Instance Method Summary
-
#cookie : String
Pre-shared key for HMAC-SHA256 connection authentication.
-
#cookie=(cookie : String)
Pre-shared key for HMAC-SHA256 connection authentication.
-
#election_timeout_max : Int32
Maximum election timeout in milliseconds.
-
#election_timeout_max=(election_timeout_max : Int32)
Maximum election timeout in milliseconds.
-
#election_timeout_min : Int32
Minimum election timeout in milliseconds.
-
#election_timeout_min=(election_timeout_min : Int32)
Minimum election timeout in milliseconds.
-
#heartbeat_interval : Int32
Heartbeat interval in milliseconds.
-
#heartbeat_interval=(heartbeat_interval : Int32)
Heartbeat interval in milliseconds.
-
#max_entries_per_rpc : Int32
Maximum number of log entries to include in a single
AppendEntriesRPC. -
#max_entries_per_rpc=(max_entries_per_rpc : Int32)
Maximum number of log entries to include in a single
AppendEntriesRPC. -
#max_inflight_rpcs : Int32
Maximum number of in-flight
AppendEntriesRPCs per replicator (pipeline depth). -
#max_inflight_rpcs=(max_inflight_rpcs : Int32)
Maximum number of in-flight
AppendEntriesRPCs per replicator (pipeline depth). -
#snapshot_chunk_size : Int32
Maximum size in bytes of each snapshot chunk sent via
InstallSnapshotRPC. -
#snapshot_chunk_size=(snapshot_chunk_size : Int32)
Maximum size in bytes of each snapshot chunk sent via
InstallSnapshotRPC. -
#snapshot_threshold : Int32
Number of applied entries since the last snapshot before automatically triggering a new snapshot.
-
#snapshot_threshold=(snapshot_threshold : Int32)
Number of applied entries since the last snapshot before automatically triggering a new snapshot.
Constructor Detail
Instance Method Detail
Pre-shared key for HMAC-SHA256 connection authentication.
Used by Transport::TCP and Transport::Handshake.
Pre-shared key for HMAC-SHA256 connection authentication.
Used by Transport::TCP and Transport::Handshake.
Minimum election timeout in milliseconds. A follower that receives no
heartbeat within a random duration between this and #election_timeout_max
will start a pre-vote round.
Minimum election timeout in milliseconds. A follower that receives no
heartbeat within a random duration between this and #election_timeout_max
will start a pre-vote round.
Heartbeat interval in milliseconds. The leader sends heartbeats to followers at this interval to maintain authority. Should be significantly less than the election timeout.
Heartbeat interval in milliseconds. The leader sends heartbeats to followers at this interval to maintain authority. Should be significantly less than the election timeout.
Maximum number of log entries to include in a single AppendEntries RPC.
Maximum number of log entries to include in a single AppendEntries RPC.
Maximum number of in-flight AppendEntries RPCs per replicator (pipeline depth).
Higher values improve throughput when network RTT is the bottleneck by overlapping
consecutive batches. Set to 1 to disable pipelining and match pre-pipeline behaviour.
Maximum number of in-flight AppendEntries RPCs per replicator (pipeline depth).
Higher values improve throughput when network RTT is the bottleneck by overlapping
consecutive batches. Set to 1 to disable pipelining and match pre-pipeline behaviour.
Maximum size in bytes of each snapshot chunk sent via InstallSnapshot RPC.
Maximum size in bytes of each snapshot chunk sent via InstallSnapshot RPC.
Number of applied entries since the last snapshot before automatically triggering a new snapshot. Set to 0 to disable auto-snapshots.
Number of applied entries since the last snapshot before automatically triggering a new snapshot. Set to 0 to disable auto-snapshots.