Real time Database Dynamodb - Scaling Error

0

We have an application for taxi ride, and we use a DynamoDB table. There's a table that is heavily and unpredictably read from for the available captains. This table is causing scalability (Scale up and down) issues, so we want to know if it's best to use On-Demand to solve this problem or if there's another solution.

Enter image description here

Enter image description here

Enter image description here

asked a month ago123 views
2 Answers
2
Accepted Answer

I'm concerned about the amount of freedom you give your application to scale up, 50 RCU and 80 WCU is not a lot and you state you're having scalability issues.

Based on your long period of very little traffic, it would make sense to use on-demand mode. On-demand will allow you to scale to 4,000 WCU and 12,000 RCU instantly, with no autoscaling in place. That will completely erase any scaling issues that you are having.

profile pictureAWS
EXPERT
answered a month ago
1

Update: Please refer to the above answer from Leeroy. My answer did not take into account the absolute amount of requests. On-demand capacity mode is able to handle this out-of-the box.


Hi Fady,

When using Provisioned capacity mode, scaling is achieved by DynamoDB creating CloudWatch alarms for you and acting upon these. If the increase in traffic happens within a very short amount of time, the alarm might not be able to scale in time.

Auto scaling can be triggered when two data points breach the configured target utilization value within a one-minute span. Therefore, auto scaling can take place because the consumed capacity is above target utilization for two consistent minutes.

If you use On-Demand capacity mode, it can instantly accommodates up to double the previous peak traffic on a table (see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.PeakTraffic)

If you need more than double your previous peak on table, DynamoDB automatically allocates more capacity as your traffic volume increases to help ensure that your workload does not experience throttling. However, throttling can occur if you exceed double your previous peak within 30 minutes.

However, a better solution for a read-heavy workload might be the use of caching via DynamoDB Accelerator which is an in-memory cache. Please see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.html for more details

profile pictureAWS
EXPERT
answered a month ago
  • Now we are using Provisioned capacity and utilization as shown in the image. Is it better to switch to On Demand or stick with Provisioned capacity? Also, should I use DAX with Provisioned or On Demand?

  • With very spiky workloads, neither provisioned nor on-demand might be able to scale in time. I would first try to integrate DAX with the current solution to see the impact.

  • With very spiky workloads, neither provisioned nor on-demand might be able to scale in time. I would first try to integrate DAX with the current solution to see the impact.

    Most of the information in the answer is good, however this is incorrect.

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