Practice
1. A web application needs to handle millions of concurrent users sending requests simultaneously. Which component is primarily responsible for managing client connections and distributing requests to backend services?
easy
Solution
Step 1: Identify the role of the load balancer
The load balancer manages client connections and distributes incoming requests evenly across backend servers to prevent overload.Step 2: Eliminate other components
The database server handles data storage but does not manage client connections; cache servers speed up data retrieval but don't handle connections; message queues buffer asynchronous tasks but don't manage live client connections.Final Answer:
Option B -> Option BQuick Check:
Load balancer routes client requests to backend servers [check]
Hint: Load balancer directs traffic, not stores or caches data [check]
Common Mistakes:
2. A payment system must ensure that duplicate payment requests from clients do not result in multiple charges. Which component is primarily responsible for handling idempotency in this scenario?
easy
Solution
Step 1: Identify idempotency enforcement point
The transaction processing service must track unique request IDs to prevent duplicate charges, as it controls payment execution.Step 2: Eliminate other options
The load balancer cannot reliably detect duplicates due to statelessness; the database unique constraints cannot cover all idempotency cases; client SDK retries are unreliable and cannot guarantee global idempotency.Final Answer:
Option D -> Option DQuick Check:
Transaction service stores request IDs -> prevents duplicate processing [check]
Hint: Idempotency enforced where payment logic executes [check]
Common Mistakes:
3. In a 45-minute system design answer, at step 4 you have identified key components and now start sketching data flow. What happens at this step in the component trace?
easy
Solution
Step 1: Trace the role of step 4 -- sketching data flow
This step validates how components interact and ensures data moves correctly, critical for system correctness.Step 2: Exclude premature or unrelated actions
Finalizing schema or coding before data flow understanding risks misalignment; choosing cloud providers is premature.Final Answer:
Option A -> Option AQuick Check:
Data flow mapping -> validates component interaction [check]
Hint: Map data flow before design details [check]
Common Mistakes:
4. A public API receives unpredictable bursts of traffic that can overwhelm backend services. Which component is best suited to protect the system from overload?
easy
Solution
Step 1: Identify the protection mechanism against traffic bursts
Distributed cache (A) improves response time but doesn't limit request rate; load balancer (C) distributes load but can't prevent overload from bursts; message queue (D) buffers but can be overwhelmed if bursts are too large.Step 2: Recognize rate limiter role
Rate limiter (B) enforces quotas per client, directly preventing backend overload by rejecting or delaying excess requests.Final Answer:
Option B -> Option BQuick Check:
Rate limiter enforces quotas to prevent overload [check]
Hint: Rate limiter controls request bursts to protect backend [check]
Common Mistakes:
5. If the health check module fails to run, what is the exact failure observed in the load balancer's routing behavior?
medium
Solution
Step 1: Understand health check module role
Health checks detect unhealthy servers; without them, no updates occur to remove bad servers.Step 2: Trace routing behavior without health checks
Load balancer routes to all servers indiscriminately, including unhealthy ones, causing client errors.Final Answer:
Option D -> Option DQuick Check:
No health checks -> no removal of unhealthy servers -> client errors [check]
Hint: No health checks means no unhealthy server removal [check]
Common Mistakes:
