Practice
Solution
Step 1: Identify failure isolation mechanism
Asynchronous message queues decouple services, buffering requests and preventing direct cascading failures during outages.Step 2: Evaluate alternatives
Synchronous REST calls (A) cause blocking and cascading failures; monolithic DB (C) is a single point of failure; direct TCP (D) lacks buffering and backpressure.Final Answer:
Option C -> Option CQuick Check:
Async queues buffer and isolate failures, limiting blast radius [check]
Solution
Step 1: Identify storage needs for diffs
Storing diffs efficiently requires deduplication and immutability; content-addressable storage (CAS) stores objects by their hash, enabling reuse of identical content and saving space.Step 2: Evaluate other options
Relational DB with BLOBs stores full versions, wasting space; Redis is volatile and not durable for persistent storage; file system copies waste space and slow for merges.Final Answer:
Option C -> Option CQuick Check:
CAS stores objects by hash -> deduplication and fast retrieval [check]
Solution
Step 1: Understand Feed Aggregator's role at Step 5
The Feed Aggregator must combine posts from multiple sources, remove duplicates, and rank them to personalize the feed.Step 2: Eliminate incorrect options
It immediately returns the raw posts without filtering or ranking skips ranking, leading to poor UX. It stores all posts in a persistent database before responding to the user delays response unnecessarily. It sends posts to the notification service to alert the user before aggregation misplaces notification logic before feed aggregation.Final Answer:
Option A -> Option AQuick Check:
Feed Aggregator merges and ranks posts -> personalized feed [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: Identify role of event queue
The event queue asynchronously propagates updates to read replicas.Step 2: Trace failure impact
If the queue fails, read replicas stop receiving updates and serve stale data indefinitely.Final Answer:
Option B -> Option BQuick Check:
Queue failure causes stale reads, no automatic failover [check]
