SQS Flashcards
What does SQS stand for?
Simple Queue Service
What does AWS SQS do?
SQS is a pull-based, distributed queue system forproducer/consumer-typesystems
- some applications add requests to the queue, other applications poll the queue for requests and execute them
- 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.
In the context of SQS, what is a queue?
A temporary repository of messages that are awaiting processing
On the exam, when you see the word decouple, what should you immediately think about? Why?
SQS
SQS is used to decouple components of an application and ease message management btween them.
(SQS has been using terminology with decouple for a long time)
What was the very first service offered by AWS?
SQS
What is the maximum size of an SQS message?
256kb BUT you can go over this by storing payloads in S3
What are the two types of SQS queues?
- Standard
- FIFO
What does TPS stand for?
Transactions Per Second
What is the TPS limit on an SQS standard queue?
nearly unlimited transactions per second
What are the main drawbacks of standard queues vs. FIFO queues?
Occassionally, becuase of the highly-distributed nature architechture that gives the high throughput:
- (duplicates) more than one copy of a message might be delivered
- (best-effort ordering vs. exactly-once processing) messages might be delivered slightly out of order, but are generally delivered in the same order in which they are sent
(With FIFO queues, you don’t get duplicates, and you get exactly-once processing and ordering is strictly preserved)

What is the TPS limit on FIFO queues?
300 TPS
How long can messages be kept in SQS?
- Configurable from 1 minute to 14 days.
- Default value is 4 days
What are message groups?
- Messages are grouped into distinct, ordered “bundles” within a FIFO queue.
- For each message group ID, all messages are sent and received in strict order. However, messages with different message group ID values might be sent and received out of order.
- Every message must have a message group ID
(Source: https://aws.amazon.com/sqs/faqs/)
Can you have multiple producers for an SQS FIFO queue?
Yes. Messages are stored in the order that they were successfully received by Amazon SQS.
(Source: https://aws.amazon.com/sqs/faqs/)
Can you have multiple consumers for an SQS FIFO queue?
- By design, Amazon SQS FIFO queues don’t serve messages from the same message group to more than one consumer at a time.
- However, if your FIFO queue has multiple message groups, you can take advantage of parallel consumers, allowing Amazon SQS to serve messages from different message groups to different consumers
(Source: https://aws.amazon.com/sqs/faqs/)
What is visibility timeout?
In SQS, Visibility Timeout is the amount of time that a message is invisible in the SQS queue after a reader picks up the message.
- If the job is processed within that time, it’s deleted from the queue
- If not, the message becomes visible again and another reader can process it
When using SQS, the a message that you only meant to have processed once seems to have been processed twice! What might have happened? How might we be able to remediate?
- You are using a standard queue, which means you could have duplicates. To remediate: Upgrade to a FIFO queue
OR
- The visibility timeout of your message is too small, and it became visible again before the first reader was able to finish processing. To remediate: raise the visibility timeout
What are the max/min/default values for visibility timeout?
- Max: 12 hours
- Min: 0 seconds
- Default: 30 seconds
(Source: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)
In general, does SQS guarantee that your message will be processed exactly once?
No. They guarantee that your message will be processed at least once
What is the difference between SQS Short Polling and Long Polling?
The key difference is in how they handle the empty queue case
- Short Polling returns immediately
- Long Polling waits until a message arrives or it times out
Does SQS automatically manage application-level tracking?
No, you need to set this up yourself
What does the “DelaySeconds” attribute in SQS control?
When a new message is added to the SQS queue, it will be hidden from consumer instances for a fixed period.
In the context of SQS, what is horizontal scaling?
Horizontal scaling involves increasing the number of message producers and consumers in order to increase your overall queue throughput