AWS SQS (simple queue service)

Pratikkorgaonkar
3 min readMar 10, 2021

Hello guys , I’m back again with another article with another technology. Today I’m sharing information and use cases about AWS SQS.Aws is cloud service provided by Amazon. AWS provides lots of different different services from different categories among this SQS is one of the service.SQS means Simple Queue Service . It is message queuing service by AWS . It makes easy to decouple and scale microservices , distributed system , and serverless applications. Amazon helps you to transfer data between two different application / part of application components by decoupling them.

Architecture of SQS

In simple term SQS provides service to connect two application components with message queue. Message queue is used to store message and send to user.

Above picture is best and easiest example to explain how SQS service works.

Picture 1

Component 1 sends message “A” to component 2. But before it reach component 2 it goes into SQS servers.Now that data is stored in SQS server(e.g. In SQS message queue)

Picture 2

Message waits in message queue until component is not ready to accept message . After component two ready to receive message SQS server sends message to component be. At the same point visibility timeout period starts.

Picture 3

After receiving message from message queue it removes message fron message queue so that no furthur problem can happen through it.

Done. In this way SQS works.

Why SQS?

You might think , if we can directly connect two applications or collect data in database and then send to other component then what is the reason to this all.Answer is this techniques may create data loss; if receiver side system is not available due to some reason then message can’t reach to it. On the other hand SQS stores the data , wait for system to be available and then sends the data to other component.

Use Case of SQS

Let us assume there’s reality show going on where we have to vote for every performance. For getting vote requests we can use SQS service. We can also use database but it is not that use ful. We have to pay for database and server services . What if only few votes come up less than you expected it would be waste of database and money. And what if votes go crazy in lakhs , millions in this case your database can’t work properly. To avoid this store and money waste we can use SQS here. It will be more cheaper and easier for us.

As like this we can use SQS in many different places .

Thanks.

--

--