Spaces:
Sleeping
Sleeping
|
Download docs/workflows/WF04_HOT_STANDBY_AND_SELF_HEALING.md from fallingbody/Fallnet: direct link, hf CLI and curl.
- Browser
- Download file 2.39 kB
-
https://huggingface.co/spaces/fallingbody/Fallnet/resolve/main/docs/workflows/WF04_HOT_STANDBY_AND_SELF_HEALING.md
- Command line
-
hf download hf://spaces/fallingbody/Fallnet/docs/workflows/WF04_HOT_STANDBY_AND_SELF_HEALING.md
-
curl -L -o WF04_HOT_STANDBY_AND_SELF_HEALING.md https://huggingface.co/spaces/fallingbody/Fallnet/resolve/main/docs/workflows/WF04_HOT_STANDBY_AND_SELF_HEALING.md
2.39 kB
A newer version of the Gradio SDK is available: 6.33.0
🛡️ Workflow 04: Hot-Standby & Self-Healing Failover
This workflow guarantees zero-interruption generation even when consumer nodes shut down their laptops, unplug power, or lose Wi-Fi mid-stream.
🎯 1. Workflow Architecture & Objectives
- Shadow Dual-Streaming: Inbound activations are transmitted to both the Primary Miner and its Hot-Standby Twin simultaneously.
- Sub-150ms Heartbeat Watchdog: Downstream nodes monitor incoming token streams; if the primary misses a frame for $>150\text{ms}$, it triggers instant failover.
- Zero-KV-Loss Hot Swap: The Standby node promotes to Primary and streams the next token chunk without recomputing historical context.
- Dynamic Standby Backfill: The Coordinator immediately recruits a new idle peer to take over the vacant Standby role.
⚙️ 2. Failover Sequence Diagram
sequenceDiagram
autonumber
participant NodeA as Preceding Node A
participant PrimaryB as Primary Node B (Layers 20-39)
participant StandbyB as Standby Node B2 (Hot Shadow)
participant NodeC as Downstream Node C
participant Coord as Swarm Coordinator
NodeA->>PrimaryB: Send Activation H_in
NodeA->>StandbyB: Send Shadow Activation H_in (Parallel)
PrimaryB->>NodeC: Stream H_out (Token #10)
StandbyB->>StandbyB: Update local KV-cache in background (Silent)
Note over PrimaryB: 💥 Primary B crashes (Laptop lid closed)
NodeC->>NodeC: Heartbeat timeout (>150ms on Primary B)
NodeC->>StandbyB: Trigger Promotion: "Stream Token #11 Immediately"
StandbyB->>NodeC: Stream H_out (Token #11 - Seamless Continuation)
NodeC->>Coord: Report Node B Offline (Trigger Standby Backfill)
Coord->>Coord: Recruit new Standby Node B3 from DHT
🛡️ 3. Failure Mode Matrix
| Failure Event | Detection Time | Recovery Mechanism | User Impact |
|---|---|---|---|
| Primary Miner Drops | $<150\text{ms}$ | Standby Shadow Promotion | Zero visible lag (<0.2s pause) |
| Both Primary & Standby Drop Simultaneously | $<300\text{ms}$ | Migrate entire Pod slice to Adjacent Geo-Pod with Paged KV replication | 0.5s pause in streaming |
| Coordinator Disconnects | $<500\text{ms}$ | Raft/Paxos consensus elects next nearest node as Sub-Coordinator | Zero disruption (Mesh is decentralized) |