Consistency and
Replication
Why replicate?
• Data replication: a common technique in distributed systems
• Reliability
• If one replica is unavailable or crashes, use another
• Protect against corrupted data
• Performance
• Scale with the size of the distributed system (replicated web servers)
• Scale in geographically distributed systems (web proxies)
• Key issue: need to maintain consistency of replicated data
• If one copy is modified, others become inconsistent
Data-Centric Consistency Models
The general organization of a logical data store,
physically distributed and replicated across
multiple processes
• Consistency Model (aka consistency semantics or constraints)
• Contract between processes and the data store
• If processes obey certain rules, the data store will work correctly
• All models attempt to return the results of the last write for a read operation
• Differ in how “last” write is determined/defined
Consistency Model Diagram Notation
• Wi(x)a – a write by process ‘i’ to item ‘x’ with a value of ‘a’. That is, ‘x’ is
set to ‘a’.
• (Note: The process is often shown as ‘Pi’).
• Ri(x)b – a read by process ‘i’ from item ‘x’ producing the value ‘b’. That
is, reading ‘x’ returns ‘b’.
• Time moves from left to right in all diagrams.
I. Data-Centric Consistency Models
a. Strict Consistency
• Any read on a data item x returns a value corresponding to the result
of the most recent write on x. (regardless of where the write
occurred).
• Problem: relies on absolute global time
• With Strict Consistency, all writes are instantaneously visible to all processes,
and absolute global time order is maintained throughout the DS.
b. Sequential Consistency
• Any valid interleaving of read and write operations is acceptable and all
processes see the same interleaving of operations
• Weaker than strict consistency
c. Causal Consistency
d. FIFO Consistency
II. Client-Centric Consistency Models
• The previously studied consistency models concern themselves with
maintaining a consistent (globally accessible) data store in the
presence of concurrent read/write operations
• Another class of distributed data stores is that which is characterized
by the lack of simultaneous updates.
• Here, the emphasis is more on maintaining a consistent view of things
for the individual client process that is currently operating on the data
store.
Client-Centric Consistency Models
Replica Management
1. Replica Placement
2. Update Propagation
2. Update Propagation
• Design issues
• State versus Operations
• Pull versus Push Protocols
• Unicasting versus Multicasting