Design Top-K System — Section 3: Data Modeling, System Characteristics & API Design
Goal of this section: Define how data is modeled, stored, partitioned, and accessed efficiently for Top-K queries.
1. System Characteristics
Before modeling data, clarify access patterns:
1.1 Read Patterns
- Very high QPS
- Same Top-K lists repeatedly requested
- Hot keys (global, US, popular categories)
- Mostly read-only during serving
1.2 Write Patterns
- Continuous event ingestion
- Frequent aggregate updates
- Append-only raw data
- Occasional recomputation / backfill
1.3 Data Lifecycle
- Raw events ingested
- Aggregates updated (streaming)
- Ranked Top-K lists materialized
- Served from cache / store
- Periodic recompute from raw events if needed
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson