4A_Replication & Partitioning Flashcards
What are the reasons for replication?
Performance:
- Scale in size; more capacity
- Scale geographically; Closer to client = lower latency
Redundancy:
- Have other copies when a component fails
Redundancy vs Availability?
Availability also means ability to progress, not only read data but also able to do writes
Definition of CAP?
Consistency, Availability and Partition Resistance
What are the different consistency models?
Linearisability
Sequential consistency
Causal Consistency
Eventual Consistency
What is linearisability?
Clients see atomic writes in same order
What is sequential consistency?
Clients see writes in same order
What is causal consistency?
Clients see causally related writes in same order, unrelated writes possibly in different order.
What is eventual consistency?
Eventually all replicas converge.
Clients may see differences meanwhile.
Arguments linearisability
Global lock on replicas
Not scalable
Arguments Sequential Consistency
Need total order on writes
Hard, but some capacity possible. Use MutEx solutions
Arguments causal consistency
Causal relations via vector clocks.
Hard, need per-process info
Arguments against consistency in general?
Does not scale
Slow and expensive
Replication Protocols?
Primary / Backup
Active Replication
Quorum Based
What is primary / backup replication protocol?
Primary is implicit sequencer. Variations: - Send write operations to backups - Send result of write operation to backups - Send invalidation to backups
What is active replication protocol?
All replicas perform the write operation
Need explicit sequencer / total ordering