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: Identify data structure for sorted order and fast updates
Redis Sorted Sets provide O(log N) insertion and rank queries with in-memory speed, ideal for real-time leaderboards.Step 2: Eliminate other options based on latency and ordering
Relational DBs have higher write latency and complex locking; Kafka stores events but doesn't maintain sorted order; MongoDB lacks efficient sorted queries at scale.Final Answer:
Option D -> Option DQuick Check:
Redis Sorted Sets maintain sorted scores with low latency [check]
Solution
Step 1: Analyze protocol support requirements
Supporting both REST and gRPC clients in one gateway reduces operational complexity and centralizes transformation logic.Step 2: Evaluate alternatives
Use separate API Gateways for REST and gRPC, each optimized for its protocol increases deployment and maintenance overhead. Use REST-only API Gateway and require gRPC clients to use a proxy converting gRPC to REST adds latency and complexity on client side. Use gRPC-only API Gateway and require REST clients to upgrade to gRPC is impractical as REST clients are widespread.Final Answer:
Option D -> Option DQuick Check:
Single gateway with protocol translation balances support and complexity [check]
Solution
Step 1: Understand average latency limitations
Average latency can be skewed by many fast requests and hide slow request impact, thus missing user experience degradation.Step 2: Why P95 latency is better
P95 latency captures the slowest 5% of requests, which often cause user frustration and indicate performance issues under load.Final Answer:
Option A -> Option AQuick Check:
P95 latency reveals slow requests impacting users better than average [check]
Solution
Step 1: Analyze access and cost requirements
Data is infrequently accessed but needs retrieval within hours, so cold storage alone is too slow.Step 2: Evaluate tiering benefits
Warm storage offers moderate cost and latency; cold storage reduces cost further. Tiering balances cost and retrieval time.Final Answer:
Option A -> Option AQuick Check:
Warm + cold tiering balances cost and retrieval latency [check]
