SQS & SNS & SWF Flashcards
SQS Visibility Time Out
12 Hrs
FIFO
Does not Offer FIFO. First In First Out. Although in the latest update it does.
SQS Message Delivery
Will attempt at least once to deliver all message in it’s queues.
Your system should be able to handle the same message multiple times.
SQS Max Size
256KB
SQS Pricing Model
1st million SQS requests per month are free.
50 cent per million requests per month afterwards.
SQS How many messages can a request send.
1-10 messages with a max size of 256KB
SQS How is it billed
Billed by 64KB chunk.
SQS Message order
Any order and received multiple times.
SQS Default Visibility Time Out
30 Seconds.
Can be extended by using the ChangeMessageVisibility Action.
SQS Max Time Out. Maximum Visibility.
12 Hours
SQS Long Polling
Doesn’t return a response until a message arrives in the Queue.
Cheaper
Times out in 20 seconds.
SQS Fanning Out
SNS topic is created. Then SQS queues the SNS topic. Messages sent to SNS will be fanned out to SQS Queues.
Maximum Retention Period
14 Days.
What is SNS
Simple Notification Service. WS sends notification from the cloud.
No polling and pushes notifications to subscribers.
SNS Topic
Access point allowing recepients to subscribe to copies of the same message. SNS formats themessage to the platform.
SNS Pricing Model
- 50¢ per million requests
- 6¢ per 100k HTTP
- 75¢ 100k messages over SMS
- $2 per 100k message over EMAIL
SNS Protocols
HTTP(S),Email, SQS (Fanning), Application, Lambda
What is SWF
WebService that coordinates multiple tasks across application components.
Consists of the following:
1- Domains
2- Workers
3- Deciders
SWF Workers
Programs that interact with SWF to get tasks, process received tasks, and return results.
SWF Decider
Program that controls coordination of tasks
WorkFlow Maximum Timeout
1 year
SWF vs SQS
Use SWF if it envolves Human Interaction (ie Warehouse example).
Maintains application state (SWF keeps track of all your tasks.)
SQS Quiz Question: Polling is burning CPU Cycles and costing your company money. How do you reduce the costs?
Long Polling to 20 seconds. That way the queue holds on to a request for 20 seconds at a time rather than every 2 seconds before responding. 1 min = 3 responses otherwise 1 min = 30 responses.
SQS: What Does ReceiveMessageWaitTime do?
set short and long polling
SQS: What does ChangeMessageVisibility do?
used to request or extend more time before timeout.
SNS - What command to use to get multiple device tokens
CreatePlatformEndpoint API