Practice
Solution
Step 1: Trace cache miss handling at Step 4
On a miss, the node does not return immediately; it attempts to find the key elsewhere.Step 2: Broadcast vs forwarding
Forwarding to next node breaks consistent hashing guarantees; fetching from backing store happens after confirming absence in cache cluster.Final Answer:
Option C -> Option CQuick Check:
Cache node broadcasts to find key before fallback [check]
Solution
Step 1: Identify decoupling need
High write rate (10,000/sec) requires asynchronous processing to avoid blocking user requests.Step 2: Evaluate components
Relational DB synchronous writes (A) block requests; Redis (B) lacks durability guarantees for event buffering; batch jobs (C) are too infrequent for real-time updates. Kafka (D) buffers events reliably and supports asynchronous consumption.Final Answer:
Option C -> Option CQuick Check:
Kafka buffers high write throughput asynchronously [check]
Solution
Step 1: Trace Cache Layer behavior on miss
On a cache miss, the Cache Layer must fetch data from the Database to serve the request.Step 2: Understand why other options fail
Returning null or placeholders breaks correctness; retrying cache reads wastes time without new data.Final Answer:
Option B -> Option BQuick Check:
Cache miss triggers DB fetch before responding [check]
Solution
Step 1: Compare modular hashing and consistent hashing
Modular hashing requires full remapping on node changes, causing high overhead.Step 2: Evaluate alternatives
Centralized directory adds latency and single point of failure; rendezvous hashing is good but less common and more complex than consistent hashing with virtual nodes.Final Answer:
Option C -> Option CQuick Check:
Consistent hashing with virtual nodes balances load and minimizes remapping [check]
Solution
Step 1: Identify stateful bottleneck in synchronous chat
Chat servers maintain WebSocket connections statefully, binding clients to specific servers.Step 2: Analyze scaling challenges
At 10x scale, resharding or migrating these stateful connections is complex, causing chat servers to fail first.Final Answer:
Option D -> Option DQuick Check:
Stateful WebSocket servers limit horizontal scaling, causing early failure [check]
