Why 4 SQS FIFO with not batch to reach 1000 msg/sec during a peak demmand and not 2 SQS FIFO each with a btach of 2 msgs?

huangapple go评论55阅读模式
英文:

Why 4 SQS FIFO with not batch to reach 1000 msg/sec during a peak demmand and not 2 SQS FIFO each with a btach of 2 msgs?

问题

Hi guys,我想澄清一个疑问。这个问题的解决方案有点具有争议性。

Ok,你可以在批处理模式下使用4个SQS FIFO,达到每秒1200条消息的速率。

但是我可以使用2个SQS FIFO,每个批处理中有2条消息,也可以达到相同的每秒1200条消息的速率。我只是按照解决方案的理由来做,如果每个批次中有10条消息,那么每秒可以处理3000条消息,那么有2条消息的批次就是每秒600条消息。为什么不呢?
难道我漏掉了什么吗?

英文:

Hi guys I would like to take out a doubt. The solution to this question is a little bit controversial.
Why 4 SQS FIFO with not batch to reach 1000 msg/sec during a peak demmand and not 2 SQS FIFO each with a btach of 2 msgs?

Ok, You can use 4 SQS FIFO in batch mode and reach the rate of 1200 msg/sec.

But I could use 2 SQS FIFO in batch mode each with a batch of 2 messages reaching the same 1200 msg/sec. I just follow the solution reason, If each with a batch of 10 has a batch of 3000 msg/sec, then with a batch of 2 messages then 600msg/sec.
Why not?
Did not I get something?

答案1

得分: 3

根据Amazon Simple Queue Service中的高吞吐量队列与消息相关的配额,FIFO队列的限制是每秒300个(ReceiveMessage)操作。

如果您有1000条消息/秒:

  • 1000 / 300 = 3.33,四舍五入 => 需要每批处理4条消息,以处理1000条消息/秒。
  • 您的每批2条消息将仅导致读取600条消息/秒。

这些限制是每个队列的,不是每个队列的消费者的,也不是所有队列的总和。

英文:

According to High throughput for FIFO queues - Amazon Simple Queue Service and Quotas related to messages
the limit of FIFO is 300 (ReceiveMessage) operations / second.

If you have 1000 messages / s:

  • 1000 / 300 = 3.33, round it up => 4 messages per batch required to process 1000 messages / s.
  • Your 2 messages per batch would only result in 600 messages / s being read.

These limits are per queue, not per consumer of a queue and not across all queues.

huangapple
  • 本文由 发表于 2023年2月7日 00:35:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/75364101.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定