Consistency Models Flashcards

1
Q

What do Strong Consistency Models do?

A

-Prioritize consistency over availability.
-Require global ordering of updates.
-All replicas must agree on the order of updates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do Weak Consistency Models do?

A

-Prioritize availability over consistency.
-No global ordering of updates.
-Different replicas may have different views of data, but aim for eventual consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the differences between Passive And Active Replication?

A

Passive replication allows for one replica to serve as the Primary, while others are Backups or Secondaries, clients interact solely with the primary, and if it fails a Backup takes over with Leader Election.
Active Replication clients communicate with a group of services called replicas and updates are propagated among replicas using total-order multicast.W

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Strict Consistency?

A

A write to any variable by any replica is immediately available to all other replicas.
To a client the system behaves as a single store.
Impossible to achieve in distributed system as requires instantaneous message exchange.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Linearizability?

A

-Read and writes are executed as if they are in a single linear order, despite being distributed across multiple processes.
-If an operation op1 completes before op2 begins, then op1 precedes op2, in the trace.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is linearizability implemented?

A

-Every process must have a perfectly synchronized clock.
-Message propagation delays must be bounded.
-Use total ordering multicast to ensure replicas handle reads and writes in the same order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is sequential consistency? (see example p.15))

A

-Preserves the order of writes that happen on a replica.
-The execution order between processes is undefined.
-If a write W(X)b precedes another W(x) a in a trace , then no process reading x will read R(x) a before R(x)b.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is Sequential Consistency implemented?

A

-A read operation made to a replica will return its local copy.
-A write operation will trigger a Total-Order multicast.
-Replicas respond to multicast by updating their local copy and return an acknowledgment.
-All replicas write operations in the same order and read operations return values consistently with the sequence in total-order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Casual Consistency? (see example p.18)

A

-Ensures all writes that have a casual relationship are seen by all process in the same order.
-Unrelated writes can be seen in any order.
-Order of values returned by read operations must be consistent with casual order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How is Casual Consistency implemented?

A

-Use vector timestamps.
-Write operations are multicasted to all replicas.
-On receiving multicast updates , each replica updates its local copy.
-A read uses the local copy.
-No need for synchronised physical clocks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Eventual Consistency?

A

-Updates can be propagated independently across distributed replicas.
-Replicas may temporarily have differing states due to the asynchronous updates.
-Given sufficient time without further updates, all replicas will eventually converge to the same state.
-It makes no guarantees for how long it might take , just that it will eventually happen.
-An application must be able to tolerate replicas being in an inconsistent state.
-Conflicts can occur so the application needs a way to resolve the conflicting state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How is Eventual Consistency Implemented?

A

-Update local store and propagate changes in the background.
-To deal with conflict: either reconcile conflict or roll back or delegate the application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Strong Eventual Consistency?

A

-Addresses the weaknesses of eventual consistency.
-Strong eventual consistency adds the safety guarantee that any two nodes that have received the same set of updates will be in the same state.
-Does not depend on synchronous communication.
-Updates can be applied locally and then propagated via casual multicast to other replicas.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the two types of Conflict-Free Replicated Data type?

A

Operation-based CRDTs, State-based CRDTs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a quorum?

A

A quorum is a common approach of implementing consistency across a number of replicas in a distributed datas store. It is a subset of replicas, dynamically selected during operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly