AWS SQS(Simple Queue Service) and it’s Industry Use Cases !!
Sheetal Agarwal
AWS Community Builder | 4X GCP Certified | 3X AWS Certified | 1X Azure Certified | DevOps Engineer | Cloud Engineer | SRE | Kubernetes | Jenkins | Terraform | Ansible
What is Amazon Simple Queue Service?
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.
Amazon Simple Queue Service (Amazon SQS) offers a secure, durable, and available hosted queue that lets you integrate and decouple distributed software systems and components. Amazon SQS offers common constructs such as dead-letter queues and cost allocation tags. It provides a generic web services API that you can access using any programming language that the AWS SDK supports.
SQS offers two types of message queues.
1. Standard Queue
- It has the benefit of supporting an ample amount of transactions per second per API action.
- Standard queues offer maximum throughput, best-effort ordering, and at-least-once delivery.
- As the message is delivered one at a time but at the same time, it delivers more than one copy of a message.
- It may happen that the message delivered is in a different order from the source in which it was sent.
2. FIFO Queue
- It has a high throughput which can send 300 messages per second which include 300 send, receive, and delete operation per second.
- SQS FIFO queues are designed to guarantee that messages are processed exactly once, in the exact order that they are sent.
- The message is not duplicated it is stored with the customer until and unless the customer deletes it.
- The messages are treated in first out order as the message sent and received is strictly preserved.
How SQS Queues Works -
- SQS allows queues to be created, deleted and messages can be sent and received from it.
- 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
Benefits of using Amazon SQS -
- Security — You control who can send messages to and receive messages from an Amazon SQS queue. Server-side encryption (SSE) lets you transmit sensitive data by protecting the contents of messages in queues using keys managed in AWS Key Management Service (AWS KMS).
- Durability — For the safety of your messages, Amazon SQS stores them on multiple servers. Standard queues support at-least-once message delivery, and FIFO queues support exactly-once message processing.
- Availability — Amazon SQS uses redundant infrastructure to provide highly-concurrent access to messages and high availability for producing and consuming messages.
- Scalability — Amazon SQS can process each buffered request independently, scaling transparently to handle any load increases or spikes without any provisioning instructions.
- Reliability — Amazon SQS locks your messages during processing, so that multiple producers can send and multiple consumers can receive messages at the same time.
- Customization — Your queues don’t have to be exactly alike — for example, you can set a default delay on a queue. You can store the contents of messages larger than 256 KB using Amazon Simple Storage Service (Amazon S3) or Amazon DynamoDB, with Amazon SQS holding a pointer to the Amazon S3 object, or you can split a large message into smaller messages.
Case Study of NASA with AWS SQS -
The Challenge -
NASA began providing online access to photos, video, and audio in the early 2000’s, when media capture began to shift from analog and film to digital. Before long, each of NASA’s 10 field centers was making its imagery available online, including digitized versions of some older assets.
Therein was the challenge: “With media in so many different places, you needed institutional knowledge of NASA to know where to look,” says Rodney Grubbs, imagery experts program manager at NASA. “If you wanted a video of the space shuttle launch, you had to go to the Kennedy Space Center website. If you wanted pictures from the Hubble Space Telescope, you went to the Goddard Space Flight Center website. With 10 different centers and dozens of distributed image collections, it took a lot of digging around to find what you wanted.”
Why Amazon Web Services -
Development of the new NASA Image and Video Library was handled by the Web Services Office within NASA’s Enterprise Service and Integration Division. Technology selection, solution design, and implementation was managed by InfoZen, the WESTPrime contract service provider. As an Advanced Consulting Partner of the AWS Partner Network (APN), InfoZen chose to build the solution on Amazon Web Services (AWS). “Amazon was the largest cloud services provider, had a strong government cloud presence, and offered the most suitable cloud in terms of elasticity,”
Architecture -
The NASA Image and Video Library is a cloud-native solution, with the front-end web app separated from the backend API. It runs as immutable infrastructure in a fully automated environment, with all infrastructure defined in code to support continuous integration and continuous deployment (CI/CD).
The Benefits -
- An Image and Video Library for the Future: Through its use of AWS, with support from InfoZen, NASA is making its vast wealth of pictures, videos, and audio files — previously in some 60 “collections” across NASA’s 10 centers — easily discoverable in one centralized location, delivering these benefits:
- Easy Access to the Wonders of Space: The Image and Video Library automatically optimizes the user experience for each user’s particular device. It is also fully compliant with Section 508 of the Rehabilitation Act, which requires federal agencies to make their technology solutions accessible to people with disabilities. Captions can be turned on or off for videos played on the site, and text-based caption files can be downloaded for any video.
- Built-in Scalability: All components of the NASA Image and Video Library are built to scale on demand, as needed to handle usage spikes. “On-demand scalability will be invaluable for events such as the solar eclipse that’s happening later this summer — both as we upload new media and as the public comes to view that content,” says Bryan Walls, Imagery Experts Deputy Program Manager at NASA.
- Good Use of Taxpayer Dollars: By building its Image and Video Library in the cloud, NASA avoided the costs associated with deploying and maintaining server and storage hardware in-house. Instead, the agency can simply pay for the AWS resources it uses at any given time.
Thank You for Reading the Article !!
Senior Associate, Infrastructure Specialist
3 年Congratulations Sheetal