Yogita Misal
1 min readApr 28, 2024

Common Facts of Dynamodb

Provisioned Throughput : ReadCapacityUnit Vs WriteCapacityUnit

  1. Read Throughput:

DynamoDB calculates read capacity based on 4 KB item size.

Since your item size is 153 KB, each strongly consistent read operation consumes ⌈153/4⌉=39 RCUs. If you’re performing eventually consistent reads, it would consume half of that, so 39/2=20 RCUs per read operation.

  1. Write Throughput:

DynamoDB calculates write capacity based on 1 KB item size.

Therefore, each write operation for your 153 KB item consume 153/1 = WCUs.

ProvisionedThroughput: { ReadCapacityUnits: 5, 
WriteCapacityUnits: 5 }

Javascript visualiser : https://www.jsv9000.app/

Can we create multiple indices on same table?

Yes, we can create multiple secondary indexes on the same DynamoDB table. Secondary indexes allow us to query the data in different ways than the primary key, providing flexibility in accessing your data.

DynamoDB supports two types of secondary indexes:

  1. Global Secondary Indexes (GSI): A GSI is an index with a partition key and an optional sort key that is different from those on the table. GSIs allow querying on non-primary key attributes. Each GSI has its own provisioned throughput settings.
  2. Local Secondary Indexes (LSI): An LSI is an index that has the same partition key as the table but a different sort key. LSIs are limited to tables with composite primary keys. LSIs share the provisioned throughput settings with the table.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Unlisted

Yogita Misal
Yogita Misal

No responses yet

Write a response