DBRaven
Post-Mortem Framework · Data Consistency: Leader Election Storm

Leader Election Storm

SEV-2, Significant Impact

Fan-Out propagation · consistency · Affects 1 scenario(s)

Severity Classification

Classified as CRITICAL based on failure mode severity. The fan out propagation pattern increases risk of broad impact beyond the initial failure point.

Propagation Chain

1

Origin component

Leader Election Storm begins at the source component. Trigger: Network flap causing intermittent heartbeat loss without actual node failure.

Immediate (T+0) · Signal: Error Rate Spike

2

Downstream dependents

Failure propagates to directly dependent components via synchronous calls or shared resources. Latency increases and error rates rise on affected dependencies.

Election events are logged immediately by all distributed coordination systems. Write failure errors to callers appear within seconds of election start. Monitoring election frequency (etcd election counter, Kafka controller epoch changes) detects storms within the first election. · Signal: Latency spike, connection timeout, or error rate increase on dependents

3

Downstream of dependents (fan-out)

Failure spreads to multiple downstream systems simultaneously. Retry storms may amplify load on the failing component.

Within minutes of initial failure · Signal: Multiple services reporting elevated error rates

Blast Radius

All write operations to the cluster fail during election. Services depending on the cluster for coordination (etcd: Kubernetes; ZooKeeper: Kafka, HBase; Kafka controller: all Kafka producers and consumers needing metadata) are blocked. For etcd election storms, the entire Kubernetes control plane is unavailable. For Kafka controller election, all topic metadata operations are blocked. Duration of impact equals the sum of election durations across the storm.

Contributing Factors

Trigger Condition: Network flap causing intermittent heartbeat loss without actoperational

This operational trigger enables Leader Election Storm: Network flap causing intermittent heartbeat loss without actual node failure

Trigger Condition: Leader node overloaded (CPU, GC, I/O) causing heartbeat lateoperational

This operational trigger enables Leader Election Storm: Leader node overloaded (CPU, GC, I/O) causing heartbeat latency to exceed follower timeout

Trigger Condition: Election timeout configured too aggressively (less than 3× ooperational

This operational trigger enables Leader Election Storm: Election timeout configured too aggressively (less than 3× observed heartbeat latency)

Remediation Plan

ImmediateIdentify the trigger: check if the leader node is overloaded (CPU, I/O, GC logs)

Identify the trigger: check if the leader node is overloaded (CPU, I/O, GC logs)

Effort: Minutes to hours (on-call response)

ImmediateCheck network: is there a flapping link? Check network interface error counters

Check network: is there a flapping link? Check network interface error counters

Effort: Minutes to hours (on-call response)

ImmediateIf leader is overloaded: reduce load on the leader node (shed traffic, restart p

If leader is overloaded: reduce load on the leader node (shed traffic, restart problematic processes)

Effort: Minutes to hours (on-call response)

Short-TermTune election timeout to 3-5× observed heartbeat latency

Measure the 99th percentile heartbeat round-trip time under production load. Set election timeout to 3–5× this value. For etcd with 1ms p99 heartbeat, a 5–10ms election timeout is aggressive; 50–100ms is safer. Kafka session.timeout.ms for brokers should be well above broker heartbeat delivery time.

Effort: 1 day to 1 week

Short-TermSeparate coordination traffic from data traffic on dedicated NICs or VLANs

Network I/O saturation from data replication can delay heartbeat delivery. Binding coordination (Raft heartbeats, etcd peer traffic) to a dedicated network interface isolates it from data traffic contention.

Effort: 1 day to 1 week

Short-TermResolve overloaded leader node before it triggers election

Monitor leader node CPU, I/O, and GC metrics. When the leader is approaching saturation, proactively step down (force a leader transfer to a healthy follower) before heartbeat timeouts cause uncontrolled election. etcdctl move-leader and Kafka preferred replica election support this.

Effort: 1 day to 1 week

Short-TermAdd alerting for documented detection signals

Configure alerts for: error rate spike, log errors, alert. Set thresholds to fire at 70% of critical level to allow response before full failure.

Effort: 1–3 days

Long-TermArchitecture review for Leader Election Storm resilience

Conduct a structured architecture review focused on preventing recurrence. Review topology for blast radius reduction, mitigation coverage, and observability gaps. Consider whether the current architecture scenario should evolve.

Effort: 1–2 sprints

This post-mortem framework is derived from structured architecture knowledge. It provides an evidence-grounded starting point, not a substitute for a live incident review conducted by the team closest to the system. Adjust remediation priorities based on actual runtime observations.

Post-Mortem: Leader Election Storm: DBRaven