AWS DynamoDB
1) Amazon DynamoDB
-NoSQL
-fast, predictable performance
-seamless scalability
-hardware scalowanie
-scales throught capability
-synchronisty replicate data across 3 AZ facility in region
↑avability
↑durability
-supports PUT/GET + primary key
-primary :
*only required for items in table
*unigly identiufies each item
2) Read consistency
a) eventual consistent reads (default)
-max read throughput
-might not reflect results of a complete write
-consistency within a sec
b) strongly consistent reads
3) Inplace atomic update:
-fast
-you increment or decrement a numeric attribute in a new wing a single API call
-you can atomically add or remove sets, lists, or maps.
4) Why on SSD
-low latancy
-accessing data at any scale
-high 10 in low price
5) Cost:
-request
-data store
Not for large data rare access -> S3
6) Flexible quering:
-on non -primary key attributes
*Global Secondary Indexes
*Local Secondary Indexes
7) Primary key:
a) single attribute partition key:
-np. "UserID" this allow you to quicly read & write data for on item associated with given UserID
b) composite attribute partion - sort key
-indexes as a partition key element and a sort key element
-this multiport key mainta in a hierching beetwen first and second element values
-np. "UserID" (partion) & "timestamp"(sort)
Holding the partition key element const you can search across sort key element to retrive items.
This would allow you to use the Query API to retrive all items for a single UserID across a range off timestamps.
Inserting Items - APIs:
-PutItem
-BatchWriteItem
Get Items:
-Get Item
-BatchGetItem
-> If composite primary keys are enable & in use -> Query API can retrive added items
8) Conditional operation (Conditional Expression)
a) boolen functions:
-ATRIBUTE_EXIST
-CONTAINS
-BEGINS_WITH
b) Compration operation
=
<>
<
>
<=
>=
BETWEEN
IN
c) logical operators
NOT
OR
AND
9) optimistic concurrency control systems
-> przed komitem baza sprawdza czy inna tranzakcja nie została skomitowana bez zatrzymywania
KeyConditionExpression parametr -> filtering results based on values primary key via API Query
Dynamo DB allows atomic increment and decrement operations on scalar values.
10)
SimpleDB
DynamoDB
11) Data models
a) Table
-collection of data items
-unlimited number of items
-schem-less -don't need attributes
-each table must
-each table must have primary key (single or double attribute)
b) Item
-composed of primary or composed key and flexible number of attributes
-size 1b -> 400kB
c) Attribute
12) APIs
CreateTable
UpdateTable
DeleteTable
DescribeTable
ListTable
PutItem
BachWriteItem -> to 25 item, total size of regular 16MB
UpdateItem
DeleteItem
GetItem
BatchGetItem -> max 100 items, max size 16M
Query
Scan
-> single response max 1MB
Scan(iterator)
-supports
*eventual consistent reads - default
*consistent reads
-single batch max size 1MB
-read units required is the number of bytes fetched by the scan operation rounded to the nearest 4KB, devided 4KB
Scanning a table with consistent reads consumes 2x read capacity as a scan with eventual consistent reads
Supports:
-Number
-String
-Binary
-Bool
-Number Set
-String Set
-Binary Set
-Heterogenous List
-Heterogenous Map
-Null
13) Datas structure
-key-value
-document data
keyvalues store - database service that support for:
-storing
-quering
-updating collection
inditify using a key and value
document store - provides support for:
-storing
-quering
-updating collection
in document format such as JSON, XML, HTML
Document SDV - data types wrapper for JavaScript that allows easy interoperability between JS and dynamoDB datatypes
14) Scalability, availability, and durability
-No limit on amount of stored data
-throughput
ok. 10 000 write/s
10 000 reads/s
*increasing throughput
**autoscaling
**API
high uptime + high durability -> replicates synchronaulty across 3 AZ
15)DynamoDB Autoscaling
3 configurable settings for autoscaling:
1. target utylization (deafult 70% allowed range 20-80% +/- 1%)
2. minimum capacity (1 unit - deafult)
3. maximum capacity (dependencies from tegas)
Monitoring DynamoDB Autoscaling:
-"capacity" tab
-CloudWatch "metric" tab
16)
17)
18)
19)
20)
21)
22)
23)
-NoSQL
-fast, predictable performance
-seamless scalability
-hardware scalowanie
-scales throught capability
-synchronisty replicate data across 3 AZ facility in region
↑avability
↑durability
-supports PUT/GET + primary key
-primary :
*only required for items in table
*unigly identiufies each item
2) Read consistency
a) eventual consistent reads (default)
-max read throughput
-might not reflect results of a complete write
-consistency within a sec
b) strongly consistent reads
3) Inplace atomic update:
-fast
-you increment or decrement a numeric attribute in a new wing a single API call
-you can atomically add or remove sets, lists, or maps.
4) Why on SSD
-low latancy
-accessing data at any scale
-high 10 in low price
5) Cost:
-request
-data store
Not for large data rare access -> S3
6) Flexible quering:
-on non -primary key attributes
*Global Secondary Indexes
*Local Secondary Indexes
7) Primary key:
a) single attribute partition key:
-np. "UserID" this allow you to quicly read & write data for on item associated with given UserID
b) composite attribute partion - sort key
-indexes as a partition key element and a sort key element
-this multiport key mainta in a hierching beetwen first and second element values
-np. "UserID" (partion) & "timestamp"(sort)
Holding the partition key element const you can search across sort key element to retrive items.
This would allow you to use the Query API to retrive all items for a single UserID across a range off timestamps.
Inserting Items - APIs:
-PutItem
-BatchWriteItem
Get Items:
-Get Item
-BatchGetItem
-> If composite primary keys are enable & in use -> Query API can retrive added items
8) Conditional operation (Conditional Expression)
a) boolen functions:
-ATRIBUTE_EXIST
-CONTAINS
-BEGINS_WITH
b) Compration operation
=
<>
<
>
<=
>=
BETWEEN
IN
c) logical operators
NOT
OR
AND
9) optimistic concurrency control systems
-> przed komitem baza sprawdza czy inna tranzakcja nie została skomitowana bez zatrzymywania
KeyConditionExpression parametr -> filtering results based on values primary key via API Query
Dynamo DB allows atomic increment and decrement operations on scalar values.
10)
SimpleDB
-storage limitation 10 GB
-request letancy / typicaly under 25 writes/
-castumen partion and reportmertion data
+query flexibility
+for smaller workloads
DynamoDB
-item lb -> 400 kB
-structured data
S3
-object to 5TB
-unstructured
11) Data models
a) Table
-collection of data items
-unlimited number of items
-schem-less -don't need attributes
-each table must
-each table must have primary key (single or double attribute)
b) Item
-composed of primary or composed key and flexible number of attributes
-size 1b -> 400kB
c) Attribute
12) APIs
CreateTable
UpdateTable
DeleteTable
DescribeTable
ListTable
PutItem
BachWriteItem -> to 25 item, total size of regular 16MB
UpdateItem
DeleteItem
GetItem
BatchGetItem -> max 100 items, max size 16M
Query
Scan
-> single response max 1MB
Scan(iterator)
-supports
*eventual consistent reads - default
*consistent reads
-single batch max size 1MB
-read units required is the number of bytes fetched by the scan operation rounded to the nearest 4KB, devided 4KB
Scanning a table with consistent reads consumes 2x read capacity as a scan with eventual consistent reads
Supports:
-Number
-String
-Binary
-Bool
-Number Set
-String Set
-Binary Set
-Heterogenous List
-Heterogenous Map
-Null
13) Datas structure
-key-value
-document data
keyvalues store - database service that support for:
-storing
-quering
-updating collection
inditify using a key and value
document store - provides support for:
-storing
-quering
-updating collection
in document format such as JSON, XML, HTML
Document SDV - data types wrapper for JavaScript that allows easy interoperability between JS and dynamoDB datatypes
14) Scalability, availability, and durability
-No limit on amount of stored data
-throughput
ok. 10 000 write/s
10 000 reads/s
*increasing throughput
**autoscaling
**API
high uptime + high durability -> replicates synchronaulty across 3 AZ
15)DynamoDB Autoscaling
3 configurable settings for autoscaling:
1. target utylization (deafult 70% allowed range 20-80% +/- 1%)
2. minimum capacity (1 unit - deafult)
3. maximum capacity (dependencies from tegas)
Monitoring DynamoDB Autoscaling:
-"capacity" tab
-CloudWatch "metric" tab
16)
17)
18)
19)
20)
21)
22)
23)
Komentarze
Prześlij komentarz