Practice
Solution
Step 1: Trace Delivery Worker decision at Step 4 -- message visibility timeout
If the message is not acknowledged within the visibility timeout, it becomes visible again for redelivery to ensure no message loss.Step 2: Eliminate incorrect options
Immediate deletion (A) risks message loss; archiving without retry (C) breaks availability; blocking (D) reduces throughput and availability.Final Answer:
Option C -> Option CQuick Check:
Visibility timeout expiry -> message re-queued for retry [check]
Solution
Step 1: Compare update and query costs
Quadtree (Use a Quadtree because it supports fast insertions and deletions with balanced trees) can become unbalanced and expensive to update frequently. R-tree (Use a full R-tree index because it guarantees minimal overlap and tight bounding rectangles) is complex and costly to maintain with frequent writes.Step 2: Evaluate Geohash benefits
Geohash (Use Geohash-based indexing because it supports efficient prefix queries and simpler updates) encodes locations into fixed-length strings allowing efficient prefix queries and simpler incremental updates, ideal for low-latency and frequent writes.Final Answer:
Option A -> Option AQuick Check:
Geohash supports efficient prefix queries and simpler updates [check]
Solution
Step 1: Analyze bandwidth and latency constraints
Mobile apps benefit from minimizing data transfer and round-trips due to limited bandwidth and latency.Step 2: Compare REST and GraphQL trade-offs
REST multiple endpoints cause multiple round-trips; single endpoint REST over-fetches; GraphQL queries exactly needed fields in one request.Final Answer:
Option D -> Option DQuick Check:
GraphQL reduces over-fetching and round-trips for mobile [check]
Solution
Step 1: Evaluate centralized Redis token bucket
Strong consistency causes high latency and bottlenecks under burst traffic.Step 2: Evaluate local token buckets with periodic sync
Allows burst handling locally with eventual consistency, reducing latency and bottlenecks.Step 3: Eliminate fixed window and leaky bucket options
Fixed window counters cause burst spikes; leaky bucket disallows bursts and lacks sync.Final Answer:
Option A -> Option AQuick Check:
Local token buckets + eventual sync balance burst and consistency [check]
Solution
Step 1: Identify scale bottlenecks
At 10x scale, write throughput and storage I/O become critical constraints for ingestion pipelines.Step 2: Compare component scalability
Anomaly detection can be scaled horizontally; composite alerting state grows but less than ingestion I/O; threshold checks are lightweight.Final Answer:
Option B -> Option BQuick Check:
Ingestion pipeline limited by write throughput and storage I/O [check]
