SQS as the Demanding Service in Market

Amazon SQS logo

SQS stands for Simple Queue Service. It is the Managed Message Queue service provided by AWS cloud.

What is Message Queue?

What’s the need of this Message Queue?

Tightly coupled Programs

we don’t want that they would be tightly coupled to each other, because maybe the destination is not very much secured, hence we want a mediator.

A-B program connection through a Mediator

Here,

  1. A (Producer Program ) : The program that is producing the information.
  2. B(Consumer Program) : The program that is gonna access the data from the Message Queue.
  3. MQ (Middle ware) : The mediator program for the smooth and efficient communication of Source and Destination, is known as Middle ware.

With Middle ware setup, A and B would be decoupled. The throughput of Message queue is very high.

** SQS is the service by AWS that provide and manage Message Queue.

About SQS

  • A queue is a temporary repository for messages awaiting for processing and acts as a buffer between the component producer and the consumer
  • SQS is a message queue service used by distributed applications to exchange messages through a polling model, and can be used to decouple sending and receiving components.
  • These queue are fully managed and requires no administrative overhead and little configuration
  • They offers a reliable, highly-scalable, hosted queue for storing messages in transit between applications
  • provides fault tolerant, loosely coupled, flexibility of distributed components of applications to send & receive without requiring each component to be concurrently available
  • helps build distributed application with decoupled components
  • supports the HTTP over SSL (HTTPS) and Transport Layer Security (TLS) protocols for security
  • SQS provides two types of Queues — Standard & FIFO

How SQS Queues Works

  • SQS queue retains messages for four days, by default.
  • Queues can be configured to retain messages for 1 minute to 14 days after the message has been sent.
  • SQS can delete a queue without notification if any action hasn’t been performed on it for 30 consecutive days.
  • SQS allows the deletion of the queue with messages in it

Features in SQS for Message Availability

  1. Visibility Timeout : This is the timeout feature that create a setup within which if a (same/different) consumer program access the information then the next retrieval can be done only after 30 seconds(by default), we can also change this time.
  2. Dead Letter Queue(DLQ) : This is one of the feature of SQS, that throws the message queue data into some other queue(different from the main) after a certain number of information retrieval i.e., after 10 times(by default, can be changed as per the requirement).

Use of SQS by multiple companies

  • * Dark the color: More use of SQS
  • *Light the color: Less use of SQS
Graphical representation of how different places using SQS

This is how SQS service is used by multiple companies and getting benefited by the same.

SQS Use Cases

  1. Work Queues
  • Decouple components of a distributed application that may not all process the same amount of work simultaneously.

2. Buffer and Batch Operations

  • Add scalability and reliability to the architecture and smooth out temporary volume spikes without losing messages or increasing latency

3. Request Offloading

  • Move slow operations off of interactive request paths by enqueueing the request.

4. Fan-out

  • Combine SQS with SNS to send identical copies of a message to multiple queues in parallel for simultaneous processing.

5. Auto Scaling

  • SQS queues can be used to determine the load on an application, and combined with Auto Scaling, the EC2 instances can be scaled in or out, depending on the volume of traffic

Hope this detailed information about SQS may help you to find multiple SQS uses at different different places and different requirements.

Keep Learning, Keep Sharing!!✨

I am a tech enthusiast, researcher and work for integrations. I love to explore and learn about the new technologies and their right concepts from its core.