- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Dyanmo;Dynamo;It sacrifices strong consistency for availability: always writable
Incremental scalability
Symmetry: every node should have the same set of responsibilities as its peers
Decentralization
Heterogeneity;Data partitioning
Replication
Data versioning
Dynamo API
Membership management;Service Level Agreements (SLA);Data Partitioning;If size of data exceeds the capacity of a single machine: partitioning
Sharding data (horizontal partitioning).
Consistent hashing is one form of automatic sharding.;hash(Fatemeh) = 12
hash(Ahmad) = 2
hash(Seif) = 9
hash(Jim) = 14
hash(Sverker) = 4;Load ImbalanceConsistent hashing may lead to imbalance.;Load ImbalanceConsistent hashing may lead to imbalance.;Load Balancing via Virtual Nodes;Advantages of using virtual nodes;Replication;Updates are propagated asynchronously.
Each update/modication of an item results in a new and immutable version of the data.
Multiple versions of an object may exist.
Replicas eventually become consistent.;Version branching can happen due to node/network failures.
I Use vector clocks for capturing causality, in the form of (node, counter)
If causal: older version can be forgotten
If concurrent: conflict exists, requiring reconciliation;Data Versioning Example;get(key)
Return single object or list of objects with conflicting version and context.
put(key, context, object)
Store object and context under key.
Context encodes system metadata, e.g., version number.
Client can send the request:
To the node responsible for the data (coordinator): save on latency, code on client
To a generic load balancer: extra hope
Coordinator generates new vector clock and writes the new version locally.;Coordinator generates new vector clock and writes the new version locally.
Send to N nodes.
Wait for response from W nodes.
Using W=1
High availability for writes
Low durability;Coordinator requests existing versions from N.
Wait for response from R nodes.
If multiple versions, return all versions that are causally unr
文档评论(0)