When entering a 45-minute HLD interview, lock down functional scope, QPS/storage math, and read/write ratios before drawing boxes so every component justifies its latency, consistency, and failure-domain cost.
TL;DR30-second simplified summary▾
The Core Idea (Intermediate): Prove your data model and request paths hold up under peak load and retries.
How It Flows: Idempotent Write (Partition Key) -> Cache-Aside Read (<2ms hit) -> LSN / Session Pinning -> Bounded Backpressure.
Why It Matters: Naming the exact partition key and idempotency contract separates working production designs from whiteboard hand-waving.
Partition Keys, Idempotency, and Cache Boundaries.
Why this matters: Ensure writes are retry-safe and reads avoid scatter-gather queries.
Every distributed table needs an explicit partition key (such as Discord's (channel_id, bucket) time-bucketed key) to bound partition growth. Every mutating endpoint needs an idempotency key persisted atomically with the state change (like Stripe's idempotency keys) so network timeouts and client retries never duplicate side effects.
Idempotent Write & Cache-Aside Read
Atomic idempotency checks turn ambiguous network timeouts into safe client retries.
Pause & reason: where would you draw the boundary?▼
- Why does a composite `(entity_id, time_bucket)` partition key outperform a bare `entity_id` key for high-volume timelines?
Practice: Make the trade-off yourself.
A candidate proposes Kafka + 8-shard Cassandra + Redis Cluster for an internal tool with 50,000 DAU (~12 avg RPS, ~60 peak RPS) and 50 GB total 5-year storage. What is the strongest Principal-level critique?
How to Prepare for HLD Round
Lead with explicit scale math and read/write ratios before drawing boxes—every component in your HLD must justify its latency, consistency, and failure-domain cost.