Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS SQS Workshop

AWS SQS Workshop

Samuel James

February 03, 2020
Tweet

More Decks by Samuel James

Other Decks in Technology

Transcript

  1. Agenda •Introduction •Choosing a Queue System •AWS SQS •AWS SQS

    Types •AWS SQS Pricing •Cost Optimisation •Practical Coding Session
  2. 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.
  3. • 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)
  4. 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)
  5. 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
  6. • 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?
  7. • Use long polling • Batch your requests • Poll

    less frequently if you don’t need to Cost Optimisation techniques