Slide 1

Slide 1 text

AWS SQS Workshop Samuel James

Slide 2

Slide 2 text

Agenda •Introduction •Choosing a Queue System •AWS SQS •AWS SQS Types •AWS SQS Pricing •Cost Optimisation •Practical Coding Session

Slide 3

Slide 3 text

Message Queue A message queue provides temporary message storage that allows exchange of data between a message producer and a consumer in an asynchronous manner.

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Using a Queue System?

Slide 6

Slide 6 text

• What type of data fetching model is supported pull or push? • What is the maximum lifetime of messages or the maximum queue depth? • What happens with messages that consistently fail? Is there a dead-letter queue option? • Can messages arrive out of order relative to the order from which they were sent? Credit: Brian Zambrano (Serverless design & best practices)

Slide 7

Slide 7 text

AWS SQS

Slide 8

Slide 8 text

AWS SQS •Managed Service (Serverless) & scales automatically based on demand •You can use AWS SQS even if your app is not running inside of AWS infrastructure •Unlimited queues and messages •Retains messages up to 14 days •Message Locking (Prevents multiple consumers from processing a message at the same time) •Long Polling •Supports Batching •Dead Letter Queue (DLQ)

Slide 9

Slide 9 text

AWS SQS Types • Standard Queue • FIFO Queue

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Pricing

Slide 12

Slide 12 text

STANDARD QUEUE (PRICING) FIFO QUEUE (PRICING) First 1 million monthly requests are free First 1 million monthly requests are free $0.0000004 per request $0.0000005 per request $0.40 per 1 million requests $0.50 per 1 million requests

Slide 13

Slide 13 text

• Every API action (sending, receiving, deleting or changing message visibility) is a request. • Each 64KB chunk of message payload is billed as 1 request. A message of size 128KB will be billed as 2 requests. How SQS is Billed?

Slide 14

Slide 14 text

Cost Optimisation

Slide 15

Slide 15 text

• Use long polling • Batch your requests • Poll less frequently if you don’t need to Cost Optimisation techniques

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

Thank you :)