You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/raft_production.md
+17-13Lines changed: 17 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Raft is configured via CLI flags or the `config.toml` file under the `[raft]` (o
33
33
|`--evnode.raft.raft_addr`|`raft.raft_addr`| TCP address for Raft transport. |`0.0.0.0:5001` (Bind to private IP) |
34
34
|`--evnode.raft.raft_dir`|`raft.raft_dir`| Directory for Raft data. |`/data/raft` (Must be persistent) |
35
35
|`--evnode.raft.peers`|`raft.peers`| Comma-separated list of peer addresses in format `nodeID@host:port`. |`node-1@10.0.0.1:5001,node-2@10.0.0.2:5001,node-3@10.0.0.3:5001`|
36
-
|`--evnode.raft.bootstrap`|`raft.bootstrap`|Bootstrap the cluster. **Required** for initial setup. |`true` (See Limitations)|
36
+
|`--evnode.raft.bootstrap`|`raft.bootstrap`|Compatibility flag. Startup mode is selected automatically from persisted raft configuration state. | optional|
37
37
38
38
### Timeout Tuning
39
39
@@ -55,11 +55,15 @@ Ideally, a failover should complete within `2 * BlockTime` to minimize user impa
55
55
56
56
## Production Deployment Principles
57
57
58
-
### 1. Static Peering & Bootstrap
59
-
Current implementation requires **Bootstrap Mode** (`--evnode.raft.bootstrap=true`) for all nodes participating in the cluster initialization.
60
-
***All nodes** should list the full set of peers in `--evnode.raft.peers`.
58
+
### 1. Static Peering & Automatic Startup Mode
59
+
Use static peering with automatic mode selection from local raft configuration:
60
+
* If local raft configuration already exists in `--evnode.raft.raft_dir`, the node starts in rejoin mode.
61
+
* If no local raft configuration exists yet, the node bootstraps from configured peers.
62
+
*`--evnode.raft.bootstrap` is retained for compatibility but does not control mode selection.
63
+
***All configured cluster members** should list the full set of peers in `--evnode.raft.peers`.
61
64
* The `peers` list format is strict: `NodeID@Host:Port`.
62
-
***Limitation**: Dynamic addition of peers (Run-time Membership Changes) via RPC/CLI is not currently exposed. The cluster membership is static based on the initial bootstrap configuration.
65
+
***Limitation**: Dynamic addition of peers (run-time membership changes) via RPC/CLI is not currently exposed.
66
+
***Not supported**: Joining an existing cluster as a brand-new node that was not part of the initial static membership.
63
67
64
68
### 2. Infrastructure Requirements
65
69
***Encrypted Network (CRITICAL)**: Raft traffic is **unencrypted** (plain TCP). You **MUST** run the cluster inside a private network, VPN, or encrypted mesh (e.g., WireGuard, Tailscale). **Never expose Raft ports to the public internet**; doing so allows attackers to hijack the cluster consensus.
@@ -86,13 +90,13 @@ Monitor the following metrics (propagated via Prometheus if enabled):
Copy file name to clipboardExpand all lines: docs/learn/config.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1321,7 +1321,7 @@ _Constant:_ `FlagRaftDir`
1321
1321
### Raft Bootstrap
1322
1322
1323
1323
**Description:**
1324
-
If true, bootstraps a new Raft cluster. Only set this on the very first node when initializing a new cluster.
1324
+
Legacy compatibility flag. Startup mode is now auto-selected from persisted raft configuration state, so this flag is not used to choose bootstrap vs rejoin.
1325
1325
1326
1326
**YAML:**
1327
1327
@@ -1352,6 +1352,16 @@ raft:
1352
1352
_Default:_ `""` (empty)
1353
1353
_Constant:_ `FlagRaftPeers`
1354
1354
1355
+
### Raft Startup Mode
1356
+
1357
+
Raft startup mode is selected automatically from local raft configuration state:
1358
+
1359
+
* If the node already has persisted raft configuration in `raft.raft_dir`, it starts in rejoin mode.
1360
+
* If no raft configuration exists yet, it bootstraps a cluster from configured peers.
1361
+
* `raft.bootstrap` is retained for compatibility but does not control mode selection.
0 commit comments