Practice
1. A critical database cluster must failover automatically without data loss or downtime during a primary node crash. Which component is responsible for orchestrating this failover in a distributed SQL database system?
easy
Solution
Step 1: Identify failover orchestration component
The consensus protocol like Raft manages leader election and ensures log replication consistency, enabling automatic failover without data loss.Step 2: Eliminate other options
Client-side retries (A) handle reconnection but don't orchestrate failover; load balancers (B) redirect traffic but don't manage state; backups (D) aid recovery but not live failover.Final Answer:
Option A -> Option AQuick Check:
Consensus protocol controls leader election and failover [check]
Hint: Consensus protocols manage failover, not clients or load balancers
Common Mistakes:
2. If the PageRank computation component fails during an update cycle, what is the immediate impact on search result ranking and user experience?
medium
Solution
Step 1: Understand PageRank failure impact
Without updated PageRank, the system cannot assign fresh relevance scores, causing degraded or random ordering.Step 2: Evaluate other impacts
Search remains available (not A). Last snapshot is not used if update fails mid-cycle (not B). Indexing continues independently (not D).Final Answer:
Option B -> Option BQuick Check:
PageRank failure causes degraded ranking, not outage [check]
Hint: PageRank failure -> degraded ranking, not outage [check]
Common Mistakes:
3. For a distributed cache with frequent node additions and removals, which approach best balances load and minimizes key remapping?
medium
Solution
Step 1: Compare consistent hashing and rendezvous hashing
Both minimize remapping, but consistent hashing with virtual nodes better smooths load across nodes, especially with frequent changes.Step 2: Evaluate centralized directory and modulo hashing
Centralized directory adds latency and single point of failure; modulo hashing causes massive remapping and manual rebalancing overhead.Final Answer:
Option C -> Option CQuick Check:
Virtual nodes in consistent hashing smooth load and minimize remapping [check]
Hint: Virtual nodes smooth load in consistent hashing [check]
Common Mistakes:
4. A team must decide between using a detailed blame-focused report or a blameless timeline with action items for their post-mortem. Which approach is best for fostering continuous improvement in a high-trust engineering culture?
medium
Solution
Step 1: Evaluate cultural impact of blame vs blameless approaches
Blame-focused reports create fear and reduce openness, harming continuous improvement.Step 2: Assess effectiveness of blameless timelines with action items
They foster trust, encourage learning, and drive actionable improvements aligned with high-trust culture.Final Answer:
Option A -> Option AQuick Check:
Blameless + action items -> continuous improvement [check]
Hint: Blameless + action items build trust and improve systems [check]
Common Mistakes:
5. You need to design a distributed configuration system that supports dynamic updates with strong consistency guarantees. Which approach is best suited for this scenario?
medium
Solution
Step 1: Identify consistency and update requirements
Strong consistency and immediate update notification are required.Step 2: Evaluate options
Distributed cache with eventual consistency delays updates; relational DB polling adds latency; message queue is asynchronous without state storage.Final Answer:
Option A -> Option AQuick Check:
Zookeeper watches -> immediate, consistent config updates [check]
Hint: Watches + strong consistency -> Zookeeper for config updates [check]
Common Mistakes:
