Amazon Simple Queue Service (SQS) | Overview Flashcards

1
Q

What is Amazon SQS?

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A

Amazon Simple Queue Service (Amazon SQS) is a web service that gives you access to message queues that store messages waiting to be processed. With Amazon SQS, you can quickly build message queuing applications that can run on any computer.

Amazon SQS offers a reliable, highly-scalable, hosted queue for storing messages in transit between computers. With Amazon SQS, you can move data between diverse, distributed application components without losing messages and without requiring each component to be always available.

Amazon SQS can help you build a distributed application with decoupled components, working closely with the Amazon Elastic Compute Cloud (Amazon EC2) and other AWS infrastructure web services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What can I do with Amazon SQS?

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A

Because Amazon SQS is highly-scalable, you pay only for what you use. You can start small and grow your application alongside your business needs, with no performance or reliability compromises. Amazon SQS lets you stop worrying about how your messages are stored and managed and helps you focus on building robust, sophisticated message-based applications.

Here are just a few ideas:

Integrate Amazon SQS with other AWS services to make applications more flexible and reliable.

Use Amazon SQS to create work queues with each message as a task to be completed by a process. Let one (or many) computers read tasks from the message queue and then process them.

Build a microservice architecture and use message queues to connect your microservices.

Keep notifications of significant business events in an Amazon SQS message queue. Each event can have a corresponding message in a message queue, and applications that need to be aware of the event can read and process the messages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can I get started using Amazon SQS?

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A

You can create an Amazon SQS queue and send a message in a few steps by completing our 10-minute tutorial, Send Messages Between Distributed Applications.

For additional detail, see the Amazon SQS Developer Guide, and sample code in the Resource Center.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the benefits of Amazon SQS over homegrown or packaged message queuing systems?

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A

Amazon SQS provides several advantages over building your own software for managing message queues or using commercial or open-source message queuing systems that require significant up-front time for development and configuration.

These alternatives require ongoing hardware maintenance and system administration resources. The complexity of configuring and managing these systems is compounded by the need for redundant storage of messages that ensures messages are not lost if hardware fails.

In contrast, Amazon SQS requires no administrative overhead and little configuration. Amazon SQS works on a massive scale, processing billions of messages per day. You can scale the amount of traffic you send to Amazon SQS up or down without any configuration. Amazon SQS also provides extremely high message durability, giving you and your stakeholders added confidence.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How is Amazon SQS different from Amazon SNS?

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A

Amazon Simple Queue Service (SQS) and Amazon SNS are both messaging services within AWS, which provide different benefits for developers. Amazon SNS allows applications to send time-critical messages to multiple subscribers through a “push” mechanism, eliminating the need to periodically check or “poll” for updates. Amazon 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. Amazon SQS provides flexibility for distributed components of applications to send and receive messages without requiring each component to be concurrently available.

A common pattern is to use SNS to publish messages to Amazon SQS queues to reliably send messages to one or many system components asynchronously. For more details, see What is Pub/Sub Messaging?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is Amazon SQS different from Amazon MQ?

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Amazon MQ, Amazon SQS, and Amazon SNS are messaging services that are suitable for anyone from startups to enterprises. If you’re using messaging with existing applications, and want to move your messaging to the cloud quickly and easily, we recommend you consider Amazon MIt supports industry-standard APIs and protocols so you can switch from any standards-based message broker to Amazon MQ without rewriting the messaging code in your applications. If you are building brand new applications in the cloud, we recommend you consider Amazon SQS and Amazon SNS. Amazon SQS and SNS are lightweight, fully managed message queue and topic services that scale almost infinitely and provide simple, easy-to-use APIs. You can use Amazon SQS and SNS to decouple and scale microservices, distributed systems, and serverless applications, and improve reliability.

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Does Amazon SQS provide message ordering?

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A

Yes. FIFO (first-in-first-out) queues preserve the exact order in which messages are sent and received. If you use a FIFO queue, you don’t have to place sequencing information in your messages. For more information, see FIFO Queue Logic in the Amazon SQS Developer Guide.

Standard queues provide a loose-FIFO capability that attempts to preserve the order of messages. However, because standard queues are designed to be massively scalable using a highly distributed architecture, receiving messages in the exact order they are sent is not guaranteed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Does Amazon SQS guarantee delivery of messages?

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A

Standard queues provide at-least-once delivery, which means that each message is delivered at least once.

FIFO queues provide exactly-once processing, which means that each message is delivered once and remains available until a consumer processes it and deletes it. Duplicates are not introduced into the queue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How is Amazon SQS different from Amazon Kinesis Streams?

Overview

Amazon Simple Queue Service (SQS) | Application Integration

A

Amazon SQS offers a reliable, highly-scalable hosted queue for storing messages as they travel between applications or microservices. It moves data between distributed application components and helps you decouple these components. Amazon SQS provides common middleware constructs such as dead-letter queues and poison-pill management. It also provides a generic web services API and can be accessed by any programming language that the AWS SDK supports. Amazon SQS supports both standard and FIFO queues.

Use Amazon SQS when you need each unique message to be consumed only once and for cases such as the following:

Decoupling the components of an application: You have a queue of work items and want to track the successful completion of each item independently. Amazon SQS tracks the ACK/FAIL results, so the application does not have to maintain a persistent checkpoint or cursor. After a configured visibility timeout, Amazon SQS deletes acknowledged messages and redelivers failed messages.

Configuring individual message delay: You have a job queue and you need to schedule individual jobs with a delay. With Amazon SQS, you can configure individual messages to have a delay of up to 15 minutes.

Dynamically increasing concurrency or throughput at read time: You have a work queue and want to add more readers until the backlog is cleared. With Amazon Kinesis Streams, you can scale up to a sufficient number of shards (however, you must provision enough shards ahead of time). Amazon SQS requires no pre-provisioning.

Scaling transparently: You buffer requests and the load changes as a result of occasional load spikes or the natural growth of your business. Because Amazon SQS can process each buffered request independently, Amazon SQS can scale transparently to handle the load without any provisioning instructions from you.

Amazon Kinesis Streams allows real-time processing of streaming big data and the ability to read and replay records to multiple Amazon Kinesis Applications. The Amazon Kinesis Client Library (KCL) delivers all records for a given partition key to the same record processor, making it easier to build multiple applications that read from the same Amazon Kinesis stream (for example, to perform counting, aggregation, and filtering).

Use Amazon Kinesis Streams when you need multiple consumers to be able to process each record and for use cases such as the following:

Routing related records to the same record processor: You stream MapReduce. Actions such as counting and aggregation are simpler when all records for a given key are routed to the same record processor.

Allowing multiple applications to consume the same stream concurrently: You have one application that updates a real-time dashboard and another that archives data to Amazon Redshift. You want both applications to consume data from the same stream concurrently and independently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly