Design a user behavior monitoring system
RipplingSoftware Engineer · OnsiteLast updated
This question evaluates a candidate's ability to design scalable, low-latency user event ingestion and analytics pipelines while reasoning about data storage choices and aggregate correctness trade-offs.
System Design: User Behavior Monitoring System
You are asked to design a monitoring/analytics system that collects user behavior events from clients (e.g., app install, user clicks, etc.). The system must support:
Functional requirements
- Real-time monitoring: show near-real-time metrics on dashboards (e.g., installs per minute, click-through rate).
- Raw event retention: store raw events for large offline/batch jobs (e.g., daily/weekly aggregation, deeper analysis).
- Metric discovery/confirmation: you should clarify with the interviewer which exact product metrics are needed (assume multiple counters/ratios, grouped by dimensions like platform/app version/country).
Non-functional requirements (assume typical expectations)
- Handle high write throughput (many clients emitting events).
- Low-latency updates for dashboards (seconds-level is acceptable unless otherwise specified).
- Scalable storage and compute.
- Reasonable correctness for aggregates (be explicit about tradeoffs: at-least-once vs exactly-once, late events).
Out of scope
- System/infra observability metrics like host reliability/latency are not required unless you want to briefly mention them.
Design the architecture, key components, data flow, storage choices, and how you compute/serve real-time metrics vs offline analytics.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.