Practice
1. In the message delivery trace, at Step 4 the Delivery Worker checks the consumer offset stored in ZooKeeper before sending messages. What happens if the offset is missing at this step?
easy
Solution
Step 1: Understand consumer offset role
The offset tracks the last consumed message; if missing, the consumer has no progress marker.Step 2: Delivery Worker behavior on missing offset
Kafka semantics dictate resetting to earliest offset to avoid message loss; skipping (A) would lose messages; blocking (C) causes deadlock; deleting partition (D) is invalid.Final Answer:
Option A -> Option AQuick Check:
Missing offset -> reset to earliest offset to ensure delivery [check]
Hint: Missing offset resets to earliest message, never skips or blocks [check]
Common Mistakes:
2. A system must handle millions of short video uploads per day, ensuring fast ingestion and metadata extraction without blocking the user. Which component is best suited to decouple upload ingestion from processing?
easy
Solution
Step 1: Identify ingestion decoupling need
Relational DB (A) blocks user upload due to synchronous writes; CDN (C) caches for delivery, not ingestion; REST API (D) triggers blocking transcoding.Step 2: Choose buffering component
Kafka (B) buffers uploads asynchronously, enabling fast user response and reliable processing.Final Answer:
Option A -> Option AQuick Check:
Kafka buffers uploads asynchronously for scalable ingestion [check]
Hint: Buffer uploads asynchronously with Kafka queue [OK]
Common Mistakes:
3. If the TTL eviction mechanism is disabled in a cache system, what failure occurs when stale data remains in the cache?
medium
Solution
Step 1: Understand TTL role
TTL ensures entries expire after a fixed time to prevent stale data.Step 2: Trace failure without TTL
Without TTL, stale entries never expire, so clients may read outdated data indefinitely.Final Answer:
Option A -> Option AQuick Check:
Disabling TTL causes stale data to persist indefinitely [check]
Hint: No TTL means stale data never expires, causing outdated reads [OK]
Common Mistakes:
4. Without the automated rollback system, what exactly breaks when a misconfiguration causes a route leak?
medium
Solution
Step 1: Trace failure without rollback
Misconfigurations propagate incorrect routes; without rollback, manual detection delays fix.Step 2: Eliminate other failure modes
Silent drops (A) don't occur; automatic quarantine (C) would cause total outage, not typical; alert floods (D) don't prevent traffic misrouting.Final Answer:
Option D -> Option DQuick Check:
Manual fix delays cause prolonged incorrect routing [check]
Hint: No rollback means manual fix delays outages [check]
Common Mistakes:
5. At 10x scale, which component in a distributed lock system using ZooKeeper is most likely to fail first and why?
hard
Solution
Step 1: Identify ZooKeeper leader role
The leader handles all write requests and session heartbeats, becoming a bottleneck under high scale.Step 2: Evaluate other components
Clients (A) can be scaled horizontally; network routers (C) are less likely the first bottleneck; ephemeral nodes (D) are lightweight and cleaned up automatically.Final Answer:
Option A -> Option AQuick Check:
Leader bottleneck due to write and session overhead [check]
Hint: ZooKeeper leader handles all writes -> first bottleneck [check]
Common Mistakes:
