Consistency in Distributed Systems

download Consistency in Distributed Systems

If you can't read please download the document

Transcript of Consistency in Distributed Systems

Consistency in Distributed Systems

Shane K JohnsonCITYECH, Inc.March 31, 2010

Outline

Physical Distribution

CAP TheoremBASE

ConsistencyEventual Consistency

Consistent Hashing

Consensus Protocols

Vector Clocks

Physical Distribution

Replicated

Partitioned

Both

CAP Theorem

Brewer's ConjectureEric Brewer

ACM Symposium on the Principles of Distributed Computing (PODC)

July 19th 2000

Brewer's TheoromFormally Proved by Seth Gilbert/Nancy Lynch

MIT

2002

CAP Theorem

Consistent"...the C in ACID...a preset contraint of distributed systems that multiple values for the same piece of data are not allowed..."

Available

Partition Tolerant

BASE

Alternative to ACIDBrewer

SOSP Article

1997

BASE

Basically

Available

Soft State

Eventually Consistent

Consistency

StrongAfter the update completes, any subsequent access will return the updated value.

WeakThe system does not guarantee that subsequent accesses will return the updated value. Inconsistency Windows

EventualThe storage system guarantees that if no new updates are made to the object, eventually all accesses will return the last updated value.

Eventually Consistent

Werner Vogels CTO, Amazon

Eventual ConsistencyCasual

Read Your Writes

SessionSession Based Read Your Writes

Monotonic ReadOnce a process has seen a particular value, it will never see an older one.

Monotonic WriteWrites by the same process are serialized.

Eventually Consistent

N = # Nodes

W = # Replicas to Acknowledge Update

R = # Replicas Contacted for Read

Strong (W + R > N)Synchronous Master/Master N=2, W=2, R=1

Weak/Eventual (W + R