Practice
Solution
Step 1: Identify the role of the local DNS resolver
The local DNS resolver (stub resolver) on the user's machine caches recent DNS lookups to avoid repeated network queries for the same domain within a short time.Step 2: Eliminate other options
Authoritative DNS servers provide domain data but do not cache queries for clients. Root servers do not cache all mappings globally and are rarely queried directly. Recursive DNS servers do cache results to improve performance, so The recursive DNS server, which never caches results and always queries authoritative servers is incorrect.Final Answer:
Option B -> Option BQuick Check:
Local resolver caches to reduce network calls [check]
Solution
Step 1: Identify component that reflects real-time incoming traffic
Load balancer metrics provide immediate, accurate QPS data as they handle all incoming requests before backend processing.Step 2: Eliminate other options
Relational DB counting is too slow and adds overhead; client logs are delayed and incomplete; CDN metrics reflect cached content, not all requests.Final Answer:
Option A -> Option AQuick Check:
Load balancer metrics reflect real-time QPS accurately [check]
Solution
Step 1: Understand ephemeral node semantics
Ephemeral nodes in ZooKeeper are automatically deleted when the client session ends (e.g., crash), preventing deadlocks (A) and stale locks.Step 2: Trace lock ownership after crash
Since the ephemeral node is deleted, the next client waiting for the lock will be notified, but the lock is not immediately transferred (D) until they acquire it explicitly.Final Answer:
Option A -> Option AQuick Check:
Ephemeral node deletion on client crash -> lock released [check]
Solution
Step 1: Understand shard-level cache role
The cache reduces load on shard nodes by serving frequent queries quickly, preventing overload during spikes.Step 2: Trace failure without cache
Without cache, all queries hit shard nodes directly, causing CPU and I/O overload, increasing latency and timeouts.Final Answer:
Option B -> Option BQuick Check:
Cache absence -> shard overload -> latency spikes [check]
Solution
Step 1: Evaluate client connectivity constraints
Mobile clients have intermittent connectivity; gRPC streaming (A) requires persistent connections, which mobile networks may not support well. HTTP long polling (D) causes overhead and latency.Step 2: Compare WebSocket with server buffering vs polling
WebSocket with server-side buffering and reconnection (C) balances low latency and fault tolerance better than client polling (B), which increases latency and load.Final Answer:
Option C -> Option CQuick Check:
WebSocket + buffering + reconnection -> best for intermittent mobile [check]
