Edge Cache and CDN Platform  ·  View 16 of 29  ·  5 · Runtime

Purge by Surrogate Key

One invalidation that addresses two million objects, acknowledged PoP by PoP, without deleting a single object.

Editable source SVG draw.io All views
Release engineer Purge API Ack ledger JetStream core NATS leaf · each PoP PoP agent Tag table · each node 1. purge tag price-list · mode expire 2. purge role · property budget 50/s 3. publish · wait for R3 quorum 4. seq 88412 stored on 2 of 3 sites 5. 202 · seq 88412 · status URL 6. mirror to 18 PoPs 7. deliver 88412 in order 8. price-list expired at 19:00:02.114 9. on lookup: stored before tag time → stale 10. ack LHR · applied through 88412 11. ack stream 12. 17 of 18 PoPs in 1.4 s 13. outcome · GRU pending, named Purge by Surrogate Key — Two Million Objects, One Record Nothing enumerates the two million objects. Each lookup compares its store time with the tag's time, so cost is the same for one object or millions. v 1.0 · owner Edge Platform · date 2026-09

Why nothing is deleted

  • Enumerating two million objects on 90 nodes is 180 million deletes, with index scans on every node, during the minutes a release most needs the serving path. Instead the node records one row: tag price-list, invalidated at 19:00:02.114.
  • Every stored object carries its tags and its store time. On lookup, if any of its tags was invalidated after it was stored, the object is a miss (purge) or stale (expire). The cost of a purge no longer depends on how many objects it matches.
  • The table stays small because entries only need to outlive the longest TTL. The 30-day TTL ceiling therefore also bounds the size of the tag table.

What acknowledged means

  • A PoP acknowledges after every node's tag table has committed the record, not when the message arrives. The ledger records which sequence number each PoP has applied up to.

Numbers

  • R3 quorum write across three sites about 200 ms; mirror to the farthest PoP about 300 ms; apply and acknowledge under 100 ms. Typically under 2 s end to end against a 5 s p95 budget.