Practice
Solution
Step 1: Identify buffering and durability needs
Redis (A) is fast but lacks durability guarantees; relational DB (C) cannot handle 1M writes/sec efficiently due to locking and transaction overhead; file system log (D) on a single server is a single point of failure and bottleneck.Step 2: Kafka's partitioned log with replication
Kafka (B) partitions data for parallelism, replicates for durability, and guarantees ordering within partitions, making it ideal for high-throughput durable buffering.Final Answer:
Option D -> Option DQuick Check:
Kafka partitions + replication -> high throughput + durability [check]
Solution
Step 1: Understand GSLB behavior at DNS query
GSLB does not blindly return IPs (Returns the IP of the closest data center without checking health status) or forward queries (Forwards the DNS query to the local data center's DNS server for resolution). It actively checks health and latency to pick the best endpoint.Step 2: Evaluate caching behavior
Indefinite caching (Caches the previous DNS response indefinitely to reduce load) would prevent dynamic failover and load balancing.Final Answer:
Option B -> Option BQuick Check:
GSLB checks health and latency before DNS response [check]
Solution
Step 1: Understand queue role in decoupling
The queue buffers submissions so downstream processing is asynchronous.Step 2: Trace failure impact
If queue crashes, submissions accepted by API but not delivered downstream, causing processing delays (C). Silent loss (A) is prevented by persistence; blocking API (B) contradicts decoupling; automatic failover (D) is ideal but not guaranteed.Final Answer:
Option D -> Option DQuick Check:
Queue crash -> accepted but undelivered applications -> delayed processing [check]
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]
Solution
Step 1: Analyze stateful connection scaling
WebSocket servers (D) hold state per connection; scaling requires complex connection migration or sticky sessions.Step 2: Compare other bottlenecks
Relational DB (A) can be sharded; transcoding (B) parallelizes; Feed Ranking (C) uses caching and sharding.Step 3: Identify first failure point
WebSocket servers hit connection limits first due to stateful nature and limited horizontal scaling.Final Answer:
Option A -> Option AQuick Check:
Stateful WebSocket servers bottleneck first due to connection affinity [check]
