Decoupling applications: SQS, SNS, Kinesis, Active MQ Flashcards
AWS messaging service that creates queues which producers post messages to it and consumers poll messages from it
Amazon Simple Queue Service (SQS)
This term describes the period where an SQS message will appear invisible to other consumers while one consumer is processing the message
SQS - Message Visibility Timeout
This API can be called if a consumer needs more time to process a message from an SQS Queue
ChangeMessageVisibility
If you want to manage the size of an ASG of consumers based on the number of messages in an SQS Queue, you can use this default CloudWatch metric
ApproximateNumberOfMessages
A way to optimize the number of API calls made to an SQS queue that also decreases latency
Enabling Long Polling on SQS queues
SQS Queue type to use if you need to preserve the order of the messages and eliminate duplicates
FIFO Queue
Use case for an SQS queue that allows you to handle spikes in traffic that could be limited by database insertion throughput
SQS as a buffer to database writes
AWS Messaging service that enables a pub/sub architecture
Simple Notification Service (SNS)
What are the available protocols for a SNS subscription?
Amazon Kinesis Data Firehose, Amazon SQS, AWS Lambda, Email, Email-JSON, HTTP, HTTPS, SMS
Serverless streaming data service that makes it easy to capture, process, and store data streams at any scale
Amazon Kinesis Data Streams
What are the three AWS services that Kinesis Data Firehose can send data to?
AWS S3
AWS Redshift
AWS ElasticSearch
A fully managed service for delivering real-time streaming data to destinations
Kinesis Data Firehose
You have an SQS Queue where each consumer polls 10 messages at a time and finishes processing them in 1 minute. After a while, you noticed that the same SQS messages are received by different consumers resulting in your messages being processed more than once. What should you do to resolve this issue?
Increase the Visibility Timeout
You have 3 different applications that you’d like to send them the same message. All 3 applications are using SQS. What is the best approach would you choose?
Use SNS + SQS Fan Out Pattern
You have a Kinesis data stream with 6 shards provisioned. This data stream usually receiving 5 MB/s of data and sending out 8 MB/s. Occasionally, your traffic spikes up to 2x and you get a ProvisionedThroughputExceeded exception. What should you do to resolve the issue?
Add more Shards
You have a website where you want to analyze clickstream data such as the sequence of clicks a user makes, the amount of time a user spends, and where the navigation begins and how it ends. You decided to use Amazon Kinesis, so you have configured the website to send these clickstream data all the way to a Kinesis data stream. While you checking the data sent to your Kinesis data stream, you found that the users’ data is not ordered and the data for one individual user is spread across many shards. How would you fix this problem?
For each record sent to Kinesis add a partition key that represents the identity of the user
You are running an application that produces a large amount of real-time data that you want to load into S3 and Redshift. Also, these data need to be transformed before being delivered to their destination. What is the best architecture would you choose?
Kinesis Data Streams + Kinesis Data Firehose
An e-commerce company is preparing for a big marketing promotion that will bring millions of transactions. Their website is hosted on EC2 instances in an Auto Scaling Group and they are using Amazon Aurora as their database. The Aurora database has a bottleneck and a lot of transactions have been failed in the last promotion they have made as they had a lot of transaction and the Aurora database wasn’t prepared to handle these too many transactions. What do you recommend to handle those transactions and prevent any failed transactions?
Use SQS as a buffer to write to Aurora
A company is using Amazon Kinesis Data Streams to ingest clickstream data and then do some analytical processes on it. There is a campaign in the next few days and the traffic is unpredictable which might grow up to 100x. What Kinesis Data Stream capacity mode do you recommend?
On-demand mode since the traffic is unpredictable
If you have multiple consumers retrieving data from a Kinesis Data Stream, which feature should you use so that each consumer receives its own 2MB/second pipe of read throughput per shard?
Kinesis Data Streams Enhanced Fanout
Tool that allows you to reliably load streaming data into data lakes, data stores, and analytics tools, but not to applications
Kinesis Data Firehose
In order to migrate from SQS Standard queues to FIFO queues with batching, what three steps would you have to take?
- Delete the existing standard queue and recreate it as a FIFO queue
- Make sure the name of the FIFO queue ends with the .fifo suffix
- Make sure that the throughput for the target FIFO queue does not exceed 3,000 messages per second
How many messages per second can a FIFO queue support if you enable batching?
3,000
How many messages per second can a FIFO queue support if you disable batching?
300
In Kinesis Data Streams, how many messages per second can you get per shard?
1000
If you want to use an SQS FIFO queue that has multiple consumers, which attribute should you define for each message?
GroupID
SQS feature that lets you postpone the delivery of new messages to a queue for several seconds, for example, when your consumer application needs additional time to process messages
Delay queues
What are the four destinations where Amazon S3 notifications can publish events?
Amazon SNS topic
Amazon SQS queue (standard queue only!)
AWS Lambda
This type of queue can be used as a target for messages that cannot be processed (consumed) successfully by other queues
Dead-letter queue