DynamoDB

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Limits

256 Tables per account per region No limit on size of table US East - N. Virginia Per Table - 40K RCU/ 40KWCU Per Account - 80K RCU/80KWCU All other regions Per Table - 10K RCU/10K WCU Per Account - 20K RCU/20K WCU

DynamoDB

Amazon DynamoDB is a fast and flexible NoSQL database service for all applications that need consistent, single-digit millisecond latency at any scale. It is a fully managed database and supports both document and key-value data models. Its flexible data model and reliable performance make it a great fit for mobile, web, gaming, ad-tech, loT, and many other applications.

DynamoDB Tables

Are schema-less, each item can have its own distinct attributes No complex queries or joins are supported Key must exist in all items An item consists of primary or composite key and and a flexible # of attributes An item must be less than 400KB Items are similar to rows in databases and the tables can have millions of items. Attributes are like columns and a fundamental data element that doesnt need to be broken down further. Items larger than 400KB can be stored in S3 as objects and referenced in the table. Data is indexed by primary key, which is the only requirement so as to create a unique item in the table. GET / PUT ops using the primary key A primary key can consist of two attributes to form a unique key. Attributes can be nested ( Address:Street,zip..) Up to 32 levels of nesting is supported

DynamoDB Durability + Performance

Automatic replication across three facilities (NOT AZs) in an AWS region for HA and durability. Allows inter-region replication Auto-partitions DB over sufficient # of servers based on your provisioned Read/write capacity Performance automatic failover in case of failure

DynamoDB+Redshift+EMR

Copy data from DynamoDB (noSQL) to Redshift by first creating the table in Redshift and be able to perform complex queries on the data EMR is large scale parallel computing and when used with Hive (Hive QL) can read and write from DynamoDB to 1. Query DynamoDB with a SQL like language 2. Copy data to/from S3 bucket 3. Copy data to/from Hadoop file system 4. Perform join operations on DynamoDB tables

DynamoDB Streams + Lambda

Enable DynamoDB streams that Lambda can poll to run a function

Read Consistency

Eventual (Default): A read might not reflect the latest results on recently completed write operations Best read throughput Eventual consistency across all copies is reached in 1 second Strong Consistency Returns a result that reflects all writes that received a success response prior to the read. Block any reads until a write Ok is received from all copies. Requests can ask for Strong/Eventual.

Scaling

Push Button Scaling Scale up anytime Scale down - 4 times during a calendar day No limit on amount of items that can be stored Max 10K Read/Write CUs per table - Contact AWS for increasing it DynamoDB will throttle requests above the limit of your provisioned throughout. The request fails with a HTTP 400 error which tells apps to slowdown.

Read and Write Capacity Units

Read and Write capacity units 1 RCU = 2 Reads/sec (Eventual - 4KB ) = 8KB/s 1 RCU = 1 Read/sec (Strong - 4KB) = 4KB/s 1 WCU = 1 Write/sec ( 1KB) = 1KB/s No fractions i.e. 1KB to 4KKB item = 1 RCU 6KB item = 2 RCU

Data Type

Unstructured: Email, documents, presentation, webpages, video or audio files Semi-structured: not relational but has some organization. E.g. CSV, JSON, XML Structured: high degree of organization that allows seamless inclusion in a relational database. i.e. it follows a schema and have relational keys Non-relational databases use a variety of of data models including document, graph, key-value, and columnar

DynamoDB auto scaling

Uses the AWS Application Auto Scaling service to dynamically adjust provisioned throughput capacity on your behalf, in response to actual traffic patterns. This enables a table or a global secondary index to increase its provisioned read and write capacity to handle sudden increases in traffic, without throttling. When the workload decreases, Application Auto Scaling decreases the throughput so that you don't pay for unused provisioned capacity.

Pricing

You pay for provisioned throughput (hourly rate) regardless of actual usage Indexed data storage Internet data transfer (cross region) 25RCU and 25 WCU free tier per account

Choosing the Right DynamoDB Partition Key & Best Practices

if your access pattern exceeds 3000 RCU or 1000 WCU for a single partition key value, your requests might be throttled with a ProvisionedThroughputExceededException error. Recommendations for partition keys Use high-cardinality attributes. Use composite attributes to build unique values Cache the popular items: DAX accelerator caching unusually popular records. Add suffix to large writes of same partition key. Date based data should be split into tables for days, weeks, months Store more frequently accessed data in separate table


संबंधित स्टडी सेट्स

NURS172: Assessment PrepU Misses

View Set

Functional area 01—Business Management

View Set

Mastering A&P, Chapter 19, Blood Vessels and Circulation

View Set

Midterm 1, Developmental Psychopathology, Chapter 4- Assessment, Diagnosis, and Treatment, Chapter 6: Autism Spectrum Disorder and Childhood-onset Schizophrenia, Dev Psychopathology Final, Developmental Psychopathology, Developmental Psychopathology,...

View Set

8.2 Customer Relationship Management

View Set

Intro to biology semester 1 final

View Set

Ch. 4: Prenatal Development and Birth

View Set

PL7 - Secretions of Small & Large Intestines

View Set