Saturday, May 2, 2020

DynamoDB Details




  • Amazon DynamoDB has a default limit of 20 global secondary indexes per table, in practice, you can index across far more than 20 data fields




Basic of Dynamodb:

  1. https://medium.com/tensult/core-concepts-of-amazon-dynamodb-a265a3fc70a (Basic ***)

Local Secondary Index vs Global Secondary Index
  1. https://stackoverflow.com/questions/56265577/dynamodb-local-secondary-index-vs-global-secondary-index
  2. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SecondaryIndexes.html ( Dynamodb official difference)
  3. https://stackoverflow.com/questions/55484683/dynamodb-table-index-design-gloabl-index-or-local/55485322#5548532 (***)
Differences:
  • LSIs cannot be modified or deleted without deleting and recreating the whole table. GSIs can be created/removed at any time with no impact to the main table.
  • LSIs cause you to have a limit of 10 GB of data per partition key. Without a LSI, there is a limit of 10 GB per partition, but you won’t notice that because DynamoDB can split your data for a single partition key across multiple partitions if necessary.
  • When using a LSI, the 400kb item size limit applies to the item plus all of its LSI projections. An item in a GSI is counted separately from the item in the main table.
  • Provisioned capacity of GSIs can be scaled independently of the main table, whereas LSIs share the same capacity as the base table.



  • Fast retrieval
  • Auto scaling to control costs
  • Query and scanning allow for different use cases
  • Can get very expensive very fast
  • Sharding and hot spotting are hidden problems that can cause ALOT of head ache
  • Not relational or transactional at all

Single-Table Design for a application:




calculate RCU and WCU with the data
https://stackoverflow.com/questions/42494900/how-to-calculate-read-capacity-unit-and-write-capacity-unit-for-dynamodb/42520860 (***********)



What is throttling(Rejected) in DynamoDB?
AWS DynamoDB Throttling. In a DynamoDB table, items are stored across many partitions according to each item's partition key. ... When a request is made, it is routed to the correct partition for its data, and that partition's capacity is used to determine if the request is allowed, or will be throttled(Rejected)


Getting Started with Amazon Web Services | A Complete Beginner Roadmap



No comments:

Post a Comment