Member-only story
Invalidation got faster; computing it got 540x slower
It worked in dev · Episode 19 · technique: multi-source BFS
When a cached value changes, the invalidation gossips out from the nodes that took the write, one hop per round. The ops dashboard shows how many rounds until every node in the cluster has it.
A write landing on one node: 9 rounds, and the dashboard computed that in 0.50 ms. A region-wide deploy landing on 1,000 nodes at once: only 6 rounds, because it starts from everywhere. The dashboard took 269 ms to say so, 540x longer, for an invalidation that finished sooner.
The problem
// peers[n] holds the nodes n forwards an invalidation to. Two-way, one round per hop.
type Cluster [][]intGiven the origins — the nodes where the invalidation starts — return how many rounds until every node has it, or -1 if some node never does.
What you would write
The dashboard already had HopsFrom: pick a node, see how many rounds a change there takes to reach every other node. A plain BFS, tested, drawn on a page.










