Skip to main content

Module bootstrap

Module bootstrap 

Source
Expand description

Cluster bootstrap and join protocol.

Three startup paths:

  1. Bootstrap: First seed node — creates topology, routing table, Raft groups, persists to catalog. The cluster is born.

  2. Join: New node contacts a seed, receives full cluster state via JoinResponse, persists, and registers peers.

  3. Restart: Node loads topology + routing from catalog, reconnects to known peers.

Structs§

ClusterConfig
Configuration for cluster formation.
ClusterState
Result of cluster startup — everything needed to run the Raft loop.

Functions§

handle_join_request
Build a JoinResponse from current cluster state.
start_cluster
Start the cluster — bootstrap, join, or restart depending on state.