49. Amazon Simple Queue Service

Overview

  • Amazon Simple Queue Service (Amazon SQS) is a fully managed message queuing service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.
  • Amazon SQS moves data between distributed application components and helps you decouple these components.
  • Amazon Simple Queue Service (Amazon SQS) offers a secure, durable, and available hosted queue that lets you integrate and decouple distributed software systems and components.

Queue types

Standard queue FIFO queue

Unlimited Throughput – Standard queues support a nearly unlimited number of API calls per second, per API action (SendMessageReceiveMessage, or DeleteMessage).

At-Least-Once Delivery – A message is delivered at least once, but occasionally more than one copy of a message is delivered.

Best-Effort Ordering – Occasionally, messages are delivered in an order different from which they were sent.

High Throughput – If you use batching, FIFO queues support up to 3,000 messages per second, per API method (SendMessageBatchReceiveMessage, or DeleteMessageBatch). The 3000 messages per second represent 300 API calls, each with a batch of 10 messages. To request a quota increase, submit a support request. Without batching, FIFO queues support up to 300 API calls per second, per API method (SendMessageReceiveMessage, or DeleteMessage).

Exactly-Once Processing – A message is delivered once and remains available until a consumer processes and deletes it. Duplicates aren't introduced into the queue.

First-In-First-Out Delivery – The order in which messages are sent and received is strictly preserved.

Send data between applications when the throughput is important, for example:

  • Decouple live user requests from intensive background work: let users upload media while resizing or encoding it.

  • Allocate tasks to multiple worker nodes: process a high number of credit card validation requests.

  • Batch messages for future processing: schedule multiple entries to be added to a database.

Send data between applications when the order of events is important, for example:

  • Make sure that user-entered commands are run in the right order.

  • Display the correct product price by sending price modifications in the right order.

  • Prevent a student from enrolling in a course before registering for an account.

Queue Configuration

  • Visibility timeout – The length of time that a message received from a queue (by one consumer) won't be visible to the other message consumers.
    • The range is from 0 seconds to 12 hours.
    • The default value is 30 seconds.
  • Message retention period – The amount of time that Amazon SQS retains messages that remain in the queue. 
    • The range is from 1 minute to 14 days.
    • The default value is 4 days.
  • Delivery delay – The amount of time that Amazon SQS will delay before delivering a message that is added to the queue. 
    • The range is from 0 seconds to 15 minutes.
    • The default value is 0 seconds.
  • Maximum message size – The maximum message size for this queue.
    • The range is from 1 KB to 256 KB.
    • The default value is 256 KB.
  • Receive message wait time – The maximum amount of time that Amazon SQS waits for messages to become available after the queue gets a receive request.
    • The range is from 0 to 20 seconds.
    • The default value is 0 seconds, which sets short polling.
    • Any non-zero value sets long polling.
  • Enable content-based
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值