docs: update

This commit is contained in:
2025-10-19 14:05:00 +02:00
parent d166b0b634
commit 56e54e0b31
3 changed files with 13 additions and 13 deletions

View File

@@ -42,19 +42,19 @@ Zero-configuration web interface for monitoring and managing SPORE embedded syst
- **API**: SPORE Embedded System API
- **Design**: Glassmorphism, CSS Grid, Flexbox
## UDP Auto Discovery
## UDP Heartbeat Discovery
The backend now includes automatic UDP discovery for SPORE nodes on the network. This eliminates the need for hardcoded IP addresses and provides a self-healing, scalable solution for managing SPORE clusters.
The backend now includes automatic UDP heartbeat-based discovery for SPORE nodes on the network. This eliminates the need for hardcoded IP addresses and provides a self-healing, scalable solution for managing SPORE clusters.
### 🚀 How It Works
1. **UDP Server**: The backend listens on port 4210 for UDP messages
2. **Heartbeat Message**: Nodes send `CLUSTER_HEARTBEAT` messages to broadcast address `255.255.255.255:4210`
3. **Auto Configuration**: When a discovery message is received, the source IP is automatically used to configure the SporeApiClient
3. **Auto Configuration**: When a heartbeat message is received, the source IP is automatically used to configure the SporeApiClient
4. **Dynamic Updates**: The system automatically switches to the most recently seen node as the primary connection
5. **Health Monitoring**: Continuous monitoring of node availability with automatic failover
### 📡 Discovery Protocol
### 📡 Heartbeat Protocol
- **Port**: 4210 (configurable via `UDP_PORT` constant)
- **Message**: `CLUSTER_HEARTBEAT` (configurable via `HEARTBEAT_MESSAGE` constant)
@@ -71,7 +71,7 @@ npm start
# The server will automatically:
# - Start HTTP server on port 3001
# - Start UDP discovery server on port 4210
# - Start UDP heartbeat server on port 4210
# - Wait for CLUSTER_HEARTBEAT messages
```