<i id='csAwd'><tr id='csAwd'><dt id='csAwd'><q id='csAwd'><span id='csAwd'><b id='csAwd'><form id='csAwd'><ins id='csAwd'></ins><ul id='csAwd'></ul><sub id='csAwd'></sub></form><legend id='csAwd'></legend><bdo id='csAwd'><pre id='csAwd'><center id='csAwd'></center></pre></bdo></b><th id='csAwd'></th></span></q></dt></tr></i><div id='csAwd'><tfoot id='csAwd'></tfoot><dl id='csAwd'><fieldset id='csAwd'></fieldset></dl></div>
      <legend id='csAwd'><style id='csAwd'><dir id='csAwd'><q id='csAwd'></q></dir></style></legend>

        <bdo id='csAwd'></bdo><ul id='csAwd'></ul>
    1. <tfoot id='csAwd'></tfoot>

      1. <small id='csAwd'></small><noframes id='csAwd'>

        DynamoDB 节流

        时间:2023-09-03
          <tbody id='WRWIr'></tbody>

        <small id='WRWIr'></small><noframes id='WRWIr'>

            <tfoot id='WRWIr'></tfoot>
            <legend id='WRWIr'><style id='WRWIr'><dir id='WRWIr'><q id='WRWIr'></q></dir></style></legend>
            • <i id='WRWIr'><tr id='WRWIr'><dt id='WRWIr'><q id='WRWIr'><span id='WRWIr'><b id='WRWIr'><form id='WRWIr'><ins id='WRWIr'></ins><ul id='WRWIr'></ul><sub id='WRWIr'></sub></form><legend id='WRWIr'></legend><bdo id='WRWIr'><pre id='WRWIr'><center id='WRWIr'></center></pre></bdo></b><th id='WRWIr'></th></span></q></dt></tr></i><div id='WRWIr'><tfoot id='WRWIr'></tfoot><dl id='WRWIr'><fieldset id='WRWIr'></fieldset></dl></div>
              • <bdo id='WRWIr'></bdo><ul id='WRWIr'></ul>
                1. 本文介绍了DynamoDB 节流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个 5 读和 5 写容量的发电机表.在这张表中,我有两条记录.

                  I have a dynamo table with 5 read and 5 write capacity. In this table I had two records.

                  然后我决定通过一次推送大量写入(一次突发大约 4000 条记录)来查看我会得到什么样的错误响应.蓝色的消耗"线直接越过红色的容量"线,但我没有收到任何类型的错误消息.

                  I then decided to see what kind of error response I would get by pushing a large number of writes through at once (roughly 4000 records in one burst). The blue 'consumed' line shot straight over the red 'capacity' line however I got no error message of any kind.

                  指标显示正在发生限制,但如果我超过两个容量级别,我的读取和写入仍然会发生.

                  The metrics show throttling taking place but my reads still occur and my writes still occur if I go over both capacity levels.

                  我已经花费了 30 多分钟的时间将读取和写入远远超出容量,目前还没有错误.

                  I have spent over 30 minutes pushing the read and writes well above capacity, with no error yet.

                  我不确定这是不是因为我在 node js 中使用了官方的 javascript SDK,它可能透明地处理限制并重试限制查询?

                  I'm not sure if this is because I am using the official javascript SDK in node js, which maybe transparently handles throttling and retries the throttled queries?

                  我希望有人能给我一些指导.

                  I'm hoping somebody can give me some guidance on this.

                  谢谢

                  推荐答案

                  只是想在@Luc Hendriks 的答案中添加一个关于节流的通知

                  Just wanted to add a notice about throttling to the answer by @Luc Hendriks

                  即使在您用完突发容量"并且 DynamoDb 开始节流之后,您也会相对较少地收到 ProvisionedThroughputExceededException(根据我的经验).这是因为 SDK 静默重试受限制的请求(所以您是对的,SDK 透明地处理限制).

                  Even after you are out of 'burst capacity' and DynamoDb starts throttling, you will get ProvisionedThroughputExceededException relatively rarely (as per my experience). This is because SDK silently retries throttled requests (so you were right, SDK transparently handles throttling).

                  您可以使用 maxRetries 参数来禁用自动重试,这样您就会在看到指标受到限制后立即收到 ProvisionedThroughputExceededException.

                  You can use maxRetries parameter to disable automatic retries, so that you will get ProvisionedThroughputExceededException right after you see throttling in metrics.

                  这里是一个如何在不自动重试的情况下执行更新请求的示例:

                  Here is an example how to perform an update request without automatic retries:

                  var aws_dynamodb = new aws.DynamoDB({maxRetries: 0}),
                      aws_dynamodb_doc = new aws.DynamoDB.DocumentClient({service: aws_dynamodb});
                  
                  // ...
                  aws_dynamodb_doc.update(params, function(err, data) {
                    // ...
                  });
                  

                  这篇关于DynamoDB 节流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:带有 DynamoDB 的 NodeJS 抛出错误“AttributeValue 可能 下一篇:AWS SDK DynamoDB 客户端和 DocumentClient 之间的区别?

                  相关文章

                  最新文章

                  <small id='My6M2'></small><noframes id='My6M2'>

                  <tfoot id='My6M2'></tfoot>
                2. <i id='My6M2'><tr id='My6M2'><dt id='My6M2'><q id='My6M2'><span id='My6M2'><b id='My6M2'><form id='My6M2'><ins id='My6M2'></ins><ul id='My6M2'></ul><sub id='My6M2'></sub></form><legend id='My6M2'></legend><bdo id='My6M2'><pre id='My6M2'><center id='My6M2'></center></pre></bdo></b><th id='My6M2'></th></span></q></dt></tr></i><div id='My6M2'><tfoot id='My6M2'></tfoot><dl id='My6M2'><fieldset id='My6M2'></fieldset></dl></div>

                    <bdo id='My6M2'></bdo><ul id='My6M2'></ul>

                      <legend id='My6M2'><style id='My6M2'><dir id='My6M2'><q id='My6M2'></q></dir></style></legend>