Practice
1. A system requires 99.99% availability for a critical service that must tolerate a single data center failure without downtime. Which component is most appropriate to achieve this?
easy
Solution
Step 1: Understand availability target and failure domain
99.99% availability requires tolerating entire data center failure without downtime, which single-region setups cannot guarantee.Step 2: Evaluate options for multi-region failover
Active-active multi-region clusters with automatic failover provide seamless continuity, unlike local caches or single-region redundancy.Final Answer:
Option A -> Option AQuick Check:
Multi-region active-active clusters -> tolerate data center failure [check]
Hint: Multi-region active-active -> survive data center failure [check]
Common Mistakes:
2. In the request flow for a nearby search, at step 4 the Quadtree component receives a query bounding box. What does the Quadtree do at this step?
easy
Solution
Step 1: Understand Quadtree traversal
At step 4, the Quadtree recursively visits nodes overlapping the bounding box to efficiently narrow down candidate locations.Step 2: Eliminate other options
It returns all businesses within the bounding box without further filtering is incorrect because Quadtree does filtering, not a full scan. It converts the bounding box into Geohash prefixes and queries a key-value store describes Geohash usage, not Quadtree. It sends the bounding box to a full-text search engine for keyword filtering is unrelated to spatial indexing.Final Answer:
Option C -> Option CQuick Check:
Quadtree recursively traverses nodes intersecting query box [check]
Hint: Quadtree recursively visits nodes overlapping query bounding box [OK]
Common Mistakes:
3. Without a distributed consensus system (like Paxos or Raft) coordinating leader election, what exactly breaks in a system designed for 99.999% availability?
medium
Solution
Step 1: Role of distributed consensus in leader election
Consensus protocols ensure exactly one leader at a time, preventing split-brain scenarios.Step 2: Consequences of missing consensus
Without consensus, multiple nodes may act as leader simultaneously, causing conflicting writes and data corruption, breaking availability guarantees.Final Answer:
Option B -> Option BQuick Check:
No consensus -> split-brain -> conflicting writes -> data corruption [check]
Hint: No consensus -> split-brain -> conflicting writes break availability [check]
Common Mistakes:
4. If the Kafka topic used for driver location updates is deleted accidentally, what is the immediate failure observed in the system?
medium
Solution
Step 1: Understand Kafka topic role
Kafka topic buffers and streams driver location updates to downstream services.Step 2: Trace failure impact
Deleting the topic causes producer writes to fail silently or drop messages; no automatic backup switch; driver apps continue sending but updates are lost; matching service receives stale data but does not block.Final Answer:
Option A -> Option AQuick Check:
Kafka topic deletion causes permanent loss of location updates [check]
Hint: No Kafka topic means lost updates, no automatic failover [check]
Common Mistakes:
5. At 10x scale, which component in a saga-based event-driven system is most likely to fail first due to stateful bottlenecks, and why?
hard
Solution
Step 1: Identify stateful bottleneck
The saga coordinator holds per-saga state in memory, limiting horizontal scaling and sharding.Step 2: Compare other components
Message brokers scale with partitions; DB scales with sharding; relay is stateless and network-bound.Final Answer:
Option A -> Option AQuick Check:
Saga coordinator's in-memory state limits scaling first [check]
Hint: Stateful saga coordinator limits scaling before stateless components [check]
Common Mistakes:
