gpt4 book ai didi

php - DynamoDB BatchWriteItem - 没有限制?

转载 作者:行者123 更新时间:2023-12-02 21:42:01 25 4
gpt4 key购买 nike

在我的表“products_1”中,我配置了 1 个容量单位读取和 1 个容量单位写入。

我正在使用 AWS PHP SDK 通过“BatchWriteItem”将 8 个项目写入 DynamoDB。代码返回此响应:

Object(    [structure:protected] =>     [data:protected] => Array        (            [ConsumedCapacity] => Array                (                    [0] => Array                        (                            [CapacityUnits] => 8                            [TableName] => products_1                        )                )            [UnprocessedItems] => Array                (                )        ))

如您所见,它使用了 8 个容量单位,这是正确的。

但是当我检查 AWS 控制台中的监视器时,我在“Throttled Write Requests”图表中看不到任何条目。我原以为写入请求会受到限制,因为我假设“BatchWriteItem”会在一秒钟内写入 8 个项目。

我的假设错了吗?如果不是,我想知道为什么写入没有显示在“Throttled Write Requests”图表中。

最佳答案

控制台显示 5 分钟时间段内的平均值。计算已用单位的总和:8 个单位/300 秒 = 0.027 个单位/秒。看起来你没有受到限制。

引用 AWS 如何计算预置吞吐量:

Use the Sum value to calculate the provisioned throughput. For example, get the Sum value over a span of 5 minutes. Divide the Sum value by the number of seconds in 5 minutes (300) to get an average for the ConsumedWriteCapacityUnits per second. You can compare the calculated value to the provisioned throughput value you provide Amazon DynamoDB.

关于php - DynamoDB BatchWriteItem - 没有限制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20266675/

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