Practice
1. In a CDN request flow, at step 4 the edge node checks its cache for the requested content. What happens if the content is not found in the cache at this step?
easy
Solution
Step 1: Trace edge node cache miss behavior at Step 4
If content is missing, the edge node must fetch it from the origin server.Step 2: Eliminate other options
Returning 404 is incorrect because content may exist; redirecting to another edge node is inefficient; serving stale content violates freshness guarantees.Final Answer:
Option A -> Option AQuick Check:
Cache miss -> edge node fetches from origin server [check]
Hint: Cache miss -> fetch from origin server [check]
Common Mistakes:
2. During a flash sale, the system must handle sudden bursts of 10x traffic within 60 seconds, ensuring order preservation of purchase requests per user session. Which component best handles this requirement?
easy
Solution
Step 1: Identify ordering requirement per user session
Kafka partitions keyed by user session ID guarantee ordering within that partition, ensuring requests are processed sequentially per user.Step 2: Evaluate alternatives
Relational DB row-level locking (A) causes high contention and poor scalability under 10x burst. Redis (C) lacks strong ordering guarantees and durability. Load balancer (D) only distributes load but does not preserve order.Final Answer:
Option C -> Option CQuick Check:
Kafka partition key -> per-session ordering guaranteed [check]
Hint: Kafka partitions preserve order per key [check]
Common Mistakes:
3. For a distributed file system requiring strong consistency on metadata updates but high availability, which architecture is most appropriate?
medium
Solution
Step 1: Analyze consistency and availability needs
Strong consistency requires coordination; high availability requires fault tolerance.Step 2: Evaluate architectures
Consensus-based clusters provide strong consistency and tolerate failures; single server risks downtime; independent shards lack coordination; eventual consistency violates strong consistency.Final Answer:
Option A -> Option AQuick Check:
Consensus clusters balance strong consistency and availability [check]
Hint: Consensus clusters ensure strong consistency with availability [check]
Common Mistakes:
4. At 10x scale in user requests and live traffic updates, which component is most likely to fail first and why?
hard
Solution
Step 1: Analyze scaling bottlenecks
Road Graph DB (A) can be sharded; ingestion pipeline (C) can scale horizontally; client rendering (D) is local and less critical.Step 2: Identify Routing Engine CPU bottleneck
Routing Engine performs complex shortest path computations per request; 10x load causes CPU saturation and latency spikes, failing first.Final Answer:
Option C -> Option CQuick Check:
Routing Engine CPU-bound under 10x load causes first failure [check]
Hint: Routing Engine CPU saturates first under 10x load [check]
Common Mistakes:
5. At 10x scale, which component in a sliding window rate limiter is most likely to fail first and why?
hard
Solution
Step 1: Analyze sliding window memory scaling
Sliding window counters store timestamps for each request, so memory grows linearly with request volume.Step 2: At 10x scale, timestamp storage exhausts memory first, causing failures before other components become bottlenecks
Fixed window counters use constant memory, token/leaky buckets have fixed state sizes.Final Answer:
Option A -> Option AQuick Check:
Sliding window timestamp storage grows with traffic -> memory exhaustion [check]
Hint: Sliding window memory grows with requests, fixed window constant [check]
Common Mistakes:
