AWS Integration & Messaging: SQS, SNS & Kinesis Flashcards

1
Q

What are the two patterns of application communication?

A

Synchronous and asynchronous communication

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

What issue can arise with synchronous communication between applications?

A

It can be problematic if there are sudden spikes of traffic

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

What is a scenario that illustrates the need to handle sudden traffic spikes?

A

Encoding 1000 videos suddenly instead of the usual 10

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

What is a recommended approach to handle sudden increases in application demands?

A

Decouple your applications

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

What service can be used for a queue model in application decoupling?

A

SQS

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

What service can be used for a pub/sub model in application decoupling?

A

SNS

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

What service can be used for real-time streaming in application decoupling?

A

Kinesis

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

What is a benefit of using SQS, SNS, and Kinesis?

A

These services can scale independently from our application

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

Entities that send messages to the SQS queue.

A

Producers

You can have one or multiple producers sending a variety of messages, such as orders to process or videos to handle.

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

These can contain any information that the producer needs to communicate to the consumer.

A

Consumers

When a message is received, the consumer processes it and then removes it from the queue.

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

What is the purpose of SQS?

A

The primary role of SQS is to act as a buffer that decouples the producers of messages from the consumers.

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

What is the result of SQS?

A

By managing different loads and speeds between producers and consumers there is no lose of messages or overloading any component.

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

Features:
- Oldest offering (over 10 years old)
- Fully managed service, used to decouple applications
- Can have duplicate messages (at least once delivery, occasionally)
- Can have out of order messages (best effort ordering)

A

SQS – Standard Queue

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

Features:
- Unlimited throughput, unlimited number of messages in queue
- Default retention of messages: 4 days, maximum of 14 days
- Low latency (<10 ms on publish and receive)
- Limitation of 256KB per message sent

A

Attributes of *Standard Queue**:

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

How is a message produced?

A

Produced to SQS using the SDK (SendMessage API)

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

How long does a produced message persist.

A

persists in SQS until a consumer deletes it

17
Q

How is a message consumed?

A

Consumers poll SQS for messages

Delete the messages using the DeleteMessage API

receive up to 10 messages at a time

18
Q

Where do consumers run?

A

running on EC2 instances, servers, or AWS Lambda