SQS, SNS, Kenesis, ActiveMQ Flashcards
Which service is a queue?
Which service is a pub/sub?
Which service supports a real time streaming model?
SQS
SNS/Active MQ
Kinesis
What is throughput of SQS?
How many messages can be in a queue in SQS?
What is the retention time for messages in SQS?
What is the size limitation on messages in SQS?
Does SQS protect you from duplicate messages or have strict ordering?
How many messages can an SQS consumer consume at a time
Unlimited
Unlimited
Min - 1 min, Max 14 days
256kb
No
10
Who can consume SQS messages?
How can an ASG scale based on a queue?
Any application that can read from the que, on-prem applications, applications running on EC2, lambda functions
Set a cloudwatch alarm to scale the ASG when the metric ApproximateNumberOfMessages is over a certain length (Queue Length). THIS WOULD BE A CUSTOM METRIC!!!
How does SQS support encryption in transit and at rest?
In transit encryption is supported by using the HTTPS API. It supports at rest encryption using KMS. Client side encryption could also be used.
How can you provide access to the queue from an external account or from service within your account
By creating an SQS access policy.
How can S3 push a notification after an event has occured?
By configuring a bucket event. It would then publish a message to SQS, SNS or a Lambda function
What is the message visibility timeout?
How can this timeout be extended by an application?
The time that a message is invisible to other consumers after one consumer poles that message. It defaults to 30 seconds.
By calling the ChangeMessageVisibility API. That will restart the message visibility timeout clock.
What happens when a message hits the MaximumReceives threshold?
Can messages in the DLQ expire?
The message will go to the Dead Letter Queue (DLQ)
Yes, it has the same expiration time as a normal queue with a max of 14 days
What is a delay queue?
It will delay messages so consumers don’t see them immediately.
What is long poling and why would you use it?
How can long polling be configured?
Long polling is when a consumer stays connected to the queue until there is a message to consume. This reduces the number of API requests made to the queue, it also decreases the processing latency.
It can be configured on the queue, or at the API level using WaitTimeSeconds
How can you implement a Request-Response system using SQS?
By using the SQS Temporary Queue Client
How can you guarantee the order of messages and enable only once delivery?
What is a group ID in FIFO?
What is the consequence if you do not use group IDs when using a SQS FIFO?
What is the limitation on messages that can be consumed per second from SQS FIFO?
By using a First In First Out Queue (FIFO)
You can assign a group ID to messages so that different groups of messages can be consumed by different consumers but all messages will be consumed in order.
You can only have one consumer
300 (or 3,000 if using batching)
What is SNS?
What can subscribe to SQS topics?
SNS allows provides topics that can be subscribed to. Similar to active MQ, these topics can be subscribed to by email, web app, SQS
SNS Kenesis Firehose HTTP/HTTPS site. Lambda SMS Email/Email JSON Mobile notifications
How can you publish to a mobile app?
Use the DirectPublish SDK. This will publish to GCM/APNS
How can you control access to SNS?
IAM Policies and SNS Topic Policies