AWS Notes
Simple Queue Service (SQS)
- Last updated
- Reading time
- 1 min read
Overview
SQS is a service to host queues that store messages that can then be retrieved by services or applications using a polling model. This is meant to decouple the components that send the message from those that receive like how a cashier will take orders, store them on an order's screen, and finally will be prepared by the cook. The cashier and cook are decoupled in this model because the cashier doesn't need to wait on the cook to finish the current ticket before putting in another customer's.
Types of Polling
Short Polling
- Requests available messages and is immediately returned whether empty or not.
Long Polling
- Reduces the number of empty responses by having a wait time. Whenever there are no messages, the response will be delayed up to the wait time limit in case new messages appear. If a message already exists when the request is received, then it is returned immediately.