Design an Analytics Dashboard
MediumSystem design · Analytics
Design a product-analytics service for customers of a SaaS product. Customers send raw events, define metrics, and view dashboards of those metrics over time with filters and group-bys, backed by raw events. Each customer is a tenant who must never see another's data.
In scope: event ingestion, storage layout, rollups, the query path and caching, late events, and tenant isolation. Out of scope: the visualization front end and ML-driven insights.
Requirements
- Ingest events durably with add-only schema evolution
- Pre-aggregate common queries while preserving drill-down into raw events
- Handle late events and backfills by recomputing only affected partitions
- Enforce tenant isolation in the query layer, with limits on cost and cardinality