Practice
Solution
Step 1: Trace Database Proxy behavior at Step 4
Upon detecting primary failure, the proxy marks it unavailable and waits for leader election to complete before routing queries to the new leader.Step 2: Eliminate other options
Forwarding immediately to old primary (A) causes timeouts; queuing indefinitely (C) stalls clients; returning errors without retry (B) reduces availability.Final Answer:
Option A -> Option AQuick Check:
Proxy reroutes queries only after leader election [check]
Solution
Step 1: Understand Write-Behind failure impact
Buffered writes are not yet persisted; if cache crashes, writes are lost.Step 2: Analyze system behavior
Database does not block writes; writes are lost, causing inconsistency. Automatic retries require explicit mechanisms.Final Answer:
Option D -> Option DQuick Check:
Write-Behind crash causes lost buffered writes, no DB blocking [check]
Solution
Step 1: Analyze latency and consistency needs
Real-time games require fast access to player state with strong consistency.Step 2: Evaluate architecture trade-offs
Stateful servers with in-memory state reduce latency and allow immediate state updates; periodic persistence balances durability.Final Answer:
Option D -> Option DQuick Check:
Stateful in-memory state + persistence -> low latency, consistent [check]
Solution
Step 1: Identify bottleneck under high concurrency
Lock manager handles concurrency control; at 10x load, lock contention increases exponentially.Step 2: Compare other components
Query optimizer scales well with caching; storage and network scale with hardware upgrades; lock manager contention is harder to mitigate.Final Answer:
Option C -> Option CQuick Check:
Lock manager contention -> first bottleneck at high transaction scale [check]
Solution
Step 1: Understand Bloom filter scaling behavior
Bloom filter false positive rate increases with scale unless filter size grows proportionally, causing more backend queries.Step 2: Analyze component failure likelihood
Backend (A) fails eventually but Bloom filter inefficiency causes overload first. Network (C) and cache (D) are bottlenecks but secondary to Bloom filter false positive explosion.Final Answer:
Option C -> Option CQuick Check:
Bloom filter false positives grow with scale, triggering backend overload first [check]
