Practice
1. In the News Feed system, at step 4 the Delivery Worker reads from the fan-out queue to push updates to followers. What happens if the follower's cache entry for the feed is expired at this step?
easy
Solution
Step 1: Trace Delivery Worker decision at Step 4 -- follower cache TTL expired
If the cache is expired, the Delivery Worker must fetch fresh data to ensure the follower receives the latest feed snapshot.Step 2: Evaluate other options
Skipping (A) causes missed updates; retrying without cache update (C) delays delivery; sending stale data (D) violates freshness guarantees.Final Answer:
Option A -> Option AQuick Check:
Expired cache triggers DB fetch for fresh feed [check]
Hint: Expired cache triggers DB fetch before delivery [check]
Common Mistakes:
2. In a request flow where a client sends a request through a forward proxy to an external server, at step 3 the forward proxy modifies the request headers. What exactly happens at this step?
easy
Solution
Step 1: Understand forward proxy header modification
At step 3, the forward proxy removes headers that reveal client identity and inserts its own IP as the source to hide the client.Step 2: Eliminate other options
It does not replace destination IP (that would break routing), nor encrypt payload (that's TLS), nor cache response before request forwarding.Final Answer:
Option A -> Option AQuick Check:
Forward proxy masks client IP by header modification [check]
Hint: Forward proxy swaps client IP with its own in headers [check]
Common Mistakes:
3. In a Cassandra-based messaging system, at step 4 the coordinator node receives a write request for a message with partition key user123. What happens if the coordinator node's local replica is down?
easy
Solution
Step 1: Understand coordinator role in Cassandra write path
The coordinator routes writes to all replicas responsible for the partition key; if one replica is down, it routes to the others.Step 2: Evaluate failure handling
Writes are not failed immediately if a replica is down; coordinator does not retry indefinitely on the same node; no fallback to relational DB.Final Answer:
Option C -> Option CQuick Check:
Coordinator routes writes to available replicas -> ensures write availability [check]
Hint: Coordinator routes writes to live replicas, not fail immediately [check]
Common Mistakes:
4. If the prefix hash map component fails and becomes unavailable, what is the immediate impact on the autocomplete system's behavior?
medium
Solution
Step 1: Understand component roles
The prefix hash map is an optimization for O(1) prefix lookups, but the Trie is the primary data structure for prefix matching.Step 2: Trace failure impact
If the prefix hash map fails, the system falls back to the Trie for prefix queries, which still works but may have slightly higher latency.Final Answer:
Option B -> Option BQuick Check:
Trie fallback ensures prefix queries continue despite prefix hash map failure [check]
Hint: Trie fallback keeps prefix search alive if prefix hash fails [check]
Common Mistakes:
5. At 10x scale, which component in the real-time ML inference system is most likely to fail first and why?
hard
Solution
Step 1: Analyze scaling bottlenecks
Model storage (A) scales with caching; Kafka (C) can be scaled by adding partitions; load balancers (D) scale horizontally.Step 2: Identify CPU bottleneck in inference
Prediction API servers (B) perform CPU/GPU-bound inference; scaling is limited by hardware and model complexity, causing first failure under 10x load.Final Answer:
Option D -> Option DQuick Check:
Inference servers hit CPU/GPU limits before storage or Kafka scale [check]
Hint: Inference servers hit CPU/GPU bottleneck before other components [OK]
Common Mistakes:
