I started with the ingest layer which felt safe, load balancers into edge collectors into Kafka, and the interviewer just nodded and waited.
Start by clarifying requirements and scale, then propose a high-level architecture that separates ingestion, real-time processing, and storage. Focus on trade-offs between latency, consistency, and cost, and detail how to achieve 100M events/sec with partitioning and distributed systems.
Pro tip: Emphasize the importance of idempotency and exactly-once processing to avoid double-counting clicks, which is critical for billing accuracy. Also, discuss how to handle late-arriving data and its impact on real-time dashboards.
Ask questions to understand data volume, latency requirements for the dashboard, retention period, and consistency needs for billing. Confirm the 100M events/sec scale and estimate storage needs.
Propose a pipeline: ingestion layer (e.g., Kafka) to handle high throughput, stream processing (e.g., Flink) for real-time aggregations, and storage layers for real-time and batch analytics. Include a serving layer for the dashboard.
Detail each component: how to partition Kafka topics, use of windowing in stream processing, choice of databases (e.g., Druid for real-time OLAP, HBase for raw storage), and how to ensure scalability and fault tolerance.
Discuss trade-offs: latency vs. accuracy, cost vs. performance, and how to handle late data, duplicates, and exactly-once semantics. Explain how to scale each layer and handle failures.
Recap the design, ensuring it meets all requirements, and invite feedback. Mention potential optimizations and future improvements.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.