Design a Real-time Web Analytics System (like Google Analytics).
Code Playground
JavaScript (V8)
Loading...
Console Output
// Output will appear here...
// For React: ReactDOM.createRoot(rootElement).render(<App />);
// For React: ReactDOM.createRoot(rootElement).render(<App />);
Recommended Answer
System Design Scenario:
1. Ingestion: JS SDK sends beacons -> Endpoint -> Kafka.
2. Processing:
* Real-time: Spark Streaming/Flink -> Aggregate views -> Redis/Cassandra.
* Batch: Dump to Data Lake (S3) -> nightly processing (Hadoop/BigQuery).
3. Storage: Columnar DB (ClickHouse/Druid) for ad-hoc querying.