Oracle system design interviews often feature problems like designing scalable counters for high-traffic web applications, but no exact match exists for a "Design Page View Counter" problem statement with those precise tags across public sources.[1]
A common variant is designing a distributed page view counter for websites (e.g., like Google Analytics), emphasizing real-time counting, uniqueness (avoiding duplicates), scalability for millions of views/sec, and analytics support. This aligns with tags like Analytics, data_engineering, Real-time, web, backend, and infrastructure.[3][1]
Full Problem Statement (Standard Formulation):
Design a system to accurately count page views for millions of web pages in real-time, supporting:
increment(pageId: string) -> void (async, fire-and-forget).getCount(pageId: string) -> long (<100ms latency).getTopPages(limit: int, window: time) -> list<(pageId, count)>.| Category | Details | |----------|---------| | Scale | 10M writes/sec, 100K reads/sec; 1B+ pages; 99.99% availability. [1] | | Latency | Writes: async (<1s end-to-end); Reads: <100ms. [1] | | Consistency | Eventual (HyperLogLog for uniques); counters approximate ±1% OK for analytics. [3] | | Storage | 100TB+ daily; partition by time/page; retention 1 year. [1] | | Uniqueness | Dedupe by IP+userAgent+timestamp (5-min window); 1% sample for exactness. [3] | | Fault Tolerance | Replicate across 3+ regions; no data loss. [1] |
Increment (no direct output, async):
Input: increment("page/123") (from web server on page load).
Internal: Log to Kafka/Redis increment by 1; batch to DB.[1]
Get Count:
Input: getCount("page/123")
Output: 1500000 (cached exact + stream estimate).[1]
Top Pages (Analytics):
Input: getTopPages(10, "1h")
Output: [("page/123", 500k), ("page/456", 450k), ...][3]
No verbatim Oracle-specific examples found with these tags, but this captures the core challenge seen in similar interviews (e.g., real-time IoT analytics).[3][1]