AWS Dynamo数据库吞吐量 [英] aws dynamo db throughput

查看:139
本文介绍了AWS Dynamo数据库吞吐量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于AWS DynamoDb吞吐量,我有些不了解。

There's something which I cant understand about AWS DynamoDb throughput.

让我们考虑强一致性读取。

Lets consider strongly consistent reads.

现在,我了解到,在这种情况下,每1单位容量将意味着我最多每秒可以读取4KB。

Now, I understand that in this case, 1 unit of capacity would mean I can read up to 4KB of per second.

每秒比特有点令人困惑我。如果您确切知道要读取数据的速度,则可以适当设置单位。但是,如果您对读取时间不太挑剔怎么办?

It's the "per second" bit that slightly confuses me. If you know exactly how quickly you want to read data then you can set the units appropriately. But what if you're not too fussy about the read time?

说我确实只有1个读取单位分配给我的表,而我尝试读取的是超过4KB。现在确定这意味着我的阅读将花费超过1秒的时间吗?很好,但是文档中讨论了请求失败。当我不要求在特定时间内读取数据时,AWS如何确定我使用了太多单位?

Say I do have only 1 read unit assigned to my table and I try to read an item which is more than 4KB. Now surely that just means that my read is going to take more than 1 second? That would be fine but the documentation talks about Requests failing. How can AWS determine that I used too many units when I didn't request that the data be read within a particular time?

也许我遗漏了一些明显的东西。

Maybe I am missing something obvious. Can you someone help clear this up?

推荐答案

DynamoDB在爆破容量

DynamoDB can consume up to 300 seconds of unused throughput in burst capacity.

DynamoDB中的最大项目大小为400KB,1个RCU最多可以读取4KB。

The maximum item size in DynamoDB is 400KB and 1 RCU gives you a read of up to 4KB.

假设您要读取400KB的项目大小,桌上有1个RCU。您可以每100秒检索一次该项目。

Lets say you want to read an item that is 400KB in size and you have 1 RCU on your table. You could retrieve that item once every 100 seconds.

由于突发容量,总会有一段时间您可以读取该项目,因为实际上您最多可以使用300一次性完成RCU,而不仅仅是1。

Because of burst capacity there will always be a time you can read that item, because in fact you can use up to 300 RCUs in one go, not just 1.

想象一下从400KB的项目开始表格。您需要等待100秒,而无需花费任何RCU,这样您才能获得足够的爆破能力来购买该物品。 101秒后,您发出请求,花费100个RCU并获得该物品。再过5秒钟后,您将再次发出请求,但由于节流异常而被拒绝。

Imagine starting the table with that 400KB item. You need to wait 100 seconds without spending any RCUs so that you've earned enough burst capacity to get the item. After 101 seconds you make the request, spend 100 RCUs and get the item. After another 5 seconds you make the request again, but get denied with a Throttling Exception.

因此,DynamoDB不会增加请求延迟以满足您的RCU要求。它要么尽快返回结果,要么抛出异常。

So no, DynamoDB will not increase request latency to meet your RCU provision. It either returns your results as fast as possible, or throws an exception.

编辑:顺便说一句,我应该提到所有AWS DynamoDB SDK为您处理节流异常。如果您尝试阅读某项内容,但由于没有足够的吞吐量而被拒绝,则SDK会退出并重试。因此,除非您的表确实配置不足,否则您不必担心处理节流异常。

By the way, I should mention that all AWS DynamoDB SDKs handle Throttling Exceptions for you. If you try and read an item, but get denied because you don't have enough throughput available, the SDK backs off and try again. So unless your table really is under provisioned, you shouldn't have to worry about handling Throttling Exceptions.

这篇关于AWS Dynamo数据库吞吐量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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