leader-election
Installation
SKILL.md
Leader Election
Single leader with automatic failover.
When to Use This Skill
- Multiple instances, only one should run cron jobs
- Singleton queue consumers
- Coordinating distributed workers
- Need automatic failover when leader dies
Core Concepts
- Heartbeat - Leader sends periodic heartbeats
- Timeout - If heartbeat stops, leader is dead
- Term - Monotonic counter prevents split-brain
- Failover - Followers compete to become new leader