SQS Flashcards

1
Q

How large can an SQS message be?

256KB

128KB

512KB

64KB

A

256KB

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

What is the maximum visibility of an SQS message in a queue?

1 day

1 hour

12 hours

14 days

A

12 hours

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

You run a video-hosting website with two types of members: premium, fee-paying members; and free members. Each video that is uploaded is processed by a fleet of EC2 instances, which poll an SQS queue as videos are uploaded. However, you need to ensure that the videos uploaded by your premium, fee-paying members have a higher priority than those of your free members. How might you work with SQS to endure priority treatment of the premium members’ videos?

SQS allows you to set priorities on individual items within the queue, so simply set the fee paying members at a higher priority than your free members.

Create two SQS queues — one for premium members, and one for free members. Program your EC2 fleet to poll the premium queue first and, if empty, to then poll your free members SQS queue.

SQS would not be suitable for this scenario. It would be much better to use SNS to encode the videos.

A

Create two SQS queues — one for premium members, and one for free members. Program your EC2 fleet to poll the premium queue first and, if empty, to then poll your free members SQS queue.

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

What is the maximum long poll time out?

5 minutes

50 seconds

1 hour

20 seconds

A

20 seconds

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

An SQS message can be delivered multiple times.

True or False

A

True

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

What is the default visibility timeout for a message in an SQS queue?

15 minutes

30 seconds

1 minute

1 year

A

30 seconds

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

Which Amazon service can you use in conjunction with SQS to “fan out” SQS messages to multiple queues.

SWF

SNS

SES

ElastiCache

A

SNS

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

Your EC2 instances download jobs from an SQS queue. However, they are taking too long to process the messages. What API call can you use to extend the length of time to process the jobs?

AlterMessageTime

SetMessageVisibility

ExtendMessageTime

ChangeMessageVisibility

A

ChangeMessageVisibility

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

You are designing a new application that processes payments and delivers promotional emails to customers. You need to ensure that the payment process takes priority over the creation and delivery of emails. How might you use SQS to achieve this.

Use 1 SQS queue for the platform. Use the SetPriority API call to ensure that all payment SQS messages take priority over the promotional email messages.

Use 1 SQS queue for the platform. Use the HighPriority API call to ensure that all payment SQS messages take priority over the promotional email messages.

Use 2 SQS queues for the platform. Have the EC2 fleet poll the payment SQS queue first. If this queue is empty, then poll the promotional emails queue.

Use 2 SQS queues for the platform. Have the EC2 fleet poll the promotional emails SQS queue first. If this queue is empty, then poll the payment emails queue.

A

Use 2 SQS queues for the platform. Have the EC2 fleet poll the payment SQS queue first. If this queue is empty, then poll the promotional emails queue.

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

You have a fleet of EC2 instances that are constantly polling empty SQS queues, burning CPU cycles and costing your company money. What should you do?

Consider using ElastiCache to cache the messages, rather than SQS.

Enable SQS Short Polling.

Delete the entire EC2 fleet so that they no longer poll the queue.

Enable SQS Long Polling.

A

Enable SQS Long Polling.

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

What is the maximum retention period for an SQS message?

1 hour

1 day

12 hours

14 days

A

14 days

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

SQS was the first service on the AWS platform?

True or False?

A

True

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