Course map

Project 19

Event analytics platform

Event ingestion, stream processing

Start after Part 7 + topic 213

Key topics 34, 78, 124, 213

Architecture Services

Brief

A product-analytics pipeline: SDKs send behavioral events; the platform ingests, validates, enriches, stores, and serves dashboards — funnels, retention, live counts.

Targets

1M events/sec peak ingest · no data loss at the edge (client buffering, at-least-once) · live dashboards within 10 s of event time · a year of history queryable in seconds · cost per billion events tracked.

Must cover

  • Schema compatibility — a registry with enforced evolution rules (→ 34).
  • Late and out-of-order events — watermarks, re-emission or correction (→ 114, 124).
  • Replay — reprocessing from the retained log as the recovery mechanism (→ 111).
  • Data-quality checks — validation, quarantine, and completeness monitoring (P).

Design challenges

  1. Ingest edge (→ 106, 111, 97): lightweight collectors in front of the log; batching and compression; backpressure to SDKs; schema validation (→ 34) with a quarantine path.
  2. At-least-once plus deduplication (→ 115–116): client event IDs, dedup windows — and the economics of exactly-once at this volume.
  3. Two layers, one choice (→ 124, 213; → 214 — ahead, Part 13): streaming aggregation for live views and a columnar store for history — lambda vs. kappa, chosen and defended.
  4. Event time vs. processing time (→ 124): mobile devices offline for days.
  5. Storage tiering (→ 78, 213; → 208 — ahead, Part 12): hot weeks → warm months → object-storage archive in open table formats.
  6. Cardinality control (→ 202 — ahead, Part 12): user-defined properties exploding the metric space — limits as a design feature.

Out of scope

ML over the event stream; cross-device identity resolution (noted as extensions).

Search the guide