AWS 18 Flashcards
What can be problematic with synchronous messaging between applications?
Sudden spikes in traffic can cause issues
What is the default time a message can be in a queue? What is the max?
4 days, 14 days
What is the max size for messages sent to SQS?
256 kb
How can we scale applications processing SQS messages?
We could possibly put the applications processing the SQS on EC2 instances with an ASG;
The ASG will go off of the CloudWatch metric ApproximateNumberOfMessages and set an alarm. The alarm will trigger and ASG will scale.
To finish the process of an SQS message, what must we do?
Delete it
What is Message Visibility Timeout in SQS?
This means that when a message is polled by a consumer it becomes “invisible” to other consumers. Default time is 30 seconds;
Must be processed in 30 seconds or returned to queue
If a consumer needs more time than the default Message Visibility Timeout, what can they do?
Call the ChangeMessageVisibility API to get more time
What is Long Polling? Why would we use it?
A consumer can optionally “wait” for messages to arrive if there are none in the queue;
LongPolling decreases the number of API calls made to SQS while increasing the efficiency and latency of your application;
What is the SQS Extended Client?
Uses an Amazon s3 bucket as a medium between the producer and consumer. Consumer will consume the message in S3. This helps with large amounts of data.
What is the SQS Long Polling API call?
RecieveMessageWaitTimeSeconds
What is the difference between FIFO queue and standard queue?
FIFO queue makes sure that first messages in are first messages out. Standard queue does not guarantee order
What must be done to the name of the queue if it’s FIFO?
Must have extension .fifo
What are the two deduplication methods for SQS FIFO?
Content based deduplication: will do a SHA-256 hash of the message body to make sure same bodies aren’t sent twice
Explicitly provide a Message Duplication ID
What are the two deduplication methods for SQS FIFO?
Content based deduplication: will do a SHA-256 hash of the message body
Explicitly provide a Message Duplication ID
How would you use the MessageGroupID in SQS FIFO?
you can specify a MessageGroupID so that only one consumer can take that group of messages.