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. If the Kafka cluster is unavailable, what exact failure occurs in the notification system's delivery path?
medium
Solution
Step 1: Trace failure impact of Kafka unavailability
Kafka unavailability blocks producers or causes retries; delivery workers cannot fetch messages from Kafka.Step 2: Evaluate fallback mechanisms
In a robust design, a backup queue or dead-letter queue is used to avoid message loss; synchronous HTTP fallback (D) is not automatic; silent loss (A) is unacceptable.Final Answer:
Option C -> Option CQuick Check:
Backup queue prevents message loss during Kafka downtime [check]
Hint: Backup queue prevents loss when Kafka is down [check]
Common Mistakes:
3. At 10x transaction volume, which component in the digital wallet system is most likely to become the first bottleneck, and why?
hard
Solution
Step 1: Analyze ledger database constraints
Ledger DB enforces strong consistency and atomic double-entry transactions, limiting sharding options.Step 2: Compare other components
Reconciliation (A) can be scaled asynchronously; API gateway (C) can be scaled with stateless design; Kafka (D) scales with partitioning but ledger DB consistency is harder to scale.Final Answer:
Option D -> Option DQuick Check:
Ledger DB consistency limits sharding -> first bottleneck [check]
Hint: Ledger DB consistency limits sharding -> first bottleneck [OK]
Common Mistakes:
4. At 10x scale, which component in the multi-tenant SaaS platform is most likely to fail first, and why?
hard
Solution
Step 1: Analyze scaling bottlenecks
Billing DB (A) can be scaled with sharding; Tenant Metadata (C) can be cached; API Gateway (D) handles stateless HTTP mostly.Step 2: Evaluate Feature Flag Service cache at scale
Cache invalidation and stale data grow exponentially, causing inconsistent feature exposure and client errors.Final Answer:
Option A -> Option AQuick Check:
Feature flag cache stale -> inconsistent behavior at scale [check]
Hint: Feature flag cache stale -> first scale failure [check]
Common Mistakes:
5. At 10x scale increase for a system using Redis as a cache in front of DynamoDB, which component is most likely to fail first and why?
hard
Solution
Step 1: Analyze Redis cache behavior under 10x load
Increased load causes Redis memory pressure, triggering eviction storms and latency spikes.Step 2: Compare Redis failure risk to DynamoDB and other components
DynamoDB scales well with partitioning; network and app servers scale horizontally; Redis memory is stateful and harder to scale quickly.Final Answer:
Option A -> Option AQuick Check:
Redis memory pressure -> eviction storms -> latency spikes first at scale [check]
Hint: Redis memory pressure -> eviction storms cause first failure at scale [check]
Common Mistakes:
