CLF-C02 Practice Question 29: Decoupling with Queues
AWS Certified Cloud Practitioner (CLF-C02) · Test 3 · question 9 of 10
During flash sales, an online store's web tier sends orders directly to its order-processing servers faster than they can handle them, and some orders are lost. The company wants each order held durably until a processing server is ready to work on it, so that the web tier and the processing tier can scale independently. Which AWS service should sit between them?
Show answer and explanation
Answer:
Amazon SQS is a secure, durable, and available hosted queue for integrating and decoupling distributed software components. Producers (the web tier) send messages to the queue, SQS stores them redundantly across multiple servers, and consumers (the processing servers) receive and delete messages when they are ready. A burst of orders simply builds up in the queue instead of overwhelming, or being dropped by, the processing tier.
Option A, Amazon SNS, is publish/subscribe messaging that pushes each message to its subscribers immediately; it does not hold messages in a queue for a consumer to pull later, which is why AWS recommends pairing SNS with SQS to prevent message loss when subscribers are offline. Option B, Elastic Load Balancing, spreads incoming requests across healthy targets, but it passes requests straight through and does not store them when every target is busy. Option C, Amazon ElastiCache, is an in-memory cache for speeding up reads of frequently used data, not a message queue for work waiting to be processed.
Reference: What is Amazon Simple Queue Service?