Decision Engine
The scorer that re-ranks your CDNs on every tick and decides who serves each region and network.
What it is
The Decision Engine is the control-plane component that turns telemetry into a routing decision. On a fixed cadence (a 'tick') it gathers the latest signals, scores every connected CDN, and writes the winner into DNS and the steering manifests.
Its output is not a binary alive/dead verdict. It is a weighted score per CDN — a continuous number — so close calls and gradual degradation are handled gracefully rather than as a cliff edge.
The v1 weighted score
Each CDN is scored on three normalised dimensions and blended with locked v1 weights: 0.50 · latency + 0.30 · error-rate + 0.20 · cost. Each dimension is normalised 0–1 against the other candidates that tick, so the score is always relative to the live field.
Latency dominates because viewers feel it first; error rate guards against a fast-but-broken edge; cost is the tiebreaker that lets a cheaper CDN win when quality is otherwise even.
Region × network resolution
A CDN that is excellent nationally can be poor on one mobile carrier. The engine scores per (region × network/ASN) rather than one number per CDN, so it can send most of a region to CDN A while routing one bad carrier to CDN B (ADR-132 / task #270).
Every decision carries a signal-tier confidence chip, so you can see whether a routing choice rests on real player data or on a thinner probe signal.
Gating: hysteresis and cooldown
A raw winner is not switched to blindly. A gate sits between the scorer and the live decision: hysteresis requires the challenger to beat the incumbent by a margin (not just tie) so tiny wobbles don't flap viewers, and a cooldown enforces a minimum dwell time after each switch. The 'scorer pick' can therefore differ from the 'effective winner' you see serving.
Standards & references
- ADR-132 — region × network decision matrix + signal tiers
- Locked design decision — weighted score per (region × CDN)