【问题标题】:AWS APIGateway WebSockets API returns 429AWS APIGateway WebSockets API 返回 429
【发布时间】:2020-04-11 15:59:32
【问题描述】:

我正在使用名为 Thor 的工具对今天部署在 AWS APIGateway 上的 WebSocket 服务进行负载测试。该服务使用基于 Lambda 的消息处理程序,并通过 Python3.8 中的无服务器框架进行打包和部署。连接 ID 存储在 DynamoDB 中。

我的 AWS 账户级别限制当前为 10000 个请求/秒,突发为 5000 个。

对于 2000 个并发连接,每个连接有 1 条消息,我得到以下结果:

Online               4353 milliseconds
Time taken           4353 milliseconds
Connected            1826
Disconnected         0
Failed               174
Total transferred    549.23kB
Total received       420.84kB

Durations (ms):

                     min     mean     stddev  median max
Handshaking          840     1629        666    1448 3383
Latency              103     198         150     155 859

Percentile (ms):

                      50%     66%     75%     80%     90%     95%     98%     98%    100%
Handshaking          1448    1930    2178    2297    2497    2641    3311    3336    3383
Latency              155     163     167     172     194     665     785     798     859

Received errors:

174x                 unexpected server response (429)

很明显,此时请求正在受到限制。我想知道支持 20,000 个并发 WebSocket 连接的帐户级别限制应该是多少。有时,我还会在无法从日志中调试的结果中看到 500 错误。

如果需要更多信息来回答这个问题,请告诉我。

【问题讨论】:

    标签: websocket aws-lambda aws-api-gateway


    【解决方案1】:

    API 网关每秒有 500 个 WebSocket 连接的限制。 在这里查看:https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html

    您可能会遇到这些限制。

    【讨论】:

    • 谢谢,@vijtrip2。这检查出来了。
    猜你喜欢
    • 2018-03-23
    • 1970-01-01
    • 2023-01-11
    • 2021-02-10
    • 1970-01-01
    • 2019-06-25
    • 2019-10-15
    • 2020-11-07
    • 2018-09-30
    相关资源
    最近更新 更多