Application Services - SQS Flashcards

1
Q

What is SQS?

A

web service that allows you to access a message queue that can be used to store messages while waiting for a computer to process them.

distributed queue system that enables web services apps to quickly and reliably queue messages that one component in the app generates to be consumed by another component

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

What is a queue?

A

temporary repository for messages that are awaiting processing

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

Example:

A

Image is uploaded to web app, web app alerts SQS that image has been uploaded and a job needs to be executed on it. app servers may queue SQS system and notice new job that comes in and access that image and perform a task. app servers will update queue and remove message from the queue

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

What is meant by decoupling/loosely coupling in SQS?

A

If web server goes down, for example, message is still in SQS and app servers not affected

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

T/F: Using SQS, you can decouple the components of an app so they run independently, with SQS easing message management between components.

A

True

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

Can any component of a distributed app store messages in a fail-safe queue?

A

Yes

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

How much text can be contained in a message?

A

256 KB, any format

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

How can a component retrieve messages?

A

with the SQS API

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

The queue acts as

A

a buffer between the component producing and saving data and the component receiving the data for processing.

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

The queue resolves…

A

…issues that arise if the producer is producing work faster than the consumer can process it, or if the producer or consumer are only intermittently connected to the network

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

How many times does SQS deliver each message?

A

at least once

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

How many readers and writers can interact with the same queue?

A

multiple

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

How many components can a single queue interact with?

A

Many, simultaneously.

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

Do components need to coordinate with each other to share the queue?

A

No

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

SQS is engineered to

A

always be available and deliver messages

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

Does SQS guarantee first in first out delivery?

A

No

17
Q

Is order important?

A

No, but you can place sequencing information in each message.

18
Q

Is SQS pull or push?

A

pull

19
Q

visibility timeout

A

how long message will be visible in the queue

20
Q

when does visibility timeout start?

A

when app server picks up the message

21
Q

when would a message be processed/deleted?

A

during visibility timeout period

22
Q

what happens if visibility timeout expires?

A

message will stay in queue and won’t be deleted and another app server will pull it

23
Q

T/F: SQS can be integrated with Auto Scaling

A

True. Useful for when queue gets too large and more app servers can spin up

24
Q

max visibility timeout period

A

12 hours

25
Q

Best design practice

A

design system so that processing a message more than once does not create errors/inconsistencies

26
Q

How is message billing based?

A

64 kb chunks. each chunk billed as one request

27
Q

Cost for requests per month

A

First 1M free, after that it’s 50 cents per million requests

28
Q

How many messages can a request have?

A

Minimum 1 message, maximum 10 messages, up to maximum 256 kb