Practice
Solution
Step 1: Identify ingestion requirements
High throughput and low latency ingestion require a scalable, partitioned system that can handle parallel writes.Step 2: Evaluate components
Relational DBs (A) can't handle this write volume with low latency; single-threaded queues (C) limit throughput; batch systems (D) increase latency.Final Answer:
Option C -> Option CQuick Check:
Kafka partitions enable parallel ingestion with low latency [check]
Solution
Step 1: Trace Request Handler token check at Step 4
If the token bucket is empty, no tokens are available to allow immediate processing.Step 2: Determine request fate
The request must be rejected or delayed until tokens refill; processing without tokens violates rate limits.Final Answer:
Option C -> Option CQuick Check:
Empty bucket -> reject or delay request [check]
Solution
Step 1: Understand Zookeeper ephemeral node disappearance
Leader's ephemeral node disappearance signals leader failure.Step 2: Follower reaction
Follower tries to create ephemeral node to become new leader; immediate assumption without coordination risks split-brain.Final Answer:
Option A -> Option AQuick Check:
Follower creates ephemeral node -> attempts leadership [check]
Solution
Step 1: Role of Kafka in delivery pipeline
Kafka buffers tweets asynchronously for fan-out; unavailability stops new fan-out events.Step 2: Trace failure impact
Tweets still persist in DB, but without Kafka, timeline caches don't get updated, causing stale timelines.Step 3: Eliminate other options
Immediate loss (A) is prevented by DB persistence; ingestion blocking (B) unlikely as writes decouple; synchronous RPC fallback (D) not implemented.Final Answer:
Option A -> Option AQuick Check:
Kafka outage stalls fan-out, causing stale timeline caches [check]
Solution
Step 1: Identify stateful session management bottleneck
Stateful sessions bind users to servers, preventing easy horizontal scaling and causing failure under 10x load.Step 2: Exclude other components that scale better or have mitigation
Databases can shard; load balancers scale horizontally; caches can be invalidated or refreshed.Final Answer:
Option D -> Option DQuick Check:
Stateful sessions limit scaling -> first failure point [check]
