6 - Consistency and Replication Flashcards
Why Replicate data?
System Performance- lowered latency
System Reliability
Data Consistency
Corrrectness of Data according to a model
Read-write conflict
Two read operations on the same data that read different values
Write-Write Conflict
Two concurrent write operations on same data result in different versions
Data centric consistency model
Specifies what is allowed and what the results of read/write ops are in presence of concurrency
Data store model
Distributed storage collection
Read/Write
Read one, write all (datastores)
Consistency
Tight Consistency
Synchronous Replication
Update every replica before next op
Problems of Tight Consistency
Replicas must agree on next operation
Requires a lot of comms
Delay before next operation.
Consistent Ordering
In terms of what processes work on
Processes work on different copies of the same data
Sequentially Consistent
Any result is the same as if the operations of all processes were executed in some sequential order
All processes execute operations in the issued order
Causally Consistent
causally related writes are exec in same order by all processes
all operations are executed by all processes in the order of issuing
FIFO Consistent
individual processes operations are exec by all in the order they were issued
Hierarchy of Consistencies
(Top Down)
Tight
Sequential
Causal
FIFO
Eventual Consistency
Weak consistency model where no or rare parallel write accesses.
Updates are forwarded at some point.
All eventually consistent
Critical Section
Processes must acquire lock to access critical sections
Continuous Consistency
Divide data into consistency units
Non uniform consistency model