advanced 2 min answer

A configuration change must propagate to thousands of edge locations worldwide within seconds, while remaining safe against a bad global configuration. What consistency and rollout properties does the propagation system need?

consensusconfigurationedgecloudflarerolloutconceptual
Show the full answer Hide the answer

Two different consistency problems

The naive framing — "make configuration strongly consistent everywhere" — merges two problems with different answers.

Agreeing what the configuration is is a consensus problem. There must be one authoritative, ordered sequence of configuration versions, so that "version 4711" means the same thing everywhere and versions cannot be applied out of order. This is what a consensus-backed store provides, and it runs in a small number of nodes in a control plane — not at thousands of edges.

Getting it applied everywhere is a distribution problem, and it must not require consensus among edges. Requiring thousands of geographically dispersed nodes to agree before any of them acts would make availability worse than the problem it solves: one unreachable region would block the world.

The resulting architecture

  • A consensus-backed control plane holds the ordered, versioned, signed configuration. Small, odd-numbered, quorum-based.
  • Edges pull or receive pushed versions independently and apply them locally. An edge that is partitioned keeps running its last known-good configuration — it does not stop serving, and it does not need to reach the control plane to be useful.
  • Configuration is a signed immutable bundle with a monotonic version. An edge never applies an older version than it currently holds, which makes propagation order-insensitive.
  • Convergence is eventual and monitored. The interesting metric is not "is everything consistent" but the distribution of versions across the fleet, and the age of the laggards.

The safety properties that matter more than speed

Fast global propagation is a mechanism for causing a fast global outage. The property actually required is fast propagation with fast, unconditional rollback.

  • Staged rollout by blast radius. A canary point of presence, then a region, then the fleet, with automatic promotion gated on health signals from the stage before it.
  • Validation before distribution. The bundle is compiled and checked in the control plane, so syntactically or semantically invalid configuration cannot reach an edge. Validation at the edge is too late — by then it has already been distributed.
  • Health-gated promotion using real traffic signals, not just "did it apply". A configuration can apply successfully and still be wrong; the signal must be error rate and latency on served traffic.
  • Rollback that does not depend on the thing that broke. This is the one teams miss. If a bad configuration breaks the control-plane connection, rollback must still work — hence a locally cached last-known-good version and an automatic revert on failure to receive a heartbeat.
  • Rollback that is faster than rollout. Deliberately: the danger window is proportional to how long it takes to undo.

The general lesson

Use consensus for deciding, and eventual consistency plus staged rollout for distributing. Systems that try to use consensus for distribution become unavailable under partition; systems that use eventual consistency for deciding get conflicting configurations that cannot be ordered. And in any global control plane, the rollback path is more important than the rollout path, because it is the one you will need during your worst hour.