</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

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

  1. Raw events ingested
  2. Aggregates updated (streaming)
  3. Ranked Top-K lists materialized
  4. Served from cache / store
  5. 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

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.