如何自动扩展 Amazon DynamoDB 吞吐量? [英] How to auto scale Amazon DynamoDB throughput?

查看:26
本文介绍了如何自动扩展 Amazon DynamoDB 吞吐量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Amazon DynamoDB 不提供基于动态负载自动调整吞吐量的内置功能.它提供 API 来增加或减少吞吐量.客户按小时收取预置读取和写入吞吐量.

Amazon DynamoDB doesn’t provide inbuild capabilities to auto tune throughput based on Dynamic Load. It provide API to increase or Decrease throughput. Customers are being charges hourly basis for provisioned read & write throughput.

有哪些不同的方法可以改变 dynamodb 的吞吐量并实现成本节约效益?

What are the different ways to alter throughput of dynamodb and achieve cost saving benefits ?

推荐答案

Chris的回答是准确的.只是从之前使用 DynamoDB 的经验中补充几点……

The answer from Chris is an accurate answer. Just to add a few points from prior experience using DynamoDB …

DynamoDB 的情况与 EC2 不同.弹性计算服务有一个由 Amazon 作为 Web 服务直接支持的 API,允许您根据一些逻辑(例如存在多少需求)来编程如何扩大或缩小规模.您可以通过定义监控阈值并自动触发组中实例的创建或删除来对此进行编程.

The situation with DynamoDB is different from EC2. The elastic compute service has an API supported directly as a web service by Amazon to allow you to program how to scale up or down according some logic such as how much demand exists. You program this by defining a monitoring threshold and automatically triggering creation or deletion of instances in a group.

数据服务器的工作方式与触发器不同,无法调整其容量.但是 DynamoDB 的容量非常灵活,可以像 Chris 指出的那样进行控制.提供此功能的 API 足以进行一次更改.或从控制台进行等效的手动更改.

Data servers do not work in the same way with triggers to adjust their capacity. But the capacity of DynamoDB is very flexible and may be controlled as Chris has pointed out. The API to provide this is good enough to make one off changes. Or equivalent manual changes from the console.

使用 DynamoDB 编程创建和更新操作的不同语言绑定在这里……

The different language bindings to program create and update actions with DynamoDB is here …

http://docs.aws.amazon.com/cli/latest/reference/dynamodb/index.html

修改容量的重要操作在这里……

The important operation to modify capacity is here …

http://docs.aws.amazon.com/cli/latest/reference/dynamodb/update-table.html

因此,这使您能够增加或减少 ProvisionedThroughput 的 ReadCapacityUnits 或 WriteCapacityUnits.

So this gives you the ability to make an increase or decrease in the ReadCapacityUnits or WriteCapacityUnits of ProvisionedThroughput.

这对于预测的或一次性的更改来说很好.但这与允许您自动触发更改的灵活性工具不​​同.

Which is fine for a predicted or one-off change. But that is not the same thing as a flexibility tool to allow you to trigger the change automatically.

以编程方式,您最可能想要做的是调整容量以响应前一个时间间隔内的利用率变化.特别是,您可能需要通过定义适当的时间段以及触发的上下限来快速扩大规模以应对需求激增.

Programmatically, what you are most likely to want to do is to adjust capacity in response to change in utilization in the preceding time interval. In particular you may need to scale up rapidly in response to a surge in demand by defining an appropriate time slot and a lower and upper threshold to trigger.

这里描述了一个更完整的解决方案……

A more complete solution to achieve this is described here …

https://aws.amazon.com/blogs/aws/auto-scale-dynamodb-with-dynamic-dynamodb/

该解决方案由 Sebastian Dahlgren 维护,所有说明都可以在 ...

The solution is maintained by Sebastian Dahlgren and may be found with all instructions at …

https://github.com/sebdah/dynamic-dynamodb

我看到当前版本是 1.18.5,比我上次使用它时更新.

I see that the current release is 1.18.5 which is more recent than when I last used it.

从早期版本来看,通过 dynamodb.conf 属性样式文件进行配置很简单……

Judging from earlier releases it is simple to configure by means of a dynamodb.conf properties style file …

提供凭据和区域后,最关键的设置是

Having provided credentials and region, the most crucial settings are

  • check-interval — 以秒为单位测试吞吐量
  • min-provisioned-reads, max-provisioned-reads;读取阈值上限,读取阈值下限;increase-reads-with, reduction-reads-with——这些都是百分比
  • min-provisioned-writes, max-provisioned-writes;写入阈值上限,写入阈值下限;increase-writes-with, reduction-writes-with — 这些都是百分比
  • check-interval — to test throughput in seconds
  • min-provisioned-reads, max-provisioned-reads; reads-upper-threshold, reads-lower-threshold; increase-reads-with, decrease-reads-with — These are all percentages
  • min-provisioned-writes, max-provisioned-writes; writes-upper-threshold, writes-lower-threshold; increase-writes-with, decrease-writes-with — These are all percentages

这些信息是最新的吗?

如果您查看 http://aws.amazon.com/new/,您只会看到另外一个最近的影响 DynamoDB 的更改会影响存储的文档.Dynamic DynamoDB 的条目是最后发布的涉及扩展操作的条目.所以这是目前维护最好的 DynamoDB 自动伸缩能力.

Well if you look at http://aws.amazon.com/new/ you will see just one additional recent change affecting DynamoDB which affects the documents stored. The entry for Dynamic DynamoDB is the last published entry dealing with scaling actions. So this is the best maintained DynamoDB automatic scaling capability at this time.

这篇关于如何自动扩展 Amazon DynamoDB 吞吐量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆