An order-processing system has a web tier that writes orders directly to a backend service. During sales events, the backend becomes overloaded and orders are lost. The company wants to decouple the tiers so that no orders are lost and the backend can process them at its own pace. What should the solutions architect do?
- A.
Store orders in Amazon ElastiCache and have the backend read them.
- B.
Place an Amazon SQS queue between the web tier and the backend, and have the backend poll the queue.
- C.
Use Amazon SNS to push each order to the backend over HTTP.
- D.
Increase the instance size of the backend service.
Show answer and explanation
Answer: B
An SQS queue buffers orders durably, and the backend consumes them at its own rate. Orders wait in the queue instead of being dropped during spikes.
- Bigger instances (D) still have a ceiling.
- SNS (C) pushes immediately, so an overloaded HTTP endpoint still fails.
- A cache (A) isn't a durable work queue.