gpt4 book ai didi

amazon-dynamodb - Dynamodb 自动缩放的速度不够快

转载 作者:行者123 更新时间:2023-12-04 08:03:07 37 4
gpt4 key购买 nike

我正在运行一个简单的 api,它在每次调用时从 dynamodb 表中获取一个项目,我将自动缩放设置为最小值 25 和最大值 10 000。

但是,如果我使用 wrk 或 hey 之类的工具发送 15 000 个请求,我会得到大约 1000 502 个,

  • dynamodb 的指标显示读取受到限制
  • 表中的扩展事件日志显示 RCU 已扩展到 99,但不超过该值
  • lambda 日志显示该函数开始需要更长的时间,通常需要大约 20 毫秒才能运行,但该函数开始运行 500.1500,3000 毫秒并开始超时(我假设这是由节流引起的)

  • 为什么自动缩放不能更好地工作?它最多只能扩展到 99 个 RCU,但我的最大值是 10, 000。

    最佳答案

    来自:http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html

    您定义的“目标利用率”是什么?

    Target utilization is the ratio of consumed capacity units to provisioned capacity units, expressed as a percentage. Application Auto Scaling uses its target tracking algorithm to ensure that the provisioned read capacity of ProductCatalog is adjusted as required so that utilization remains at or near 70 percent.



    另外,我认为自动缩放对您不起作用的主要原因是您的工作可能不会长时间保持高位:

    “DynamoDB Auto Scaling 仅在实际工作负载持续升高(或降低)持续几分钟时才会修改预配置的吞吐量设置”

    DynamoDB auto scaling modifies provisioned throughput settings only when the actual workload stays elevated (or depressed) for a sustained period of several minutes. The Application Auto Scaling target tracking algorithm seeks to keep the target utilization at or near your chosen value over the long term. Sudden, short-duration spikes of activity are accommodated by the table's built-in burst capacity. For more information, see Use Burst Capacity Sparingly.

    关于amazon-dynamodb - Dynamodb 自动缩放的速度不够快,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47496755/

    37 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com