Finding frequent endpoints with a sketch 00:00:01 An operator knows checkout is busy Checkout is on the incident dashboard with an estimated thirty-two hundred requests in the last minute. The operator wants the busiest route, including routes whose names she has never seen. Can the sketch name them? Our Count-Min Sketch can estimate requests for checkout because we already supplied its name. A heavy counter can contain collisions from multiple routes. Reading that counter backwards will not reveal a unique endpoint. So I need both the sketch to estimate counts and a separate list to keep track of which endpoints I'm watching. Hand me a route name and I can probe its counters immediately. Hand me only the counter array and there is no directory to tell me which strings to try. Discovery and frequency estimation are separate jobs. 00:00:47 Collect possible contenders Keep a separate bounded candidate table, say fifty route names for this example. That shortlist has its own approximation rule. Treating it as a guaranteed exact top fifty would overstate the evidence. For each incoming event, update the sketch and the candidate tracker. Use a normalized route such as checkout rather than a new identifier for every individual request. Even if I drop a candidate from the list, its sketch counters stay intact for future re-verification. One possible shortlist uses the Space-Saving policy. Increment a tracked key; if it is new and there is no free slot, replace a lowest-count candidate with that key and initialize its candidate count to the displaced count plus one. 00:01:32 Verify the cutoff Suppose candidate estimates are twenty-nine hundred and thirty-one hundred. Collisions can inflate one more than the other. Unless their separation is convincing under your error budget, treat their order as provisional. To learn the exact ordering for the reported minute, count those two named routes in retained events from that same minute. Preserve the original routing and normalization rules. When estimates are too close, I mark the result as uncertain instead of guessing. Use retained logs from the same minute when confirming a disputed ranking. A fresh ten-second sample can tell you what is happening now, but it cannot reconstruct an earlier minute when traffic had a different shape. 00:02:14 Regions and windows must agree For additive sketches with identical dimensions, hash functions and seeds, add matching counters from the same reporting interval across disjoint traffic partitions. Overlapping event ingestion would count requests twice. I also collect candidate names from each region to build a full picture of where traffic is rising. A route missing from every regional shortlist cannot appear just by unioning those lists. That does not erase its hash contributions; it explains why a separate candidate source can be useful. A key moderately busy in every region can be globally busy even if it missed every local shortlist. The merged sketch may still answer its name if supplied from elsewhere. The candidate union never discovers it by itself. 00:03:01 Choose the operational response I’ll alert only when a known endpoint shows sustained demand—then I’ll check logs before changing rates. I keep frequency, cardinality, and billing metrics separate so each can be trusted independently. Record how the shortlist behaves during a sudden shift. A newly popular route can take time to enter a bounded tracker, and stale old candidates can linger if windows are not expired. Keep an exact audit path when a threshold controls an expensive capacity change. An approximate shortlist lets an operator investigate a small set quickly. It supplies neither an exhaustive endpoint inventory nor guaranteed exact ranks.