Decoupling applications: SQS, SNS, Kinesis, Active MQ Flashcards

1
Q

AWS messaging service that creates queues which producers post messages to it and consumers poll messages from it

A

Amazon Simple Queue Service (SQS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

This term describes the period where an SQS message will appear invisible to other consumers while one consumer is processing the message

A

SQS - Message Visibility Timeout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

This API can be called if a consumer needs more time to process a message from an SQS Queue

A

ChangeMessageVisibility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

ApproximateNumberOfMessages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A way to optimize the number of API calls made to an SQS queue that also decreases latency

A

Enabling Long Polling on SQS queues

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SQS Queue type to use if you need to preserve the order of the messages and eliminate duplicates

A

FIFO Queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Use case for an SQS queue that allows you to handle spikes in traffic that could be limited by database insertion throughput

A

SQS as a buffer to database writes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

AWS Messaging service that enables a pub/sub architecture

A

Simple Notification Service (SNS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the available protocols for a SNS subscription?

A

Amazon Kinesis Data Firehose, Amazon SQS, AWS Lambda, Email, Email-JSON, HTTP, HTTPS, SMS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Serverless streaming data service that makes it easy to capture, process, and store data streams at any scale

A

Amazon Kinesis Data Streams

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the three AWS services that Kinesis Data Firehose can send data to?

A

AWS S3
AWS Redshift
AWS ElasticSearch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A fully managed service for delivering real-time streaming data to destinations

A

Kinesis Data Firehose

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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?

A

Increase the Visibility Timeout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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?

A

Use SNS + SQS Fan Out Pattern

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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?

A

Add more Shards

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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?

A

For each record sent to Kinesis add a partition key that represents the identity of the user

17
Q

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?

A

Kinesis Data Streams + Kinesis Data Firehose

18
Q

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?

A

Use SQS as a buffer to write to Aurora

19
Q

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?

A

On-demand mode since the traffic is unpredictable

20
Q

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?

A

Kinesis Data Streams Enhanced Fanout

21
Q

Tool that allows you to reliably load streaming data into data lakes, data stores, and analytics tools, but not to applications

A

Kinesis Data Firehose

22
Q

In order to migrate from SQS Standard queues to FIFO queues with batching, what three steps would you have to take?

A
  1. Delete the existing standard queue and recreate it as a FIFO queue
  2. Make sure the name of the FIFO queue ends with the .fifo suffix
  3. Make sure that the throughput for the target FIFO queue does not exceed 3,000 messages per second
23
Q

How many messages per second can a FIFO queue support if you enable batching?

A

3,000

24
Q

How many messages per second can a FIFO queue support if you disable batching?

A

300

25
Q

In Kinesis Data Streams, how many messages per second can you get per shard?

A

1000

26
Q

If you want to use an SQS FIFO queue that has multiple consumers, which attribute should you define for each message?

A

GroupID

27
Q

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

A

Delay queues

28
Q

What are the four destinations where Amazon S3 notifications can publish events?

A

Amazon SNS topic
Amazon SQS queue (standard queue only!)
AWS Lambda

29
Q

This type of queue can be used as a target for messages that cannot be processed (consumed) successfully by other queues

A

Dead-letter queue