Nic Acton
  • My Gitbook
  • My Favorite Things
    • Podcasts
    • Newsletters
  • Monthly Summaries
    • May 2019
    • June 2019
  • Cloud Computing
    • Cloud Concepts
    • AWS
      • Certified Solutions Architect
      • Well Architected Framework
        • Operational Excellence
        • Reliability
        • Performance Efficiency
        • Cost Optimization
        • Security
      • Analytics
        • Elasticsearch Service
        • Kinesis
        • Elastic MapReduce (EMR)
      • Compute Services
        • Elastic Beanstalk
        • Elastic Container Service (ECS)
      • Deployment
        • CloudFormation
      • Application Services
        • Key Management Service (KMS)
        • Simple Queue Service (SQS)
        • API Gateway
        • Simple Work Flow (SWF)
        • Amazon MQ
        • Simple Notification Service (SNS)
      • Simple Storage Service (S3)
        • Macie
      • Databases
        • RDS
        • DynamoDB
        • ElastiCache
        • Neptune
        • Redshift
      • Cloudfront
      • IAM
      • Monitoring
        • Trusted Advisor
        • Amazon Inspector
        • AWS Config
        • AWS Shield
        • CloudWatch
          • VPC Flow Logs
        • CloudTrail
        • Guard Duty
      • Route53
      • Serverless Architectures
        • Lambda
      • VPC
        • Highly Available & Fault Tolerant VPCs
        • Hybrid Environments
          • VPC Peering
          • Direct Connect
        • Cloud HSM
    • GCP
    • Azure
    • HashiCorp
    • Red Hat
      • RHEL
        • Basics
        • Grep & Regex
        • SSH
      • Ansible
    • Tutorials/Guides
      • Linux
        • Admin
  • Software Engineering
    • Machine Learning
      • Deep Learning
        • Tensorflow
      • Training and Loss
    • Programming
      • APIs
    • Security
    • Web Development
      • OSI 7 Layer Model
    • Tutorials/Guides
      • Apache Server
    • Virtualization
      • Virtual Machines
      • Containers
      • Serverless
  • Fitness
    • Nutrition
      • Diets
      • Macronutrients
      • Supplements
      • Miscellaneous
    • Strength Training
    • BodyBuilding
  • Miscellaneous
    • Technology Ethics
      • Education
    • Interesting Concepts
      • Libertarian Paternalism
Powered by GitBook
On this page
  • Decoupled Architecture
  • Tightly Coupled System
  • Loosely Coupled/Decoupled Systems
  • Essentials
  • Polling
  • Facts
  • SQS Workflow

Was this helpful?

  1. Cloud Computing
  2. AWS
  3. Application Services

Simple Queue Service (SQS)

Queuing of "messages" between components as a service to ensure architectures without component-order reliance.

Decoupled Architecture

Tightly Coupled System

  • A system architecture of components that are not just linked together but are also dependent upon each other.

  • If one component fails, all components fail

Loosely Coupled/Decoupled Systems

  • Multiple components that can process information without being connected

  • Components are not connected - if one fails the rest of the system can continue processing (fault tolerant/highly available)

  • AWS Services that are used for distributed/decoupled system architectures:

    • SWF (Simple Work Flow Service)

    • SQS (Simple Queue Service)

Essentials

  • Provides the ability to have hosted/highly available queues that can be used for messages being sent between servers.

  • Creation of distributed/decoupled application components

  • Used to create decoupled application environments

  • Messages between servers are retrieved through polling

Polling

  • Long Polling (1-20 seconds):

    • Allows the SQS service to wait until a message is available in a queue before sending a response, and will return all messages from all SQS services.

    • Long polling reduces API requests (over using short polling)

  • Short Polling

    • SQS samples a subset of servers and returns messages from just those servers

    • Will not return all possible messages in a poll

    • Increases API requests (over long polling), will increase costs

Facts

  • Each message can have up to 256KB of text (any format). For larger messages, use S3.

  • Amazon SQS offers two different types of queues:

    • Standard Queue: Guarantees delivery of each message at least once but does not guarantee the order (best effort) in which they are delivered to the queue

      • Also has At-least-once delivery: will guarantee delivery at least once, but possibly actually more time (duplicates)

    • First-in-first-out (FIFO) Queue: Designed for applications where the order of operations and events is critical, or where duplicates can't be tolerated. Limited to 300 transactions per second.

  • Visibility Timeout - how long messages are invisible after it has been polled

  • Stores messages up to 14 days, then moved to "dead letter queue" if it was never processed

  • Queues allow components of your applications to work independently of each other (Decoupled!)

SQS Workflow

  • Generally a "worker" instance will "poll" a queue to retrieve waiting messages for processing.

  • Auto Scaling can be applied based off of queue size so that if a component of your application has an increase in demand, the number of work instances can increase.

PreviousKey Management Service (KMS)NextAPI Gateway

Last updated 6 years ago

Was this helpful?