Introduction to AWS SQS & it’s use cases

Ayush Rawat
5 min readMar 1, 2021

Let’s say you are running a e-commerce. You want to send set of emails to your customer, seller, logistic partner and your employees for every order processing. Order service have to send message to the all the email services but if somehow email service goes down the entire business goes down due on one end customers are purchasing but the messages to the email service get lost every time. So overcome this issue there is a concept message queue let’ look at what is this

Message Queue

The basic architecture of a message queue is simple; there are client applications called producers that create messages and deliver them to the message queue. Another application, called a consumer, connects to the queue and gets the messages to be processed. Messages placed onto the queue are stored until the consumer retrieves them.

A message queue provides an asynchronous communications protocol, which is a system that puts a message onto a message queue and does not require an immediate response to continuing processing. Email is probably the best example of asynchronous communication. When an email is sent, the sender continues to process other things without needing an immediate response from the receiver. This way of handling messages decouples the producer from the consumer so that they do not need to interact with the message queue at the same time.

Some Tools for Message Queue

  • RabbitMQ
  • Apache Kafka
  • Apache ActiveMQ
  • ZeroMQ
  • AWS SQS

Let’s checkout AWS SQS in detail

What is AWS SQS ?

Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications. SQS eliminates the complexity and overhead associated with managing and operating message oriented middleware, and empowers developers to focus on differentiating work. Using SQS, you can send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available. Get started with SQS in minutes using the AWS console, Command Line Interface or SDK of your choice, and three simple commands.

Benefits of Amazon Simple Queue Service

a. Eliminate Administrative Overhead

AWS manages all in progress operations and underlying infrastructure required to produce an extremely accessible and scalable message queuing service. With AWS SQS, there’s no direct value, no ought to acquire, install, and assemble messaging package, and no long build-out and maintenance of supporting infrastructure. Amazon SQS queues are dynamically created and scale automatically, therefore, you’ll be able to build and grow applications quickly and with efficiency.

b. Reliably Deliver Messages

Use AWS SQS to transmit any volume of data, at any level of output, while not losing messages or requiring alternative services to be accessible. Amazon SQS helps you to decouple application parts in order that they run and fail severally, increasing the fault tolerance of the system. Multiple copies of each message area unit hold on redundantly across multiple accessible zones in order that they’re out there whenever required.

c. Keep Sensitive Information Secure

You can use Amazon SQS to exchange sensitive data between applications using server-side secret writing (SSE) to inscribe every message body. The AWS SQS compass point integration with AWS Key Management Service (KMS) permits you to centrally manage the keys that defend SQS messages together with keys that defend your alternative AWS resources. AWS KMS logs each use of your encryption keys to AWS CloudTrail to assist meet your restrictive and compliance wants.

d. Scale Elastically and Cost-Effectively

AWS SQS leverages the AWS cloud to dynamically scale supported demand. Amazon SQS scales elastically together with your application. Therefore, you don’t have to worry regarding capability designing and pre-provisioning. There’s no limit to the number of messages per queue, and commonplace queues offer nearly unlimited output. Prices area unit supported usage that provides important value saving versus the “always-on” model of self-managed electronic messaging middleware.

Case Study of redBus

redBus is an Indian online bus ticketing platform providing ticket booking facility through its website, iOS and Android mobile apps. Headquartered in Bengaluru, India, it connects bus travellers with a network of over 2500 bus operators,across India, countries in South East Asia and Latin America. redBus is a subsidiary of Ibibo Group.The platform is also a part of India’s leading online travel company MakeMyTrip Limited. redBus currently runs in six countries — India, Malaysia, Indonesia, Singapore, Peru and Colombia and has so far registered over 180 million trips,with a customer base of over 20 million.

Challenges

The company previously ran its operations from a traditional data center by purchasing and renting its systems and infrastructure. In addition to the expense, several logistical problems evolved from this arrangement. The biggest problem was that the infrastructure could not effectively handle processing fluctuations, which had a negative impact on productivity. Additionally, the procurement of servers or upgrading the server configuration was an extremely time-consuming endeavor. Over time, redBus realized that a better solution was imperative — a solution that offered scalability to handle the company’s processing fluctuations. redBus looked to Amazon Web Services (AWS) for a solution.

Benefits

Since migrating to AWS, redBus has seen measurable improvements in the bottom line. Padmaraju says, “By scaling up and down dynamically based on the load, we maintain performance as well as minimize cost. With the time savings that the IT and development staffs obtain from the AWS solution, AWS gives us an overall cost benefit of about 30–40%.” He adds, “By hosting at [the AWS Asia Pacific (Singapore) region], redBus.in gained significantly in terms of website performance by way of reduced latency (about 4x). This is a great advantage when the customers are from India.”

Of the many excellent characteristics of AWS, perhaps the most significant to redBus is the ability to “instantly replicate the whole setup on demand for testing by creating and destroying instances on demand for experimentation, thereby reducing the time to market.” Less time to market translates to increased profitability and success.

How redBus using SQS services ?

redBus is expanding their AWS solution to include Amazon SQS and SNS for monitoring, alerts, and intercommunication. “Amazon SQS is an especially good solution for enabling messaging between external applications and our applications.

--

--