【以下的问题经过翻译处理】 你好,我刚刚使用 AWS IoT 中的 SearchIndex 操作实现了获取我们物联网设备在线状态的 API。在测试期间,这个操作运行得很好,但当投入生产后,它立刻失败了。我当时尝试从控制台手动执行 SearchIndex 操作,并获取了以下错误信息:
> aws iot search-index --index-name "AWS_Things" --query-string "thingName:xxx" --profile yyy
An error occurred (ThrottlingException) when calling the SearchIndex operation (reached max retries: 2): Rate exceeded
我该如何找出当前此操作的限制速率是多少?
我在文档中找到了一份限制速率列表,但找不到任何与 IoT Index 相关的内容:
https://docs.aws.amazon.com/general/latest/gr/iot-core.html#throttling-limits
从日志中我们发现,API 当时每秒被击中约 90 次。我们目前大约有 430K 设备。
我们可以通过在我们的设备端上进行一些缓存来减少负载,但如果不知道限制是多少,很难知道这是否能够满足要求。
也许有更好的方法来查询设备的在线状态?