pnclPULSEGet API access

DROP ALERT NOTES

How much state a dedupe store actually needs

Alert dedupe holds fingerprints, not payloads. Size it from your busiest day, retire keys on a clock, and it stays a few megabytes forever.

Every dedupe design answers "have I seen this alert" with a store, and the store raises the question nobody budgets for: how much state is enough? The good news is the answer is small, boring and computable. Size it from your own alert rate, keep it on a clock, and it will never be the part that breaks.

What the store actually holds

The dedupe guide defines the contents: keys that answer three questions. The alert id catches literal repeats, the event and outcome pair catches the same move re-arriving, and the cooldown keys hold quiet periods per phase. Ids kept for a day cover the restart cases; the pair keys cover the market's own repetition.

None of this is rows of prices or payload history. The store holds fingerprints, not data. An id, a pair and a timestamp are a handful of bytes each, which is why the whole design fits in memory almost forever.

Size it from your own traffic

The honest sizing input is your log, not a guess. Count alerts per day at your current threshold for a week, take the busiest day, and keep keys for that volume plus headroom for a slate twice as big. Ten thousand alerts in a day, a big day by most measures, is a few megabytes of keys.

Two multipliers deserve respect. Live cards inflate volume fast, since the same selection can reprice on every point, as the dedupe guide's tennis example shows. And lowering min_drop toward the floor of 1 multiplies whatever you measured. If you plan a threshold change, resize the store from the new rate, not the old one.

Evict by time, not by capacity

The store should never fill, because nothing in it needs to live long. A restart replay arrives within minutes; a duplicate pair matters within the cooldown window. A time-to-live measured in hours or a day retires every key on schedule, and the store stays the size of a day at most.

This is the property that keeps the design calm: capacity problems become time problems, and time problems are configuration, not incidents.

Where to keep it

In-process memory is enough for one reader: a dict with timestamps, swept on a timer. Move to a shared store the day a second process needs the same answers, a standby reader or a relay pair, because two memories that disagree are a duplicate generator. The setup guide puts rule state server-side for the same reason, checked 2026-10-30.

Whatever holds it, persist it on shutdown and reload on start. The restart case is exactly when the store earns its keep, and a store that forgets on exit is the duplicate source you built it to prevent.

A day of keys, a clock to retire them, one process that owns the truth. The dedupe store is small on purpose, and sized this way it stays that way.