Unlike Single-Master Database, every data has Read & Write permission with every user, and it updates data with each other.
Data structures
DynamoDB uses hashing and B-trees to manage data. Upon entry, data is first distributed into different partitions by hashing on the partition key. Each partition can store up to 10GB of data and handle by default 1,000 write capacity units (WCU) and 3,000 read capacity units (RCU).[12] One RCU represents one strongly consistent read per second or two eventually consistent reads per second for items up to 4KB in size.[11] One WCU represents one write per second for an item up to 1KB in size.
To prevent data loss, DynamoDB features a two-tier backup system of replication and long-term storage.[13] Each partition features three nodes, each of which contains a copy of that partition's data. Each node also contains two data structures: a B tree used to locate items, and a replication log that notes all changes made to the node. DynamoDB periodically takes snapshots of these two data structures and stores them for a month in S3 so that engineers can perform point-in-time restores of their databases.
Within each partition, one of the three nodes is designated the "leader node". All write operations travel first through the leader node before propagating, which makes writes consistent in DynamoDB. To maintain its status, the leader sends a "heartbeat" to each other node every 1.5 seconds. Should another node stop receiving heartbeats, it can initiate a new leader election. DynamoDB uses the Paxos algorithm to elect leaders.
Amazon engineers originally avoided Dynamo due to engineering overheads like provisioning and managing partitions and nodes.[7] In response, the DynamoDB team built a service it calls AutoAdmin to manage a database.[13] AutoAdmin replaces a node when it stops responding by copying data from another node. When a partition exceeds any of its three thresholds (RCU, WCU, or 10GB), AutoAdmin will automatically add additional partitions to further segment the data.[12]
Just like indexing systems in the relational model, DynamoDB demands that any updates to a table be reflected in each of the table's indices. DynamoDB handles this using a service it calls the "log propagator", which subscribes to the replication logs in each node and sends additional Put, Update, and Delete requests to indices as necessary.[13] Because indices result in substantial performance hits for write requests, DynamoDB allows a user at most five of them on any given table.
from https://en.wikipedia.org/wiki/Amazon_DynamoDB
'BYU-Broadcast > ScreenSharing' 카테고리의 다른 글
[ScreenSharing] Write Unit+Integration Tests with Docker (0) | 2022.04.22 |
---|---|
[ScreenSharing] Process Env (0) | 2022.04.19 |
[ScreenSharing] BYU-Broadcasting System (0) | 2022.04.15 |
[ScreenSharing] This sprint's task (Mock Axios) (0) | 2022.04.13 |
[BYUB] ScreenSharing 4/7/2022 (0) | 2022.04.08 |