Replication and Data Consistency Flashcards
What is the read/write coherence?
A READ of a variable must always be the value of the last WRITE of the same variable.
What is transparency in replication and consistency?
Users should only think one copy of a file exists.
It should look like one system.
What is used to achieve consistency?
Consistency models
What is a consistency model?
Contract between processes and data stores.
If processes obey certain rules, data store will work correctly.
What is a strong Consistency Model?
Model that requires global ordering of updates.
When updates are commited, replicates need to reach agreement on global ordering.
Different models depending on guarentees of total ordering.
What is a weak Consistency Model?
Model that doesn’t require global ordering, more relaxed guarentees on consistency.
What is passive/active replication?
Passive: Client communicate with single replica, the primary, and one or more replicas act as backup.
Active: Client communicates with a group of k replicas.
What is the passive replication process? (4)
Client sends request to primary.
If primary is active it responds, otherwise Leader Election chooses new primary.
Any changes that the clients makes to the primary is shared with the backups.
Once all backups are updated, the primary responds to the client.
What is the active replication process? (3)
Client uses local copy of data.
Any changes made are propagated across the replicas using TO multicast.
Depending on Consistency Model, a read request may be forwarded to other servers before the response is generated.
What is strict consistency?
Requires all processes to receive responses consistent with the real value, regardless of the number of replicas.
What is linearisability?
Traces are interleaved to form a single total order (respecting local ordering)
What are the 2 conditions of linearisability?
Consistent
If t1 and t2 belong to Pi, and t1 < t2, then t1 < t2 in the combined order.
What is sequential consistency?
Read returns local copy immediately.
Write trigger TO Multicast.
Local copies on severs updated.
All replicas see the writes in the same order.
What is eventual consistency?
All replicas will eventually be consistent.
Good when inconsistency can be tolerated.
What guarentee is required for eventual consistency?
All updates are guarenteed to reach all replicas.
Update locally, and propagate in the background