Amazon Simple Queue Service (SQS) and its Use cases

Samriddhi Mishra
3 min readMay 22, 2021

Queues are a powerful way of combining software architectures. They allow for asynchronous communication between different systems and are especially useful when the throughput of the systems is unequal.

For example, if you have something like:

  • System A — produces messages periodically in huge bursts
  • System B — consumes messages constantly, at a slower pace

With this architecture, a queue would allow System A to produce messages as fast as it can, and System B to slowly digest the messages at its own pace.

What is SQS?

Amazon Simple Queue Service (SQS) is a managed message queue service offered by Amazon Web Services (AWS). It provides an HTTP API over which applications can submit items into and read items out of a queue. The queue itself is fully managed by AWS, which makes SQS an easy solution for passing messages between different parts of software systems that run in the cloud.

SQS It is used to decouple various components of the application. To understand in simple terms, it is like buffered storage in between various software components.

Consider a sender component ‘A’ and receiver component ‘B’. Now A is sending messages to B at a higher rate than the rate receiver B can process. This creates a serious problem of losing messages in transit.

To prevent messages from getting lost, an SQS queue can be introduced to act as a buffer to prevent the loss of messages. The messages are stored in the queue in transit and then delivered to the receiver.

This is one of the use-cases for SQS, other use cases can be decoupling the application, asynchronous processing, etc.

Key Features of AWS SQS

Some of its features are:

  • Automatic scaling — if your volume grows you never have to give a thought to your queuing architecture. AWS takes care of it under the covers.
  • Infinite scaling — while there probably is some sort of theoretical limit here (how many atoms are in the universe?), AWS claims to support any level of traffic.
  • Server-side encryption — using AWS SSE (Server Side Encryption), messages can remain secure throughout their lifetime on the queues.

--

--