2024·Tech Lead
Realtime Analytics Dashboard
Sub-second analytics for an event-heavy product, ingesting 100k events per second with interactive queries under 200ms.
Problem
The product team wanted a customer-facing analytics dashboard with sub-second interactivity over a year of historical data. The existing relational warehouse answered simple questions in tens of seconds and timed out on anything interesting.
Solution
- Replaced the ingest path with Kafka fan-out into ClickHouse with materialized views per query.
- Built a Go service serving pre-aggregated slices via gRPC streams with strict deadlines and per-customer token buckets.
- Rewrote the frontend around server components and a thin client cache — users never wait for a full roundtrip to see filter results.
Result
- 100k events/second sustained, 99th percentile query latency under 200ms.
- “Is the dashboard broken” support tickets dropped 80% in the first month.
- Architecture became the reference design for two subsequent products.