AWS SNS“ maxReceivesPerSecond”策略无法按预期运行

时间:2020-09-11 05:55:33

标签: amazon-web-services amazon-sns throttling

根据AWS文档(https://aws.amazon.com/blogs/aws/new-features-for-amazon-sns-delivery-policies-and-message-formatting/

maxReceivesPerSecond –每秒最大尝试传送次数 每个订阅。

我已将值配置为1,这意味着订阅应该每秒触发1个呼叫。但是,触发20个呼叫大约需要30分钟。有人可以建议如何设置它,以便每秒触发一次API调用吗?

Pipedream log confirming that calls were received not 1 per second

如果未配置此属性(maxReceivesPerSecond),则会如下所示立即触发API调用。

Pipedream receives all APIs instantly

在这里,我的SNS策略设置为将请求的速度限制为每秒1次

{“ http”:{ “ defaultHealthyRetryPolicy”:{ “ numRetries”:3, “ numNoDelayRetries”:0, “ minDelayTarget”:20, “ maxDelayTarget”:20, “ numMinDelayRetries”:0, “ numMaxDelayRetries”:0, “ backoffFunction”:“线性” }, “ disableSubscriptionOverrides”:否, “ defaultThrottlePolicy”:{ “ maxReceivesPerSecond”:1 }}

1 个答案:

答案 0 :(得分:1)

maxReceivesPerSecond存在一个已知问题。删除限制策略,然后等待AWS解决该问题。有关详细信息,请参见https://cloudonaut.io/loosing-trust-in-aws-sns-broken-for-24-days/https://marbot.io/blog/how-to-fix-delayed-alarms.html