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: Understand Cache Aside flow
On cache miss, application queries DB and updates cache explicitly.Step 2: Eliminate other options
Cache Aside does not auto-load cache (A); it does not return null or stale data (C, D).Final Answer:
Option A -> Option AQuick Check:
Application loads DB and updates cache on miss [check]
Solution
Step 1: Trace Expiration Worker behavior at Step 4
The worker deletes expired snippets in batches; deletion is not instantaneous upon TTL expiry.Step 2: Understand user access during deletion
Until deletion completes, the snippet remains accessible; no locking or blocking occurs.Final Answer:
Option B -> Option BQuick Check:
Batch deletion delays snippet removal, keeping it accessible briefly [check]
Solution
Step 1: Identify the protection mechanism against traffic bursts
Distributed cache (A) improves response time but doesn't limit request rate; load balancer (C) distributes load but can't prevent overload from bursts; message queue (D) buffers but can be overwhelmed if bursts are too large.Step 2: Recognize rate limiter role
Rate limiter (B) enforces quotas per client, directly preventing backend overload by rejecting or delaying excess requests.Final Answer:
Option B -> Option BQuick Check:
Rate limiter enforces quotas to prevent overload [check]
Solution
Step 1: Trace impact of missing constraints
Without constraints, design choices conflict and trade-offs are unclear, leading to incomplete or inconsistent design.Step 2: Exclude unrealistic outcomes
Automatic scaling or perfect design without iteration is unrealistic; architecture does not default automatically.Final Answer:
Option B -> Option BQuick Check:
Missing constraints -> conflicting design decisions [check]
