Design a Product Analytics Ingestion & Query System

Problem

Design Amplitude's core: ingest product analytics events and answer funnel/retention/segmentation queries.

Requirements

Functional:

  • Ingest billions of events/day from SDKs
  • Compute funnels, retention, and segmentation
  • Interactive query latency for dashboards
  • Real-time + historical

Non-functional:

  • Billions of events/day, high cardinality
  • Sub-second interactive queries
  • Cost-efficient storage

Discussion points

  1. Ingestion pipeline (Kafka) and dedup
  2. Columnar storage for analytical queries
  3. Pre-aggregation vs on-the-fly funnel computation
  4. User/session modeling
  5. Sharding and query parallelism
added …
LeaderboardSalaryAccount