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. AWS SQS Workshop
    Samuel James

    View full-size slide

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

    View full-size slide

  3. 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.

    View full-size slide

  4. Using a Queue
    System?

    View full-size slide

  5. • 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)

    View full-size slide

  6. 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)

    View full-size slide

  7. AWS SQS Types
    • Standard Queue

    • FIFO Queue

    View full-size slide

  8. 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

    View full-size slide

  9. • 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?

    View full-size slide

  10. Cost
    Optimisation

    View full-size slide

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

    View full-size slide

  12. Thank you :)

    View full-size slide