Practice
1. A webhook delivery system must guarantee ordered delivery of events per subscriber, even under retries and failures. Which component is best suited to enforce per-subscriber ordering?
easy
Solution
Step 1: Identify ordering guarantee mechanism
Kafka partitions keyed by subscriber ID ensure all events for that subscriber go to the same partition, preserving order.Step 2: Eliminate other options
Redis cache lacks strong ordering guarantees under retries; relational DB global sequence causes contention and latency; load balancer routing alone doesn't guarantee ordering without stateful processing.Final Answer:
Option A -> Option AQuick Check:
Kafka partition key -> per-subscriber ordering guaranteed [check]
Hint: Partition by subscriber ID for ordering [check]
Common Mistakes:
2. If the idempotency key store becomes unavailable, what is the most likely failure mode for the payment API when a client retries a payment request?
medium
Solution
Step 1: Understand idempotency store role in retries
Without the store, the API cannot verify if a request is a retry, so it must delay processing to avoid duplicates.Step 2: Eliminate other options
Rejecting all requests is possible but not typical; processing retries as new causes duplicates, which is avoided; fallback caches are uncommon and inconsistent.Final Answer:
Option B -> Option BQuick Check:
Unavailable idempotency store causes request queuing to prevent duplicates [check]
Hint: No idempotency store -> queue retries to avoid duplicates [check]
Common Mistakes:
3. If the CDN's cache invalidation mechanism fails to propagate updates, what is the exact failure experienced by end users?
medium
Solution
Step 1: Understand cache invalidation failure impact
Failure to propagate invalidation means cached content remains stale beyond intended update.Step 2: Identify user experience as stale content served until TTL expiry
Users see outdated data until cache naturally expires or is manually cleared.Final Answer:
Option B -> Option BQuick Check:
Cache invalidation failure -> stale content served, not errors or overload [check]
Hint: Invalidation fails -> stale content served until TTL expires [OK]
Common Mistakes:
4. At 10x traffic scale during a flash sale, which component is most likely to fail first and why?
hard
Solution
Step 1: Identify stateful components under load
API Gateway maintains user session state (e.g., WebSocket connections), which are sticky and stateful, limiting horizontal scaling.Step 2: Compare other components
Relational DB (A) can be sharded; cache (C) TTL floods are mitigated by pre-warming; inventory locking (D) is optimized with partitioning. API Gateway statefulness causes connection limits and bottlenecks first.Final Answer:
Option B -> Option BQuick Check:
API Gateway stateful sessions limit horizontal scaling [check]
Hint: Stateful API Gateway limits scaling under 10x load [check]
Common Mistakes:
5. At 10x scale, which component is most likely to become the bottleneck first when handling millions of concurrent video streams and progress updates, and why?
hard
Solution
Step 1: Analyze stateful connection scaling
WebSocket servers maintain stateful connections per user, limiting horizontal scaling due to connection affinity.Step 2: Compare other components' scalability
Relational DB (The relational database storing user progress, due to write contention on user records) can be sharded; CDN (The CDN edge servers, due to bandwidth limits serving video content globally) scales horizontally; Progress Worker (The Progress Worker service, due to single-threaded processing of progress update events) can be parallelized.Final Answer:
Option B -> Option BQuick Check:
WebSocket servers hit stateful connection limits first [check]
Hint: Stateful WebSocket servers limit scaling first [OK]
Common Mistakes:
