Replication and Data Consistency Flashcards

1
Q

What is the read/write coherence?

A

A READ of a variable must always be the value of the last WRITE of the same variable.

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

What is transparency in replication and consistency?

A

Users should only think one copy of a file exists.

It should look like one system.

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

What is used to achieve consistency?

A

Consistency models

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

What is a consistency model?

A

Contract between processes and data stores.

If processes obey certain rules, data store will work correctly.

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

What is a strong Consistency Model?

A

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.

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

What is a weak Consistency Model?

A

Model that doesn’t require global ordering, more relaxed guarentees on consistency.

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

What is passive/active replication?

A

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.

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

What is the passive replication process? (4)

A

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.

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

What is the active replication process? (3)

A

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.

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

What is strict consistency?

A

Requires all processes to receive responses consistent with the real value, regardless of the number of replicas.

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

What is linearisability?

A

Traces are interleaved to form a single total order (respecting local ordering)

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

What are the 2 conditions of linearisability?

A

Consistent

If t1 and t2 belong to Pi, and t1 < t2, then t1 < t2 in the combined order.

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

What is sequential consistency?

A

Read returns local copy immediately.
Write trigger TO Multicast.
Local copies on severs updated.
All replicas see the writes in the same order.

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

What is eventual consistency?

A

All replicas will eventually be consistent.

Good when inconsistency can be tolerated.

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

What guarentee is required for eventual consistency?

A

All updates are guarenteed to reach all replicas.

Update locally, and propagate in the background

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

How does eventual consistency deal with conflict?

A

Delegate to application.
Roll back to previous version.
Uss consensus to determine most recent value

17
Q

What are the advantages and disadvantages of eventual consistency?

A

Advantages: R/W fast (consensus moved to background).
Can make progress even with network partition.

Disadvantages: Weak consistency
Still need to use consensus for conflicts.

18
Q

What is a quorum?

A

A partial set of replicas intended to improve availability.

19
Q

What are the 2 required quorums in Quorum-based protocols?

A

A READ quorum, and a WRITE quorum.

20
Q

What is the requirement on the READ and WRITE quorums in a QBP?

A

They must be intersecting.

21
Q

What is the goal of QBPs?

A

For correctness, it is sufficient to read from a READ quorum and write to a WRITE quorum.

22
Q

How can a file be read in a QBP?

A

The client needs to assemble a READ quorum of R server replicas.

23
Q

How can a file be written in a QBP?

A

The client needs to assemble a WRITE quorum of W server replicas.

24
Q

What are R and W?

A
R = minimum number of nodes that must participate in a read operation.
W = minimum number of nodes that must participate in a write operation.
25
Q

What are the ffg constraints of R and W?

A

R + W > N (prevents read/write conflicts)

W > N/2 (prevents write/write conflicts)

26
Q

How can we introduce bias of availability?

A

By variying R and W.

27
Q

What is the extreme availability scheme?

A

W = N, R = 1 (used when writes are very infrequent)