简体   繁体   English

如何自动配置dynamodb表的读写能力?

[英]How to configure automatically dynamodb table read and write capacity?

I am facing below problem:我面临以下问题:

Consumed read capacity >= 4 for 5 minutes 5 分钟内消耗的读取容量 >= 4

I need to configure capacity dynamically not static.我需要动态配置容量而不是静态的。

As Per DynamoDB UpdateTable Documentation根据DynamoDB UpdateTable 文档

UpdateTable更新表

Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.修改给定表的预配置吞吐量设置、全局二级索引或 DynamoDB Streams 设置。

UpdateTable is an asynchronous operation; UpdateTable 是一个异步操作; while it is executing, the table status changes from ACTIVE to UPDATING.在执行时,表状态从 ACTIVE 变为 UPDATING。 While it is UPDATING, you cannot issue another UpdateTable request.当它正在更新时,您不能发出另一个 UpdateTable 请求。 When the table returns to the ACTIVE state, the UpdateTable operation is complete.当表返回到 ACTIVE 状态时,UpdateTable 操作完成。

You can update ReadCapacityUnits OR WriteCapacityUnits using updateTable API as below :您可以使用 updateTable API 更新 ReadCapacityUnits 或 WriteCapacityUnits,如下所示:

{
    "TableName": "Thread",
    "ProvisionedThroughput": {
        "ReadCapacityUnits": 10,
        "WriteCapacityUnits": 10
    }
}

For Example, You can Code in a Script to Increase ReadCapacityUnits OR WriteCapacityUnits Dynamically when ServerLoad is High & Decrease if ServerLoad is low.例如,您可以在脚本中编写代码以在 ServerLoad 高时动态增加ReadCapacityUnitsWriteCapacityUnits ,如果 ServerLoad 低则减少。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM