Practice
1. In the request flow, at Step 4 the Delivery Worker checks the message queue's visibility timeout before processing. What happens if the visibility timeout expires before the message is acknowledged?
easy
Solution
Step 1: Understand visibility timeout semantics
Visibility timeout hides the message during processing; if not acknowledged, it reappears for redelivery.Step 2: Analyze options
Immediate deletion (A) risks data loss; archiving without retry (C) prevents recovery; dead-letter queue (D) is for failed retries, not timeout expiry.Final Answer:
Option D -> Option DQuick Check:
Visibility timeout expiry -> message reappears for retry [check]
Hint: Visibility timeout expiry -> message requeued for retry [check]
Common Mistakes:
2. You need to handle 1 million product updates per minute in the catalog without blocking user searches. Which component best handles this high write throughput while ensuring eventual consistency?
easy
Solution
Step 1: Identify write throughput handling
Relational DBs (A) and synchronous NoSQL writes (C) block on writes, limiting throughput. Redis (D) lacks durability guarantees for primary storage.Step 2: Recognize Kafka's role
Kafka buffers high write volume asynchronously, decoupling writes from reads and enabling eventual consistency.Final Answer:
Option A -> Option AQuick Check:
Kafka buffers writes asynchronously -> high throughput, eventual consistency [check]
Hint: Buffer writes asynchronously with Kafka for high throughput [check]
Common Mistakes:
3. A messaging system must handle 1 million writes per second and fan-out delivery to thousands of consumers without blocking producers. Which component is primarily responsible for decoupling producers from consumers to achieve this?
easy
Solution
Step 1: Identify the decoupling mechanism
Relational DBs with WAL (Use a relational database with write-ahead logging to buffer messages) are durable but cannot handle 1M writes/sec with fan-out efficiently; Redis (Use a centralized in-memory cache like Redis to store messages temporarily) is fast but lacks durability and persistence guarantees at this scale; direct HTTP calls (Use direct synchronous HTTP calls from producers to consumers) block producers and do not decouple.Step 2: Recognize distributed brokers' role
Distributed message brokers with partitioned logs (Use a distributed message broker with partitioned logs and asynchronous consumers) allow asynchronous writes and reads, decoupling producers and consumers, enabling high throughput and scalable fan-out.Final Answer:
Option D -> Option DQuick Check:
Partitioned broker logs decouple producers and consumers for high throughput [check]
Hint: Partitioned brokers decouple producers and consumers [check]
Common Mistakes:
4. If the Feature Store's update stream (e.g., Kafka) fails, what exactly breaks in the search ranking system?
medium
Solution
Step 1: Trace failure impact of update stream loss
The update stream failure stops feature updates but does not block reads or cause permanent data loss.Step 2: Identify component relying on update stream
A/B testing routing depends on fresh feature updates to decide traffic splits; without updates, routing falls back to control model only.Final Answer:
Option C -> Option CQuick Check:
Update stream failure -> A/B routing fallback to control model [check]
Hint: Update stream failure -> A/B routing falls back, not feature reads [check]
Common Mistakes:
5. At 10x scale, which component in the webhook delivery system is most likely to fail first and why?
hard
Solution
Step 1: Identify stateful bottleneck at scale
Delivery Workers hold stateful connections (e.g., HTTP keep-alive) per subscriber, limiting resharding and horizontal scaling.Step 2: Compare other components
Databases can be sharded; load balancers scale horizontally; retry queues are usually distributed and scalable.Final Answer:
Option C -> Option CQuick Check:
Stateful Delivery Workers -> scaling bottleneck [check]
Hint: Stateful workers block scaling first [check]
Common Mistakes:
