Practice
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]
Solution
Step 1: Trace Matching Service behavior at step 4
Matching Service queries Surge Pricing Service for multiplier to calculate fare.Step 2: Understand stale data impact
If surge multiplier is stale due to cache lag, Matching Service proceeds with returned value, causing temporary fare mispricing but no blocking or retries.Final Answer:
Option D -> Option DQuick Check:
Matching Service tolerates stale surge multiplier for availability [check]
Solution
Step 1: Understand offset commit role
Offset commit tracks consumer progress; missing commit means consumer hasn't acknowledged message yet.Step 2: Delivery Worker behavior
Delivery Worker must deliver the message and rely on consumer to commit offset asynchronously; skipping (A) or deleting (D) would cause message loss; retrying (C) is unnecessary as delivery is decoupled.Final Answer:
Option B -> Option BQuick Check:
Delivery Worker delivers message, offset commit is consumer's responsibility [check]
Solution
Step 1: Analyze consistency and throughput requirements
Strong consistency with high throughput and fault tolerance requires decoupling writes and reads with durable event logs.Step 2: Evaluate architectures
Centralized DB (A) limits throughput and is a single point of failure; NoSQL eventual consistency (C) violates strong consistency; synchronous REST calls (D) increase latency and reduce fault tolerance. Event sourcing with Kafka (B) provides durable, ordered events and scalable materialized views.Final Answer:
Option A -> Option AQuick Check:
Event sourcing with Kafka -> strong consistency and scalability [check]
Solution
Step 1: Identify Layer 7 load balancer workload at scale
Layer 7 load balancers perform CPU-intensive tasks like HTTP header parsing and SSL termination, which scale poorly with traffic.Step 2: Compare with other components
Backend servers can be scaled horizontally; network switches handle packet forwarding efficiently; DNS servers are less impacted by traffic volume.Final Answer:
Option A -> Option AQuick Check:
Layer 7 LB CPU bottleneck due to HTTP parsing and SSL termination [check]
