SQS, SNS, Kenesis, ActiveMQ Flashcards

1
Q

Which service is a queue?

Which service is a pub/sub?

Which service supports a real time streaming model?

A

SQS

SNS/Active MQ

Kinesis

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

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

A

Unlimited

Unlimited

Min - 1 min, Max 14 days

256kb

No

10

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

Who can consume SQS messages?

How can an ASG scale based on a queue?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does SQS support encryption in transit and at rest?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you provide access to the queue from an external account or from service within your account

A

By creating an SQS access policy.

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

How can S3 push a notification after an event has occured?

A

By configuring a bucket event. It would then publish a message to SQS, SNS or a Lambda function

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

What is the message visibility timeout?

How can this timeout be extended by an application?

A

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.

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

What happens when a message hits the MaximumReceives threshold?

Can messages in the DLQ expire?

A

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

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

What is a delay queue?

A

It will delay messages so consumers don’t see them immediately.

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

What is long poling and why would you use it?

How can long polling be configured?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How can you implement a Request-Response system using SQS?

A

By using the SQS Temporary Queue Client

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

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?

A

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)

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

What is SNS?

What can subscribe to SQS topics?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How can you publish to a mobile app?

A

Use the DirectPublish SDK. This will publish to GCM/APNS

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

How can you control access to SNS?

A

IAM Policies and SNS Topic Policies

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

How can you have guaranteed ordering from SNS topics and what types of subscribers does this apply to?

What can a subscriber do to only receive relevant messages from a queue?

A

Use FIFO Topics and it only applies to SQS subscribers.

Apply a filter

17
Q

What is a good use-case for using AmazonMQ?

What is the limitation of AmazonMQ?

How can you configure AmazonMQ for HA?

A

When you want to migrate an on prem application that uses MQTT, AMQP, STOMP, OpenWire, WSS to the cloud

It’s not as scalable as SQS or SNS

Configure 2 instances and have them both point to the same EFS drive

18
Q

What is Kinesis?

What is Data Streams?

What is Data Firehose?

What is Kinesis Data Analytics?

A

Makes it easy to collect, process and analyze streaming data in real time such as application logs, metrics, website clickstreams, IoT telemetry data

^^^^^^

Load data streams into aws data stores.

Analyze data streams with SQL or Apache Flink?

19
Q

How can you get more throughput in a stream?

What is the throughput per shard?

What are the producers of Kinesis streams?

What are the consumers of Kinesis Data Streams?

How many consumers can you have per shard?

A

By increasing the number of shards

1MB per sec/ 1000 msg/sec per shard

Any client using the Kinesis library or sdk, clients running the agent

Apps using the SDK or library, Lambda, Kinesis Data Firehose, Kinesis Data Analyitics

1

20
Q

What are the 2 types of consumption for Kinesis data streams?

How are you billed for Kinesis?

What is the retention period for Kinesis data streams?

Can a datastream be deleted?

A

2MB per shard Shared (Slower), 2MB per shared per consumer (Faster - It will increase with the number of consumers per shard)

Per shard provisioned

1 - 365 days. This gives you the ability to replay data

No

21
Q

What are the sources for firehose?

How can you transform the data stream before it is batch written?

What are the destinations from Firehose?

Where can you send failed data from Firehose?

A

Kinesis data streams is the most common, but data can come directly from the sdk, client, agent as well as Cloud watch logs and events and AWS IoT

By using a lambda function

S3, Redshift though S3, Amazon ElasticSearch, or a custom HTTP endpoint

To an S3 bucket

22
Q

What is Kinesis Data Analytics?

What are the sources for Kinesis Data Analytics

What are some use-cases for KDA?

A

It allows you to perform queries on data streams and output the result of that query to another datastream or firehose.

Kinesis Data Streams or Firehose

Time-series analytics, real-time dashboards, real-time metrics.