Skip to content

PATTERN Cited by 1 source

Weighted-voting tier selection

Pattern

To select the optimal upper-tier data center for a cloud region, treat each IP subnet within that region as a voter. Each subnet's vote is weighted by the strength of its current upper-tier assignment (derived from continuous latency probing). The upper tier that accumulates the highest weighted vote total becomes the region's primary.

Mechanism (Cloudflare)

  1. Cloud provider IP-range files fetched every few hours (AWS ip-ranges.json, GCP, Azure, Oracle equivalents).
  2. Each file maps cloud regions → IP prefixes (subnets).
  3. The upper-tier database (built from latency probes refreshed every 15 minutes) assigns each known subnet to its current best upper tier.
  4. For a given cloud region, each matching subnet contributes a weighted vote toward its assigned upper tier.
  5. The upper tier with the strongest aggregate signal wins → becomes the region's primary.

Why Voting (Not Single Probe)

  • A single subnet might have noisy probe data or be newly assigned.
  • Aggregating across all subnets in a region provides statistical robustness.
  • The weighting accounts for probe confidence / data freshness.
  • Regions with many active subnets get strong consensus; sparse regions fall back to concepts/geographic-fallback.

Properties

  • Self-updating: as cloud providers add/remove/reassign subnets, the vote pool changes automatically.
  • Continuous: no one-time assignment — the election runs every probe cycle.
  • Graceful degradation: insufficient votes → geographic fallback (not a wrong answer).

Seen in

Last updated · 575 distilled / 1,757 read