AlgoInsight

System design interview question

Design a Distributed Event Sourcing and CQRS System for Real-Time Analytics like Mixpanel at Scale

MediumHLDHLD practice

Design a system that ingests, processes, and serves analytics events for 500M users generating 2M events per second with sub-second query latency. The system must support complex event filtering, funnel analysis, cohort segmentation, and real-time dashboards while maintaining strong consistency for critical business metrics. Events arrive from mobile, web, and backend sources across 3 geographic regions. You must handle backpressure, deduplication, late arrivals (up to 24 hours), and provide both real-time (< 1s) and historical analytics queries (7-year retention). Consider how you'd separate writes (event ingestion) from reads (analytics queries), ensure exactly-once processing semantics, and maintain low operational complexity.

Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.

Event SourcingCQRSDistributed StreamingTime-Series DatabasesDeduplicationConsistency ModelsScalabilityBackpressure Handling

Practice this question