| by Arround The Web | No comments

How to Implement Autoscaling for Amazon DynamoDB Tables?

AWS offers a variety of different services which include databases. There are various options of databases made available for the user to choose from. One of the popularly used Database includes DynamoDB table.

This article covers the following aspects:

What is DynamoDB?

DynamoDB falls under the category of non-relation or no SQL databases. DynamoDB table is your go-to option for high-traffic web apps such as e-commerce apps, gaming apps, etc. The schema defined for the DynamoDB table is flexible as compared to other non-relational databases.

Learn more about DynamoDB tables at: “What is Amazon DynamoDB & Which Features Does it Offer?

The DynamoDB table is based on the key-value pair mechanism. Keys are the unique source of identifiers that determine a specific value in a table. To learn more about creating tables and items in the AWS DynamoDB table, refer to this article: “How to Create Items in AWS DynamoDB?.

What is Meant by Autoscaling?

Auto-scaling is one of the most important yet crucial factors and components of the AWS. It refers to the methodology in which the service is efficient enough to intelligently scale up or down an application based on the traffic pattern; hence dynamically adjusting the provisioned throughput capacity without the need of user supervision.

This feature is enabled on many services of AWS such as EC2, DynamoDB, etc. In this article, we will demonstrate enabling autoscaling on the DynamoDB Table.

How to Implement Autoscaling for Amazon DynamoDB Tables?

Enabling DynamoDB auto-scaling allows a table to manage its provisioned read or write capacity for different traffic patterns. For example, the user has defined maximum and minimum read/write capacities for the DynamoDB table. Enabling this feature will allow the database to configure and scale the operations within the prescribed capacity along with handling the traffic at the application efficiently.

Step 1: DynamoDB Table Dashboard

You can access the DynamoDB table Dashboard from the sidebar by clicking on the “Tables” option:

Step 2: Select Table

Click on the table’s name “Customer” to open the configuration settings:

Step 3: Additional Settings

By selecting the name of the table, a new interface containing different options is displayed. Select the “Additional settings” option as highlighted below screenshot:

Step 4: Edit Settings

On the next interface, click on the “Edit” button under the Read/write capacity:

Step 5: Select the Capacity Mode

In the Capacity mode, select the “Provisioned” option to manage and optimize cost by allocating the read/write capacity:

Step 6: Read Capacity

In the “Read capacity” section, select the “On” option to enable the auto-scaling read capacity:

We can configure both or either one of these capacities depending upon the preference and requirements. Once the read/write capacities are enabled, we can configure the minimum and maximum throughput capacities.

This configuration of the minimum or maximum utilization capacity can also be referred to as the “scaling policy for the dynamo dB table”. Target utilization refers to the percentage of consumed provision throughput capacity:

Step 7: Write Capacity

Similarly, we can also enable the “Write capacity” for the auto-scaling:

This auto-scaling feature utilizes a Target Tracking algorithm which keeps track of provisioned read/write capacity and scales the application accordingly.

After configuring the read/write capacity according to your requirements, click on the “Save changes” button at the bottom of the interface to embed changes:

Again, on the Tables dashboard, click on the table’s name:

Select the “Additional settings” option from the various options displayed:

In the “Additional settings” interface, scroll down and locate the “Auto scaling activities” section. After enabling the auto-scaling, it will automatically display various auto-scaling activities in this interface:

That is all from this guide.

Conclusion

To enable autoscaling in the DynamoDB table, select the table, and edit the read/write capacities in the “Additional settings”  tab by clicking the “Edit” button. The auto-scaling feature in any service of AWS prevents the application from crashing under high traffic. It can manage the traffic efficiently based on the provided capacities. It scales up or down the application within the prescribed capacities. This article is a comprehensive step-by-step guide for implementing autoscaling in the DynamoDB tables.

Share Button

Source: linuxhint.com

Leave a Reply