Skip to content
LinkState
Go back

Quorum design for multi-region network controllers

Design Memo: Quorum Placement, Lease Timeouts, Fencing, and Operator Override for WAN‑Resilient Controllers

Author: Sophia Lin – Cloud & Automation Architect
Date: 2025‑09‑26


Introduction

Controllers that orchestrate network services (SD‑WAN overlays, service‑mesh control planes, NFV orchestrators) must stay available when a WAN partition isolates one or more regions. The two failure modes to avoid are:

  1. Global freeze – the controller cannot form a quorum and stops processing traffic.
  2. Dual writer (split‑brain) – disjoint partitions each believe they have a valid quorum and issue conflicting updates.

Quorum placement and lease timeouts are the primary levers for influencing how quickly a partition detects loss of majority and whether it may continue operating. The design must balance fault‑detection speed against availability under transient WAN degradation.


Quorum Placement Strategies

StrategyDescriptionTypical Use‑CaseFault‑Tolerance Model
Static odd‑sized voter setFixed number of voting nodes (e.g., 3, 5, 7) placed a priori.Small‑to‑medium clusters with predictable low latency (< 50 ms RTT).Tolerates ⌊(N‑1)/2⌋ node failures.
Weighted votingEach node carries a weight; quorum is reached when sum of weights ≥ threshold.Heterogeneous sites (large hub weight = 2, spokes weight = 1).Tolerates failures up to weight‑threshold‑1.
Witness‑only nodesNon‑voting nodes that participate in lease/heartbeat exchanges but do not count toward quorum.Geo‑distributed deployments where adding a full voter per site is costly.Provides tie‑breaking without increasing failure tolerance.
Flexible quorums (Flexible Paxos / Flexible Raft)Read quorum (R) and write quorum (W) can differ; only need R+W > N.Read‑heavy workloads; allows smaller write quorum for larger read quorum.Tunable trade‑off between write latency and fault tolerance.
Hierarchical / regional quorumEach region runs a local quorum; a global coordinator needs only a subset of regional leaders to agree.Multi‑region services with low intra‑region but high inter‑region latency.Failure tolerance is per‑region; global progress requires at least one healthy region plus enough regional leaders.

Placement Constraints


Lease Timeout Configuration

A lease is a time‑bounded promise that a leader holds the right to propose updates. If the leader fails to renew its lease before expiration, followers may initiate a new election.

Configuration Guidelines (based on measured RTT, r, between voter sites)

  1. Lower bound – T_lease > 2 × max_one_way_latency to avoid premature expiration from transient loss.
    Example: max RTT = 80 ms (one‑way ≈ 40 ms) → T_lease ≥ 160 ms.
  2. Upper bound – T_lease should be < MTBF of the network link to ensure timely detection of actual partitions.
  3. Heartbeat vs. lease – T_hb = T_lease / k, where k ∈ [2, 5]. Smaller k yields faster detection but higher overhead.
  4. Randomized election timeout – T_election = T_lease × [0.5, 1.5] (or similar) to reduce collision probability.

Trade‑offs

ParameterSmaller ValueLarger Value
T_lease / T_hbFaster leader failure detection → quicker failover, but higher false‑positive rate under jitter.Slower detection → fewer false positives, but longer unavailability during a real partition.
Election timeout spreadNarrow spread → higher probability of simultaneous elections (split‑vote).Wide spread → lower collision probability but longer worst‑case election time.
Weighted votingAllows small sites influence without adding many voters.Increases complexity of weight‑change procedures; mis‑weighted configs can unintentionally create minority quorums.

Fencing Mechanisms

Even with correct quorum and lease settings, a partitioned leader may continue to believe it is valid while followers have elected a new leader. Fencing ensures the old leader cannot cause divergent state.

MechanismHow It WorksTypical DeploymentProsCons / Failure Modes
STONITHPower‑cycle or reset the suspect node via out‑of‑band management (IPMI, iLO, iDRAC, etc.).Physical servers, bare‑metal controllers.Guarantees node is powered off; simple to audit.Requires reliable out‑of‑band network; mis‑fire causes service disruption.
I/O Fencing (SCSI‑3 Persistent Reservations)Reserve access to shared storage; only the node holding the reservation may perform I/O.Shared‑disk clusters (Oracle RAC, some NFV VIMs).Prevents split‑brain at storage layer.Requires SCSI‑3 capable storage; not applicable to pure state‑machine controllers (etcd, Consul).
Network‑Based FencingDisable the node’s network interface (e.g., via API to switch, or null‑route) or revoke its TLS certificates.Virtualized or cloud controllers where NIC/API access is available.No power cycling; can be granular (specific services).Dependent on control‑plane network; if the control plane is partitioned, fencing may fail.
Lease‑Based FencingLeader must hold a lease (e.g., from a lock service) to write; loss of lease automatically revokes write authority.Etcd, Consul, ZooKeeper (via session leases).Ties fencing directly to consensus lease; no extra hardware.If lease service itself is partitioned, both sides may think they hold the lease—requires careful placement of lease service voters.
Quorum‑Based Fencing (Witness Node)A designated witness (non‑voting) must acknowledge any write; loss of witness contact blocks writes.Custom controller designs; rarely used in off‑the‑shelf stacks.Simple to implement; witness can be placed in a third site for tie‑breaking.Adds latency; witness becomes a single point of failure unless replicated.

Choosing a Fencing Method


Operator Override Paths

Automated fencing may be undesirable during planned maintenance or when an operator wishes to force a specific node to stay leader (e.g., to avoid a costly re‑sync). Override paths must be:

  1. Explicit – require a deliberate command, not a side‑effect of a configuration change.
  2. Auditable – logged with timestamp, operator identity, and reason.
  3. Reversible – allow the system to return to automatic mode after the override ends.
  4. Isolated – cannot bypass core safety invariants (e.g., must still respect lease expiration unless the operator also updates the lease timeout).

Common Patterns

Override MechanismImplementation ExampleSafety Guardrails
Manual leader transferetcdctl member promote <node-id> or consul operator raft remove-peer followed by add-peerOnly allowed if current leader is healthy; requires lease renewal from the target node.
Force quorum resetetcdctl snapshot restore <snapshot> then --initial-cluster with a new voter setRequires a valid snapshot; system refuses if snapshot term is older than current term.
Disable automatic fencingcrm configure property stonith-enabled=false (Pacemaker)Must be accompanied by a maintenance‑window flag; monitoring alerts on disabled fencing.
Lease timeout overrideUpdate etcd --election-timeout flag via rolling restart or dynamic reconfiguration (if supported)Change is logged; monitoring verifies new timeout > 2×RTT; rollback restores original value.
Emergency read‑only modeSet controller to reject write requests (e.g., via feature flag or policy) while allowing readsGuarantees no divergent writes; used when network partition is suspected but not confirmed.

All override actions should go through an approval workflow (e.g., ChatOps with required sign‑off, or a ticket‑based change management system) to satisfy the “operator override path” requirement.


Designing for WAN Partition Survival

The goal is to allow each region to continue operating as long as it can maintain a local quorum, while preventing global freeze or dual writers when the WAN partitions. The design combines quorum placement, lease tuning, fencing, and explicit operator gates.

Regional Fault Isolation Techniques

  1. Regional Voter Subsets – Assign a minimum odd number of voters per region (e.g., 3 voters in each of three regions). Inter‑region communication is only needed for global commit decisions; local reads/writes can proceed with the regional quorum if the application permits eventual consistency or read‑your‑writes semantics.
  2. Witness‑Only Tie‑Breaker – Place a lightweight witness node in a third, highly‑available location (e.g., a cloud region with excellent connectivity). The witness does not store state but participates in lease heartbeats to break ties when two regions each have half the voters.
  3. Asynchronous State Shipping – For operations requiring strong consistency across regions (e.g., global policy updates), use an asynchronous replication stream that is not on the critical path; the local controller can acknowledge the write locally and later propagate the update.
  4. Dynamic Voter Re‑configuration – When a region detects a sustained WAN loss (> threshold), it can temporarily demote its voters to non‑voting observers and rely on its local quorum for all decisions. The change is reversed automatically when connectivity heals.

Global Freeze Prevention Strategies

Dual Writer Event Mitigation


Troubleshooting Quorum and Lease Timeout Issues

Effective troubleshooting relies on observable metrics, logs, and a small set of CLI commands. The following sections assume a typical etcd‑based controller; analogous commands exist for Consul (consul operator raft) and ZooKeeper (zkCli.sh).

Identifying and Resolving Quorum Loss

SymptomDiagnostic CommandInterpretation
No leader, cluster unavailableetcdctl endpoint status --cluster -w tableShows which nodes believe they are leader; blank leader field indicates no quorum.
Member listed as “unhealthy”etcdctl member listLook for false under isLearner or isLeader; check unhealthy flag.
Election logs floodingjournalctl -u etcd (or container logs)Repeated “failed to send heartbeat” or “election timeout” messages indicate lease/heartbeat issues.
Split‑brain suspicion (two leaders)etcdctl endpoint status from multiple clients; compare leader fields.Two different leaders → potential dual writer.

Resolution steps

  1. Verify network connectivity between voters (ping, traceroute, tcptrace).
  2. Check lease renewal latency and heartbeat response times via etcdctl endpoint status or Prometheus metrics (etcd_server_leader_changes_seen_total, etcd_network_client_grpc_received_bytes_total).
  3. If a node is consistently unhealthy, inspect its logs for lease renewal failures and consider replacing or isolating the node.
  4. In case of split‑brain, identify the partition with the higher term (via etcdctl endpoint statusleader and term) and fence the lower‑term leader using the chosen fencing mechanism.
  5. After fencing, restart the isolated node and let it rejoin the cluster; verify that a single leader is elected and that the cluster health returns to normal.

End of memo.


Share this post on:

Previous Post
AF_XDP zero-copy versus XDP_PASS under real handler work
Next Post
Root CA rotation partitioned one tenant after a seemingly clean rollout