Skip to content
Leader docs0.4

Choose a backend

Latest stable Based on Leader release 0.4.0

Prefer infrastructure you already operate, then compare ownership, clock, and failure semantics.

Leader backend selection map

First ask which durable service is already mandatory for the application. Redis is a strong low-latency default. Exposed JDBC/R2DBC keeps election state with application SQL data. MongoDB and DynamoDB fit document/key-value estates. etcd, Consul, Kubernetes Lease, and ZooKeeper fit control-plane coordination. Hazelcast fits an existing Hazelcast cluster without requiring its CP subsystem.

Check atomic acquire and owner-conditional release, the source of expiry time, session versus TTL ownership, group support, suspend support, and auto-extension support. Also check whether a state query can report owner and expiry precisely. These differences affect operations even when runIfLeader() has the same API.

The bundled JMH results are same-machine comparison evidence, not a universal ranking. Network topology, durability settings, connection pools, and failure recovery dominate production behavior. Choose by operational fit, then benchmark your own action and environment.