{
  "id": 17316662,
  "title": "Realtime Event Retention Policy: Scaling Delivery Tracking Maps Through 3 Recovery Windows",
  "url": "https://urgent.news/2026/10/31/realtime-event-retention-policy-scaling-delivery-tracking-maps",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-31T01:17:45.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ellisvance1273/realtime-event-retention-policy-scaling-delivery-tracking-maps-through-3-recovery-windows-3eli"
  },
  "original_language": "en",
  "account": "Realtime event retention plays a crucial role in scaling delivery tracking maps. The policy involves three recovery windows: a short, lossless stream for reconnects, a compact snapshot for backfill, and discarding movement noise once the map has caught up. The key is to distinguish between transient hints and business transitions.\n\nA courier's typing indicator only needs seconds of retention, while a read receipt requires a durable state transition. GPS markers demand the latest position, not every recorded point while the phone is underground. Treating all these as events leads to inefficiency and slow reconnects.\n\nRetention tiers should be based on actual usage patterns like reconnect frequency and the oldest useful update in your fleet. Implement a recovery contract where every message includes a monotonically increasing sequence, event type, and server timestamp. Use per-delivery or per-channel counters to avoid unnecessary contention.\n\nImplement a bounded stream with expiry based on server time. On reconnect, reject older cursors with a \"snapshot_required\" response and send the current delivery state followed by new events. Provide a snapshot containing necessary information such as marker position, status, last receipt state, and field versions. Use idempotent apply and log cursor, selected branch, and snapshot version but exclude sensitive data like driver notes or tokens.\n\nDuring an outage scenario, test the policy by simulating a lost handset connection and verifying the client renders the latest snapshot, applies deltas in order, and shows the receipt state. Measure the performance of fan-out during backfill and test the policy with time by freezing the server clock and reconnecting with \"oldest - 1\".",
  "summary": "Short answer: keep a short, lossless stream for reconnects, a compact snapshot for backfill, and discard movement noise once the map has caught up. That split scales realtime event delivery without pretending a tracking map needs an eternal event log. The awkward part is choosing the boundary. A courier's typing indicator (the dispatcher is composing a note) wants seconds of retention. A read…",
  "key_points": [
    "Realtime event retention crucial for scaling delivery tracking maps",
    "Three recovery windows: short lossless stream, compact snapshot, and discarding noise",
    "Retention tiers based on usage patterns and monotonically increasing sequence"
  ],
  "editors_take": "Differentiating between transient signals and durable state transitions allows systems to reduce data inefficiency and accelerate client reconnections by prioritizing essential business updates over redundant movement noise.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}