Understanding RCU Limits in On-Demand Mode for DynamoDB

-1

Hello,

I'm currently exploring the use of On-Demand mode for my DynamoDB tables and have a few questions regarding Read Capacity Units (RCUs) to ensure I fully grasp the operational boundaries and avoid throttling issues.

With On-Demand mode, I understand there's an automatic scaling of throughput. However, is there a need for me to be cautious about not exceeding a threshold of 40,000 RCU per table when executing 'get_item' operations to prevent throttling?

In the scenario where I have multiple tables under my account, all of which are operating in On-Demand mode, is there an account-level RCU limit that I need to be aware of? Essentially, does AWS impose a cumulative RCU ceiling across all tables within a single account when using On-Demand mode?

Understanding these limitations is crucial for the architecture of our application, especially during high-traffic periods. I want to ensure that the database operations are smooth and without unexpected throttling incidents that could impact performance and user experience.

Thank you in advance for your insights and guidance on these queries.

Ben
asked 6 months ago405 views
2 Answers
1

With On-Demand mode, I understand there's an automatic scaling of throughput. However, is there a need for me to be cautious about not exceeding a threshold of 40,000 RCU per table when executing 'get_item' operations to prevent throttling?

40,000 RCU is a soft limit, which is known as the Table Level limit, which can be increased to any number you require. To put into context, no customer is currenlty exceeding any limits in regard to this value.

In the scenario where I have multiple tables under my account, all of which are operating in On-Demand mode, is there an account-level RCU limit that I need to be aware of? Essentially, does AWS impose a cumulative RCU ceiling across all tables within a single account when using On-Demand mode?

No, account level limits are only for provisioned mode tables. For on-demand, they only need to adhere to the table level limit mentioned above.

Understanding these limitations is crucial for the architecture of our application, especially during high-traffic periods. I want to ensure that the database operations are smooth and without unexpected throttling incidents that could impact performance and user experience.

So long as your traffic is well distributed across the keyspace, you should not see any throttling so long as the following don't occur:

  1. You don't exceed twice your previous peak within 30 minutes. Your previous peak is not something that is published, but can be assuemd based on the peak of your ConsumedReadCapacity. Consider pre-warming should you need to have a high previous peak from the beginning. Today, the previous peak remains forever.
  2. You have a hot partition, which we already covered in your last question. No single item can withstand more than 3000 RCU per second (strongly consistent).

Thank you for the articles. I also would like to know if the throttles happen, how long will it take to recover ? thanks again

You have asked this before.

  • If you have a hot item, it will never recover.
  • If you exceed twice your previous peak, it can take up to 30 minutes, with sustained elevated traffic
  • If you traffic distribution is skewed, it can take up to 30 minutes.
profile pictureAWS
EXPERT
answered 6 months ago
-1

Hello,

For tables and GSIs using on-demand mode, the table-level quota represents the maximum read and write request units available. There are no account-level quotas enforced for read/write throughput on tables using on-demand capacity. link here The Table Service quotas are adjustable, if you anticipate that your peak read request units traffic at any given time for any table in on-demand would exceed 40,000 read request units, it will be advisable to request a service quota increase.

To establish a baseline you should, at a minimum, monitor The number of read or write request units consumed over the specified time period, so you can track how much of your throughput is used for specific high traffic tables. link here

Additionally when using on-demand mode, DynamoDB instantly accommodates your workloads as they ramp up or down to any previously reached traffic level. If a workload’s traffic level hits a new peak, DynamoDB adapts rapidly to accommodate the workload. However, throttling can occur if the traffic volume is more than double the previous peak within a span of 30 minutes. One solution is to pre-warm the tables to the anticipated peak capacity of the spike.

To pre-warm the table, follow these steps in the link.

Here is a knowledge center article that provides additional insight - Why is my Amazon DynamoDB table being throttled

AWS
answered 6 months ago
profile picture
EXPERT
reviewed 6 months ago
  • Thank you for the articles. I also would like to know if the throttles happen, how long will it take to recover ? thanks again

  • The read/write request units are measured per second, so for every second you exceed the throughput quota (40,000 read request units) you would get throttled. Please note the table must have been scaled up to ~ 20,000 read request units to get throttled by the table-level throughput quotas. ( With on-demand capacity mode, the requests can burst up to double the previous peak on the table. Note that throttling can occur if the requests spikes to more than double the default capacity or the previously achieved peak request rate within 30 minutes.)

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions