Compare commits
1 Commits
0d09c5900c
...
901990b3b1
| Author | SHA1 | Date | |
|---|---|---|---|
| 901990b3b1 |
@@ -81,31 +81,6 @@ The cluster uses a UDP-based discovery protocol for automatic node detection:
|
||||
2. **All receivers**: Update their memberlist entry for the broadcasting node
|
||||
3. **Purpose**: Ensures all nodes maintain current cluster state and configuration
|
||||
|
||||
### Sequence Diagram
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant N1 as Node A (esp-node1)
|
||||
participant N2 as Node B (esp-node2)
|
||||
|
||||
Note over N1,N2: Discovery via heartbeat broadcast
|
||||
N1->>+N2: CLUSTER_HEARTBEAT:esp-node1
|
||||
|
||||
Note over N2: Node B responds with its current state
|
||||
N2->>+N1: NODE_UPDATE:esp-node1:{"hostname":"esp-node2","uptime":12345,"labels":{"role":"sensor"}}
|
||||
|
||||
Note over N1: Process NODE_UPDATE response
|
||||
N1-->>N1: Update memberlist for Node B
|
||||
N1-->>N1: Set Node B status = ACTIVE
|
||||
N1-->>N1: Calculate latency for Node B
|
||||
|
||||
Note over N1,N2: Event-driven node synchronization
|
||||
N1->>+N2: NODE_UPDATE:esp-node1:{"hostname":"esp-node1","uptime":12346,"labels":{"role":"controller"}}
|
||||
|
||||
Note over N2: Update memberlist with latest information
|
||||
N2-->>N2: Update Node A info, maintain ACTIVE status
|
||||
```
|
||||
|
||||
### Listener Behavior
|
||||
|
||||
The `cluster_listen` task parses one UDP packet per run and dispatches by prefix to:
|
||||
|
||||
Reference in New Issue
Block a user