Applications - SQS Flashcards
What is SQS?
Amazon SQS is a web service that gives you access to a message queue that can be used to store messages while waiting for a computer to process them.
Its distributed queue system that enables web service apps to quickly and reliably queue messages that one component in the app generates to be consumed by another component.
What are the two types of SQS message queues?
SQS offers two types of message queues.
- Standard queues (default)
- SQS FIFO queues are designed to guarantee that messages are processed exactly once, in the exact order that they are sent.
What is the size limit of SQS messages?
Messages can contain up to 256KB of text in any format. Any component can later retrieve the message using SQS API.
If you see “decouple” anything in the exam… think what?
SQS
What are the benefits of SQS?
Using SQS, you can decouple the components of an app so they run independent, easing message management between components.
Any component of a distributed app can stores messages in a fail safe queue.
The queue acts as a buffer between the component producing and saving data, and the component receiving the data processing. This means the queue resolves issues that arise if the producing is producing work faster than the consumer can process it, or if the producer of consumer only intermittently connected to the network.
Describe the features of “Standard” SQS.
Standard SQS is default, offers maximum throughput, best-effort ordering, and at-least-once delivery.
Lets you have nearly unlimited number of transactions per second. Standard queues guarantee that a message is delivered at least once.
Occasionally, because of the highly distributed arch that allows high throughput, more than one copy of a message might be delivered.
However, standard queues provide the best effort ordering which ensures that messages are generally delivered in the same order as sent.
Describe the features of “FIFO” SQS.
“First in First out”. FIFO queue compliments the standard queue.
The most important features of this queue type are FIFO delivery and exactly once processing: the order in which messages are sent and the received is strictly preserver and a message is delivered once and remains available until a consumer processes and deletes it; duplicates are not introduced in the queue.
FIFO queue also support message groups that allow multiple ordered message groups within a single queue.
FIFO queues are limited to 300 transactions per second, but have all the capabilities of standard queues.
Is SQS “pull” or “push” based
SQS is pull based.
What is the retention period of SQS messages?
1-14 days with 4 days being default.
What is SQS Visibility timeout?
To prevent other consumers from processing the message again, Amazon SQS sets a visibility timeout, a period of time during which Amazon SQS prevents other consumers from receiving and processing the message. The default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The max is 12 hours.
What is Amazon SQS long polling?
A way to retrieve messages from your Amazon SQS queues. While the regular short polling returns immediately, even if the message queue being polled is empty, long polling doesn’t return a response until a message arrives in the message queue, or the long poll times out.