Dynamo: Amazon's Highly Available Key-value Store

Authors: Giuseppe DeCandia, Deniz Hastorun, Madan Jampani, Gunavardhan Kakulapati, Avinash Lakshman, Alex Pilchin, Swaminathan Sivasubramanian, Peter Vosshall and Werner Vogels Published in: SOSP’07 Link: https://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf


Question–Answer Form

1. What is your take-away message from this paper?


2. What is the motivation for this work?


3. What is the proposed solution (hypothesis, idea, design)?


4. What is the author’s evaluation of the solution?


5. What is your analysis of the identified problem, idea, and evaluation?


6. What are the paper’s contributions?


8. What questions are you left with?

List at least three questions that remain after reading.
Avoid simple factual questions that can be answered via a quick search.


Notes

Dynamo: Amazon’s Highly Available Key-value Store, p.1

Reliability at massive scale is one of the biggest challenges we face at Amazon.com

challenges

Dynamo: Amazon’s Highly Available Key-value Store, p.1

scale, small and large components fail continuously and the way persistent state is managed in the face of these failures drives the reliability and scalability of the software systems.

motivation

Dynamo: Amazon’s Highly Available Key-value Store, p.1

Dynamo sacrifices consistency under certain failure scenarios. It makes extensive use of object versioning and application-assisted conflict resolution in a manner that provides a novel interface for developers to use.

solution using object version and assisted conflict resolution

Dynamo: Amazon’s Highly Available Key-value Store, p.1

Reliability is one of the most important requirements

motivation

Dynamo: Amazon’s Highly Available Key-value Store, p.1

operating Amazon’s platform is that the reliability and scalability of a system is dependent on how its application state is managed.

hypothesis

Dynamo: Amazon’s Highly Available Key-value Store, p.1

a particular need for storage technologies that are always available.

motivation, because Amazon consists of hundreds of services

Dynamo: Amazon’s Highly Available Key-value Store, p.1

Therefore, the service responsible for managing shopping carts requires that it can always write to and read from its data store, and that its data needs to be available across multiple data centers.

example use case for availability

Dynamo: Amazon’s Highly Available Key-value Store, p.1

Amazon’s software systems need to be constructed in a manner that treats failure handling as the normal case without impacting availability or performance

failure handling first implementation

Dynamo: Amazon’s Highly Available Key-value Store, p.1

Dynamo is used to manage the state of services that have very high reliability requirements and need tight control over the tradeoffs between availability, consistency, cost-effectiveness and performance.

Solution tradeoff

Dynamo: Amazon’s Highly Available Key-value Store, p.1

There are many services on Amazon’s platform that only need primary-key access to a data store

query pattern

Dynamo: Amazon’s Highly Available Key-value Store, p.1

A select set of applications requires a storage technology that is flexible enough to let application designers configure their data store appropriately based on these tradeoffs to achieve high availability and guaranteed performance in the most cost effective manner.

type of application that can use Dynamo

Dynamo: Amazon’s Highly Available Key-value Store, p.1

Dynamo uses a synthesis of well known techniques to achieve scalability and availability: Data is partitioned and replicated using consistent hashing [10], and consistency is facilitated by object versioning

hypothesis of how to achieve scalability and availability

Dynamo: Amazon’s Highly Available Key-value Store, p.1

The consistency among replicas during updates is maintained by a quorum-like technique and a decentralized replica synchronization protocol.

Consistency implementation

Dynamo: Amazon’s Highly Available Key-value Store, p.2

gossip based distributed failure detection and membership protocol

failure + service discovery implementation

Dynamo: Amazon’s Highly Available Key-value Store, p.2

served tens of millions requests that resulted in well over 3 million checkouts in a single day and the service that manages session state handled hundreds of thousands of concurrently active sessions

evaluation

Dynamo: Amazon’s Highly Available Key-value Store, p.2

relational database is a solution that is far from ideal. Most of these services only store and retrieve data by primary key and do not require the complex querying and management functionality offered by an RDBMS

Design motivation for not choosing RDBMS

Dynamo: Amazon’s Highly Available Key-value Store, p.2

available replication technologies are limited and typically choose consistency over availability.

limited replication of RDBMS

Dynamo: Amazon’s Highly Available Key-value Store, p.2

not easy to scale-out databases or use smart partitioning schemes for load balancing

reasons for not using RDBMS

Dynamo: Amazon’s Highly Available Key-value Store, p.2

simple query model and do not need any relational schema. Dynamo targets applications that need to store objects that are relatively small

query model motivation

Dynamo: Amazon’s Highly Available Key-value Store, p.2

Dynamo targets applications that operate with weaker consistency (the “C” in ACID) if this results in high availability. Dynamo does not provide any isolation guarantees and permits only single key updates.

motivation for dropping to weak consistency and no isolation

Dynamo: Amazon’s Highly Available Key-value Store, p.2

The tradeoffs are in performance, cost efficiency, availability, and durability guarantees.

efficiency tradeoffs

Dynamo: Amazon’s Highly Available Key-value Store, p.2

on-hostile and there are no security related requirements such as authentication and authorization

no need for security related

Dynamo: Amazon’s Highly Available Key-value Store, p.3

A common approach in the industry for forming a performance oriented SLA is to describe it using average, median and expected variance

common industry metrics

Dynamo: Amazon’s Highly Available Key-value Store, p.3

o address this issue, at Amazon, SLAs are expressed and measured at the 99.9 th percentile of the distribution. The choice for 99.9% over an even higher percentile has been made based on a cost-benefit analysis which demonstrated a significant increase in cost to improve performance

industry metrics are not good enough, Amazon aims for 99.9th percentile

Dynamo: Amazon’s Highly Available Key-value Store, p.3

availability can be increased by using optimistic replication techniques, where changes are allowed to propagate to replicas in the background, and concurrent, disconnected work is tolerated.

hypothesis of using optimistic replication

Dynamo: Amazon’s Highly Available Key-value Store, p.3

Dynamo is designed to be an eventually consistent data store; that is all updates reach all replicas eventually.

important solution of how Dynamo can achieve availability

Dynamo: Amazon’s Highly Available Key-value Store, p.3

any traditional data stores execute conflict resolution during writes and keep the read complexity simple [7]. In such systems, writes may be rejected if the data store cannot reach all (or a majority of) the replicas at a given time

traditional data store solution for conflicts

Dynamo: Amazon’s Highly Available Key-value Store, p.3

For a number of Amazon services, rejecting customer updates could result in a poor customer experience. For instance, the shopping cart service must allow customers to add and remove items from their shopping cart even amidst network and server failures.

example of why Dynamo uses read for conflict resolution

p.3

Data replication algorithms used in commercial systems traditionally perform synchronous replica coordination in order to provide a strongly consistent data access interface. To achieve this level of consistency, these algorithms are forced to tradeoff the availability of the data under certain failure scenarios.

technical problem of traditional db system

p.3

An important design consideration is to decide when to perform the process of resolving update conflicts,

important design consideration of WHEN to resolve conflicts

p.4

The next design choice is who performs the process of conflict resolution. This can be done by the data store or the application.

WHO to resolve conflicts

p.4

Systems like Pastry [16] and Chord [20] use routing mechanisms to ensure that queries can be answered within a bounded number of hops.

P2P mechanism for query

p.4

Oceanstore resolves conflicts by processing a series of updates, choosing a total order among them, and then applying them atomically in that order

how Oceanstore resolves conflicts

p.5

avoid routing requests through multiple nodes (which is the typical design adopted by several distributed hash table systems such as Chord and Pastry). This is because multihop routing increases variability in response times, thereby increasing the latency at higher percentiles.

Dynamo motivation for avoiding P2P approach

p.4

Systems like Ficus [15] and Coda [19] replicate files for high availability at the expense of consistency

expected tradeoff

p.4

These systems differ on their conflict resolution procedures. For instance, Coda and Ficus perform system level conflict resolution and Bayou allows application level resolution

difference in conflict resolutions

p.4

Antiquity is a wide-area distributed storage system designed to handle multiple server failures [23]. It uses a secure log to preserve data integrity, replicates each log on multiple servers for durability, and uses Byzantine fault tolerance protocols to ensure data consistency.

handle failures + data integrity + durability + consistency

p.4

Dynamo does not focus on the problem of data integrity and security and is built for a trusted environment.

p.4

Compared to Bigtable, Dynamo targets applications that require only key/value access with primary focus on high availability where updates are not rejected even in the wake of network partitions or server failures.

Dynamo only need key/value access

p.5

“always writeable” data store where no updates are rejected due to failures or concurrent writes

req1

p.5

Dynamo is built for an infrastructure within a single administrative domain where all nodes are assumed to be trusted

req2

p.5

do not require support for hierarchical namespace

req3

p.5

t require at least 99.9% of read and write operations to be performed within a few hundred milliseconds

req4

p.5

In addition to the actual data persistence component, the system needs to have scalable and robust solutions for load balancing, membership and failure detection, failure recovery, replica synchronization, overload handling, state transfer, concurrency and job scheduling, request marshalling, request routing, system monitoring and alarming, and configuration management

required solutions for storage system

p.5

The context encodes system metadata about the object that is opaque to the caller and includes information such as the version of the object. The context information is stored along with the object so that the system can verify the validity of the context object supplied in the put request.

system interface

p.5

One of the key design requirements for Dynamo is that it must scale incrementally.

key requirements

p.5

It applies a MD5 hash on the key to generate a 128-bit identifier, which is used to determine the storage nodes that are responsible for serving the key

how storage nodes is picked

p.6

the random position assignment of each node on the ring leads to non-uniform data and load distribution.

harder to rebalance

p.6

Second, the basic algorithm is oblivious to the heterogeneity in the performance of nodes.

bigger machines will get assigned multiple nodes

p.6

virtual node looks like a single node in the system, but each node can be responsible for more than one virtual node. Effectively, when a new node is added to the system, it is assigned multiple positions (henceforth, “tokens”) in the ring.

Dynamo implementation of consistent hashing

p.6

oad handled by this node is evenly dispersed across the remaining available nodes.

how load is balanced

p.6

The number of virtual nodes that a node is responsible can decided based on its capacity, accounting for heterogeneity in the physical infrastructure

accounts for heterogeneity

p.6

To achieve high availability and durability, Dynamo replicates its data on multiple host

needs for replication

p.6

In addition to locally storing each key within its range, the coordinator replicates these keys at the N-1 clockwise successor nodes in the ring.

what this means is if the ring is B -> C -> D, then the key not only stored in B but also C and D as well

p.6

preference list contains more than N nodes.

how replicas are used with partitions

p.6

When a customer wants to add an item to (or remove from) a shopping cart and the latest version is not available, the item is added to (or removed from) the older version and the divergent versions are reconciled later

data versioning use cases

p.6

Dynamo treats the result of each modification as a new and immutable version of the data. It allows for multiple versions of an object to be present in the system at the same time.

mechanism that guarantee eventual consistency under failure

p.6

system itself can determine the authoritative version (syntactic reconciliation).

1st method of conflict resolution

p.6

system cannot reconcile the multiple versions of the same object and the client must perform the reconciliation in order to collapse multiple branches of data evolution back into one (semantic reconciliation)

2nd method of conflict resolution

p.6

Using this reconciliation mechanism, an “add to cart” operation is never lost. However, deleted items can resurface

unwanted behavior of reconciliation mechanism

p.6

design applications that explicitly acknowledge the possibility of multiple versions of the same data (in order to never lose any updates).

applications need to be aware of multiple version for Dynamo only, not DynamoDB

p.6

Dynamo uses vector clocks [12] in order to capture causality between different versions of the same object.

because of branching in data versions

p.6

One can determine whether two versions of an object are on parallel branches or have a causal ordering, by examine their vector clocks.

check if two versions are related

p.6

In Dynamo, when a client wishes to update an object, it must specify which version it is updating

internal state of put()

p.7

Dynamo has access to multiple branches that cannot be syntactically reconciled, it will return all the objects at the leaves, with the corresponding version information in the context. An update using this context is considered to have reconciled the divergent versions and the branches are collapsed into a single new version.

conflict resolution interface

Dynamo: Amazon’s Highly Available Key-value Store, p.7

possible issue with vector clocks is that the size of vector clocks may grow if many servers coordinate the writes to an object

vector clocks size might grow too much

Dynamo: Amazon’s Highly Available Key-value Store, p.7

Dynamo employs the following clock truncation scheme: Along with each (node, counter) pair, Dynamo stores a timestamp that indicates the last time the node updated the data item. When the number of (node, counter) pairs in the vector clock reaches a threshold (say 10), the oldest pair is removed from the clock

truncation scheme for vector clock

Dynamo: Amazon’s Highly Available Key-value Store, p.7

There are two strategies that a client can use to select a node: (1) route its request through a generic load balancer that will select a node based on load information, or (2) use a partition-aware client library that routes requests directly to the appropriate coordinator nodes.

1st approach: cost steps to route request, client lighter 2st approach: client library decides how to route request directly to node but more dependency

Dynamo: Amazon’s Highly Available Key-value Store, p.7

To maintain consistency among its replicas, Dynamo uses a consistency protocol similar to those used in quorum systems. This protocol has two key configurable values: R and W. R is the minimum number of nodes that must participate in a successful read operation. W is the minimum number of nodes that must participate in a successful write operation

not strict quorum because of sloppy quorums and eventual consistency read and writes may involve different set of nodes

Dynamo: Amazon’s Highly Available Key-value Store, p.8

If Dynamo used a traditional quorum approach it would be unavailable during server failures and network partitions, and would have reduced durability even under the simplest of failure conditions

reduced durability if using strict quorum

Dynamo: Amazon’s Highly Available Key-value Store, p.8

if node A is temporarily down or unreachable during a write operation then a replica that would normally have lived on A will now be sent to node D. This is done to maintain the desired availability and durability guarantees.

hinted handoff to maintain desired availability and durability

Dynamo: Amazon’s Highly Available Key-value Store, p.8

Nodes that receive hinted replicas will keep them in a separate local database that is scanned periodically. Upon detecting that A has recovered, D will attempt to deliver the replica to A. Once the transfer succeeds, D may delete the object from its local store without decreasing the total number of replicas in the system

how hinted handoff works

Dynamo: Amazon’s Highly Available Key-value Store, p.8

Using hinted handoff, Dynamo ensures that the read and write operations are not failed due to temporary node or network failures. Applications that need the highest level of availability can set W to 1, which ensures that a write is accepted as long as a single node in the system has durably written the key it to its local store.

W to 1 = higher chance of accepted write

Dynamo: Amazon’s Highly Available Key-value Store, p.8

There are scenarios under which hinted replicas become unavailable

Dynamo: Amazon’s Highly Available Key-value Store, p.8

To handle this and other threats to durability, Dynamo implements an anti-entropy (replica synchronization) protocol to keep the replicas synchronized.

for permanent failures

Dynamo: Amazon’s Highly Available Key-value Store, p.8

detect the inconsistencies between replicas faster and to minimize the amount of transferred data, Dynamo uses Merkle trees [13].

each branch of Merkle tree can be checked independently without requiring nodes to download the entire tree

Dynamo: Amazon’s Highly Available Key-value Store, p.8

erkle trees help in reducing the amount of data that needs to be transferred while checking for inconsistencies among replica

Dynamo: Amazon’s Highly Available Key-value Store, p.8

Dynamo uses Merkle trees for anti-entropy as follows: Each node maintains a separate Merkle tree for each key range (the set of keys covered by a virtual node) it hosts. This allows nodes to compare whether the keys within a key range are up-to-date

make sure keys within a key range are up-to-date

Dynamo: Amazon’s Highly Available Key-value Store, p.8

The disadvantage with this scheme is that many key ranges change when a node joins or leaves the system thereby requiring the tree(s) to be recalculated

rebalance issues

Dynamo: Amazon’s Highly Available Key-value Store, p.8

it was deemed appropriate to use an explicit mechanism to initiate the addition and removal of nodes from a Dynamo ring.

adding nodes should be manually not automatically

Dynamo: Amazon’s Highly Available Key-value Store, p.8

A gossip-based protocol propagates membership changes and maintains an eventually consistent view of membership. Each node contacts a peer chosen at random every second and the two nodes efficiently reconcile their persisted membership change histories.

gossip-based protocol for service discovery

Dynamo: Amazon’s Highly Available Key-value Store, p.9

The mappings stored at different Dynamo nodes are reconciled during the same communication exchange that reconciles the membership change histories

how membership information is exchanged

Dynamo: Amazon’s Highly Available Key-value Store, p.9

his allows each node to forward a key’s read/write operations to the right set of nodes directly

membership facilitate read/write operations

[!PDF|yellow] Dynamo: Amazon’s Highly Available Key-value Store, p.9

Seeds can be obtained either from static configuration or from a configuration service. Typically seeds are fully functional nodes in the Dynamo ring.

seeds prevent logical partition

Dynamo: Amazon’s Highly Available Key-value Store, p.9

he mechanism described above could temporarily result in a logically partitioned Dynamo ring. For example, the administrator could contact node A to join A to the ring, then contact node B to join B to the ring. In this scenario, nodes A and B would each consider itself a member of the ring, yet neither would be immediately aware of the other.

logical partition

Dynamo: Amazon’s Highly Available Key-value Store, p.9

Decentralized failure detection protocols use a simple gossip-style protocol that enable each node in the system to learn about the arrival (or departure) of other nodes.

deprecated mechanism for service discovery

Dynamo: Amazon’s Highly Available Key-value Store, p.9

When a new node (say X) is added into the system, it gets assigned a number of tokens that are randomly scattered on the ring. For every key range that is assigned to node X, there may be a number of nodes (less than or equal to N) that are currently in charge of handling keys that fall within its token range.

rebalancing nodes

Dynamo: Amazon’s Highly Available Key-value Store, p.9

by adding a confirmation round between the source and the destination, it is made sure that the destination node does not receive any duplicate transfers for a given key range

deduplication

Dynamo: Amazon’s Highly Available Key-value Store, p.9

he main reason for designing a pluggable persistence component is to choose the storage engine best suited for an application’s access patterns.

storage engine follows access pattern

Dynamo: Amazon’s Highly Available Key-value Store, p.9

The majority of Dynamo’s production instances use BDB Transactional Data Store.

Dynamo: Amazon’s Highly Available Key-value Store, p.9

In Dynamo, each storage node has three main software components: request coordination, membership and failure detection, and a local persistence engine. All these components are implemented in Java.

Dynamo: Amazon’s Highly Available Key-value Store, p.9

The request coordination component is built on top of an eventdriven messaging substrate where the message processing pipeline is split into multiple stages similar to the SEDA architecture [24]

Dynamo: Amazon’s Highly Available Key-value Store, p.10

Although it is desirable always to have the first node among the top N to coordinate the writes thereby serializing all writes at a single location, this approach has led to uneven load distribution resulting in SLA violations. This is because the request load is not uniformly distributed across objects.

Dynamo: Amazon’s Highly Available Key-value Store, p.10

If stale versions were returned in any of the responses, the coordinator updates those nodes with the latest version. This process is called read repair because it repairs replicas that have missed a recent update at an opportunistic time and relieves the anti-entropy protocol from having to do it

Dynamo: Amazon’s Highly Available Key-value Store, p.10

he coordinator for a write is chosen to be the node that replied fastest to the previous read operation which is stored in the context information of the request.

how coordinator is chosen among top N nodes

Dynamo: Amazon’s Highly Available Key-value Store, p.10

the value of N determines the durability of each object.

Dynamo: Amazon’s Highly Available Key-value Store, p.10

he values of W and R impact object availability, durability and consistency

Dynamo: Amazon’s Highly Available Key-value Store, p.11

However, this is not necessarily true here. For instance, the vulnerability window for durability can be decreased by increasing W. This may increase the probability of rejecting request

Dynamo: Amazon’s Highly Available Key-value Store, p.11

The involvement of multiple storage nodes in read and write operations makes it even more challenging, since the performance of these operations is limited by the slowest of the R or W replicas.

Dynamo: Amazon’s Highly Available Key-value Store, p.11

Dynamo provides the ability to trade-off durability guarantees for performance. In the optimization each storage node maintains an object buffer in its main memory. Each write operation is stored in the buffer and gets periodically written to storage by a writer thread.

not flushed yet

Dynamo: Amazon’s Highly Available Key-value Store, p.11

his scheme trades durability for performance. In this scheme, a server crash can result in missing writes that were queued up in the buffer.

Dynamo: Amazon’s Highly Available Key-value Store, p.11

This section discusses the load imbalance seen in Dynamo and the impact of different partitioning strategies on load distribution

Dynamo: Amazon’s Highly Available Key-value Store, p.11

he total number of requests received by each node was measured for a period of 24 hours - broken down into intervals of 30 minutes. In a given time window, a node is considered to be “inbalance”, if the node’s request load deviates from the average load by a value a less than a certain threshold (here 15%). Otherwise the node was deemed “out-of-balance”

how requests are monitored

Dynamo: Amazon’s Highly Available Key-value Store, p.12

The tokens of all nodes are ordered according to their values in the hash space. Every two consecutive tokens define a range. The last token and the first token form a range that "wraps" around from the highest value to the lowest value in the hash space.

St1 token range

Dynamo: Amazon’s Highly Available Key-value Store, p.12

when a new node joins the system, it needs to “steal” its key ranges from other nodes. However, the nodes handing the key ranges off to the new node have to scan their local persistence store to retrieve the appropriate set of data items.

ST1 - "scan" requires IO on a production node -> resource intensive

Dynamo: Amazon’s Highly Available Key-value Store, p.12

this significantly slows the bootstrapping process and during busy shopping season, when the nodes are handling millions of requests a day, the bootstrapping has taken almost a day to complete

ST1 - bootstrapping to heavy

Dynamo: Amazon’s Highly Available Key-value Store, p.12

when a node joins/leaves the system, the key ranges handled by many nodes change and the Merkle trees for the new ranges need to be recalculated

ST1 - merkle tree need to be recalculated

Dynamo: Amazon’s Highly Available Key-value Store, p.12

Finally, there was no easy way to take a snapshot of the entire key space due to the randomness in key ranges, and this made the process of archival complicated

ST1 - hard to snapshot?

Dynamo: Amazon’s Highly Available Key-value Store, p.12

The fundamental issue with this strategy is that the schemes for data partitioning and data placement are intertwined

Dynamo: Amazon’s Highly Available Key-value Store, p.12

In this strategy, the tokens are only used to build the function that maps values in the hash space to the ordered lists of nodes and not to decide the partitioning

ST2 - data partitioning

Dynamo: Amazon’s Highly Available Key-value Store, p.12

A partition is placed on the first N unique nodes that are encountered while walking the consistent hashing ring clockwise from the end of the partition.

ST2 - data placement

Dynamo: Amazon’s Highly Available Key-value Store, p.12

he primary advantages of this strategy are: (i) decoupling of partitioning and partition placement, and (ii) enabling the possibility of changing the placement scheme at runtime

Dynamo: Amazon’s Highly Available Key-value Store, p.12

Similar to strategy 2, this strategy divides the hash space into Q equally sized partitions

Dynamo: Amazon’s Highly Available Key-value Store, p.12

When a node leaves the system, its tokens are randomly distributed to the remaining nodes such that these properties are preserved

Dynamo: Amazon’s Highly Available Key-value Store, p.12

comparing these different strategies in a fair manner is hard as different strategies have different configurations to tune their efficiency.

Dynamo: Amazon’s Highly Available Key-value Store, p.13

The load balancing efficiency of each strategy was measured for different sizes of membership information that needs to be maintained at each node, where Load balancing efficiency is defined as the ratio of average number of requests served by each node to the maximum number of requests served by the hottest node

strategies were evaluated by T and Q

Dynamo: Amazon’s Highly Available Key-value Store, p.13

ategy 3 achieves the best load balancing efficiency and strategy 2 has the worst load balancing efficienc

Dynamo: Amazon’s Highly Available Key-value Store, p.13

he nodes gossip the membership information periodically and as such it is desirable to keep this information as compact as possible.

Dynamo: Amazon’s Highly Available Key-value Store, p.13

Faster bootstrapping/recovery: Since partition ranges are fixed, they can be stored in separate files,

ST3 faster bosstrapping/recovery

Dynamo: Amazon’s Highly Available Key-value Store, p.13

ii) Ease of archival: Periodical archiving of the dataset is a mandatory requirement for most of Amazon storage services. Archiving the entire dataset stored by Dynamo is simpler in strategy 3 because the partition files can be archived separately

Dynamo: Amazon’s Highly Available Key-value Store, p.13

the tokens are chosen randomly and, archiving the data stored in Dynamo requires retrieving the keys from individual nodes separately and is usually inefficient and slow.

for ST1, have to go through all nodes

Dynamo: Amazon’s Highly Available Key-value Store, p.13

he disadvantage of strategy 3 is that changing the node membership requires coordination in order to preserve the properties required of the assignment

because of Q equally sized partitions

Dynamo: Amazon’s Highly Available Key-value Store, p.13

The first is when the system is facing failure scenarios such as node failures, data center failures, and network partitions.

infra failure

Dynamo: Amazon’s Highly Available Key-value Store, p.13

The second is when the system is handling a large number of concurrent writers to a single data item and multiple nodes end up coordinating the updates concurrently.

congestion?

Dynamo: Amazon’s Highly Available Key-value Store, p.13

Semantic reconciliation introduces additional load on services, so it is desirable to minimize the need for it.

Dynamo: Amazon’s Highly Available Key-value Store, p.13

Experience shows that the increase in the number of divergent versions is contributed not by failures but due to the increase in number of concurrent writers

Dynamo: Amazon’s Highly Available Key-value Store, p.13

Write requests on the other hand will be coordinated by a node in the key’s current preference list. This restriction is due to the fact that these preferred nodes have the added responsibility of creating a new version stamp that causally subsumes the version that has been updated by the write request

picking write coordinator

Dynamo: Amazon’s Highly Available Key-value Store, p.13

In this scheme client applications use a library to perform request coordination locally. A client periodically picks a random Dynamo node and downloads its current view of Dynamo membership state.

client side load balance

Dynamo: Amazon’s Highly Available Key-value Store, p.14

An important advantage of the client-driven coordination approach is that a load balancer is no longer required to uniformly distribute client load. Fair load distribution is implicitly guaranteed by the near uniform assignment of keys to the storage nodes

Dynamo: Amazon’s Highly Available Key-value Store, p.14

bviously, the efficiency of this scheme is dependent on how fresh the membership information is at the client. Currently clients poll a random Dynamo node every 10 seconds for membership update

Dynamo: Amazon’s Highly Available Key-value Store, p.14

. A pull based approach was chosen over a push based one as the former scales better with large number of clients and requires very little state to be maintained at servers regarding clients

pull base scale better cause of less state to maintain

Dynamo: Amazon’s Highly Available Key-value Store, p.14

stale membership for duration of 10 seconds. In case, if the client detects its membership table is stale (for instance, when some members are unreachable), it will immediately refresh its membership information

refresh when stale is detected?

Dynamo: Amazon’s Highly Available Key-value Store, p.14

The latency improvement is because the client driven approach eliminates the overhead of the load balancer and the extra network hop that may be incurred when a request is assigned to a random node

client driven approach performs better then server driven

Dynamo: Amazon’s Highly Available Key-value Store, p.14

Each node performs different kinds of background tasks for replica synchronization and data handoff (either due to hinting or adding/removing node

Dynamo: Amazon’s Highly Available Key-value Store, p.14

necessary to ensure that background tasks ran only when the regular critical operations are not affected significantly. To this end, the background tasks were integrated with an admission control mechanism

admission control mechanism?

Dynamo: Amazon’s Highly Available Key-value Store, p.14

he admission controller constantly monitors the behavior of resource accesses while executing a "foreground" put/get operation.

Dynamo: Amazon’s Highly Available Key-value Store, p.14

operation. Monitored aspects include latencies for disk operations, failed database accesses due to lock-contention and transaction timeouts, and request queue wait times

metrics to monitor

Dynamo: Amazon’s Highly Available Key-value Store, p.14

Subsequently, it decides on how many time slices will be available to background tasks, thereby using the feedback loop to limit the intrusiveness of the background activitie

timeslice for background task

Dynamo: Amazon’s Highly Available Key-value Store, p.14

Dynamo exposes data consistency and reconciliation logic issues to the developers

Dynamo: Amazon’s Highly Available Key-value Store, p.14

Dynamo adopts a full membership model where each node is aware of the data hosted by its peers

membership model ~ service discovery?

Dynamo: Amazon’s Highly Available Key-value Store, p.14

his model works well for a system that contains couple of hundreds of nodes. However, scaling such a design to run with tens of thousands of nodes is not trivial because the overhead in maintaining the routing table increases with the system size

Dynamo: Amazon’s Highly Available Key-value Store, p.3

if extensive personalization techniques are used then customers with longer histories require more processing which impacts performance at the high-end of the distribution. An SLA stated in terms of mean or median response times will not address the performance of this important customer segment.

Dynamo: Amazon’s Highly Available Key-value Store, p.9

Therefore, nodes B, C, and D will offer to and upon confirmation from X transfer the appropriate set of keys.