coordination
Coordination Patterns
Primitives for managing distributed node lifecycles, leadership, and mutual exclusion.
// concept
Coordination ensures distributed nodes work together: electing leaders, acquiring locks, detecting failures, and discovering services dynamically.
Distributed Lock
Ensure mutual exclusion across distributed nodes. Only one process can hold the lock at a time.
Leader Election
Elect a single leader among distributed nodes to coordinate work. Handles failover automatically.
Heartbeat Monitor
Periodic health signals detect node failures. Missing heartbeats trigger failover or deregistration.
Service Registry
Central catalog where services register their endpoints. Enables dynamic discovery of available instances.
Service Discovery
Clients query the registry to find healthy service instances. Supports client-side or server-side patterns.