Practice
1. A blob storage system must handle millions of small object writes per second with low latency and guarantee durability. Which component is primarily responsible for decoupling the high write throughput from the slower disk persistence layer?
easy
Solution
Step 1: Identify the role of the distributed log
The distributed write-ahead log buffers incoming writes asynchronously, decoupling high write throughput from slower disk persistence.Step 2: Eliminate other options
Relational DBs synchronously block writes, CDN caches are read-optimized not write buffers, and a single master node creates a bottleneck.Final Answer:
Option D -> Option DQuick Check:
Distributed log buffers writes asynchronously for durability and throughput [check]
Hint: Distributed log buffers writes before disk persistence [check]
Common Mistakes:
2. In a chat system request flow, at Step 4 the Delivery Worker checks the recipient's online status cache. What happens if the cache entry is expired at this step?
easy
Solution
Step 1: Understand Delivery Worker role at Step 4
It checks recipient online status cache to decide delivery method.Step 2: Behavior on expired cache entry
Expired cache means unknown status; system falls back to persistent queue to ensure message is not lost.Final Answer:
Option A -> Option AQuick Check:
Expired cache triggers fallback to persistent queue [check]
Hint: Expired cache triggers fallback, not message drop or infinite retry [check]
Common Mistakes:
3. 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:
4. In a system where Step 4 is the Delivery Worker checking message delivery status, what happens if the Delivery Worker finds the recipient's presence TTL expired?
easy
Solution
Step 1: Trace Delivery Worker decision at Step 4 -- Bob's presence TTL
If TTL expired, recipient is offline; message can't be delivered immediately.Step 2: Understand offline delivery handling
Delivery Worker queues message for later delivery and marks status as 'sent but not delivered' to reflect state.Final Answer:
Option A -> Option AQuick Check:
Expired TTL -> queue message, status 'sent but not delivered' [check]
Hint: Expired TTL means offline, queue message for later delivery [check]
Common Mistakes:
5. For a global DNS service aiming to minimize latency for users worldwide, which architecture is more appropriate and why?
medium
Solution
Step 1: Analyze latency requirements and architecture options
A single centralized server creates latency for distant users and is a single point of failure. Peer-to-peer systems lack reliability and consistency guarantees. Recursive servers forwarding to root servers without caching cause excessive load and latency.Step 2: Identify benefits of distributed authoritative servers with Anycast
Geographically distributed authoritative servers with Anycast routing direct users to the nearest server, minimizing latency and improving availability.Final Answer:
Option C -> Option CQuick Check:
Distributed authoritative servers + Anycast reduce latency globally [check]
Hint: Anycast + distributed authoritative servers minimize global latency [check]
Common Mistakes:
