Practice
1. A global e-commerce platform wants to route users to the nearest data center to reduce latency. Which component primarily handles this geographic traffic distribution?
easy
Solution
Step 1: Identify GeoDNS role
GeoDNS resolves DNS queries differently based on the client's geographic location, enabling routing to the nearest data center.Step 2: Eliminate other options
A centralized load balancer (A) is a single point and doesn't handle geo-based DNS resolution. CDN (C) caches content but doesn't route DNS queries. Application-level proxy (D) routes after DNS resolution, not at DNS level.Final Answer:
Option A -> Option AQuick Check:
GeoDNS routes based on client location via DNS resolution [check]
Hint: GeoDNS routes users by location at DNS level [check]
Common Mistakes:
2. In a load balancer using Weighted Round Robin, at step 5 the balancer receives a new request. The current server weights are: Server A=5, Server B=3, Server C=2. Which server does the balancer select next?
easy
Solution
Step 1: Understand Weighted Round Robin operation
Weighted Round Robin cycles through servers, selecting each server multiple times proportional to its weight before moving to the next.Step 2: Apply weights to selection
Server A with weight 5 will be selected more frequently than B or C. At step 5, the balancer continues cycling respecting weights.Final Answer:
Option A -> Option AQuick Check:
Weighted Round Robin respects weights in cycling, not just highest weight always [check]
Hint: Weighted Round Robin cycles servers proportional to weights, not just highest weight [check]
Common Mistakes:
3. If the Metadata Server crashes before acknowledging a file rename operation, what is the most likely failure observed by the client?
medium
Solution
Step 1: Understand rename operation atomicity
Rename involves updating metadata entries; if crash occurs mid-update, partial state may persist.Step 2: Trace failure effect
Partial metadata update can cause both old and new filenames to appear, confusing clients.Final Answer:
Option D -> Option DQuick Check:
Partial metadata updates cause duplicate filenames visible to client [check]
Hint: Partial metadata update causes duplicate filenames visible [check]
Common Mistakes:
4. If the health check component is removed from a load balancer using Least Connections, what failure occurs?
medium
Solution
Step 1: Role of health checks in Least Connections
Health checks detect server availability; without them, the balancer cannot exclude unhealthy servers.Step 2: Behavior without health checks
Least Connections relies on accurate connection counts and server health; without health checks, it cannot trust connection data and typically falls back to Round Robin.Final Answer:
Option B -> Option BQuick Check:
Without health checks, Least Connections falls back to Round Robin losing load awareness [check]
Hint: No health checks -> Least Connections falls back to Round Robin [check]
Common Mistakes:
5. If the prefix hash map component fails and becomes unavailable, what is the immediate impact on the autocomplete system's behavior?
medium
Solution
Step 1: Understand component roles
The prefix hash map is an optimization for O(1) prefix lookups, but the Trie is the primary data structure for prefix matching.Step 2: Trace failure impact
If the prefix hash map fails, the system falls back to the Trie for prefix queries, which still works but may have slightly higher latency.Final Answer:
Option B -> Option BQuick Check:
Trie fallback ensures prefix queries continue despite prefix hash map failure [check]
Hint: Trie fallback keeps prefix search alive if prefix hash fails [check]
Common Mistakes:
