ARTH Task 22
CASE STUDY OF AWS-SQS
What is Amazon 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.
How does SQS work?
-> SQS provides an API endpoint to submit messages and another endpoint to read messages from a queue. Each message can only be retrieved once, and you can have many clients submitting messages to and reading messages from a queue at the same time.
-> The messages that SQS handles can be unformatted strings, XML, or JSON. Because SQS guarantees “exactly once” delivery, and because you can concurrently submit messages to and read messages from a given queue, SQS is a good option for integrating multiple independent systems.
- > You might well be asking: why use SQS if you can have an internal HTTP API for each service? While HTTP APIs are an accessible way to expose software systems to external users, it’s not the most efficient mechanism when it comes to integrating purely internal systems. A messaging queue is more lightweight. In particular, SQS also handles things like automated retries, preserving queue state across multiple availability zones in AWS, and keeping track of expiration timeouts on all messages.
BASIC 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
USE CASES OF AWS-SQS: HUNGAMA
- > Hungama is a leading aggregator, developer, publisher, and distributor of Bollywood and South-Asian entertainment content. The digital media company, based in Mumbai, India, has partnerships with over 400 content creators, record labels, studios, broadcasters, and game publishers, and has licensed, worldwide exclusive digital rights to more than one-half million music and video titles.
- > Hungama delivers content to consumers in 47 countries across mobile, Internet, and Internet protocol television (IPTV) services, and has more than 150 partners across the world.
- > Before migrating to AWS, the company ran its servers in local data centers. This solution soon became expensive, time-consuming, and inefficient. Hungama wanted to turn projects around quickly but old equipment caused delays in implementation and service launches. In 2008, Hungama migrated to AWS to take advantage of the cost-effectiveness, flexibility, and fast time-to-market offered by the cloud. “Our migration to AWS in 2008 reduced IT costs considerably,” says Amit Vora, CTO for Hungama.
- > The cost savings allowed Hungama to focus its engineering resources on getting products and services to market more quickly. The company began to grow rapidly, but as more internal teams started using AWS, its monthly costs also grew. Hungama’s infrastructure team engaged AWS Support to help them find ways to optimize costs.
- > Hungama uses Amazon SQS to transmit any volume of data, at any level of throughput, without losing messages or requiring other services to be available.
USE CASES OF AWS-SQS: REDBUS
- > Redbus.in became a part of ibibo group via a 100% acquisition in June 2013. The travel agency anticipates expanding the AWS solution to include Amazon Simple Notification Service (Amazon SNS) and Amazon Simple Queue Service (Amazon SQS) for monitoring, alerts, and intercommunication.
- > RedBus is India’s largest online bus ticketing platform, trusted by over 6 million Indians. “Amazon SQS is an especially good solution for enabling messaging between external applications and our applications,” says Padmaraju.
- > Over time, redBus realized that a better solution was imperative — a solution that offered scalability to handle the company’s processing fluctuations.
*Using SQS can also create challenges for Serverless developers, as described hereafter.
1.High cost at scale
2.Lack of support for broadcast messages.
3.Reduced control over performance
CONCLUSION
We understood how SQS can be used to efficiently manage messages that flow through queues and its industrial use cases like Redbus, Hungama.SQS is used by many more industries like BMW, NASA, Capital One, and so on.