Week 10 L1 Flashcards

1
Q

What is CAP theorem?

A

States that a distributed database system can simultaneously guarantee at most two out of three of :
Consistency, availability, and partition tolerance.

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

What is CAP consistency?

A

In distributed databases, to maintain consistency, every read gets the most recent data, and every write is durable.

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

What is eventual consistency?

A

Eventual consistency allows some nodes to be out of date but hey will catch up quickly.

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

What is Strict consistency

A

consistency means that every read, no matter which replica it is made from gives the same answer. This requires writes to propagate fully to every replica node before a read can take place. This is not always necessary!

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

How do you ensure a user can read their Writes?

A

Use sticky sessions.

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

What are sticky sessions?

A

A session between a user and a node can be maintained so the interaction is consistent, although this will reduce the efficiency of workload balancing.

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

What do we mean by Read/Write availability?

A

When writes need to go through a master node by reads can go through slaves, availability depends on the type of request. A read can be available, but a write might be unavailable.

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

What do we mean by partition tolerance?

A

Database can be partition tolerant if it allows the loss of either consistency or availability when it is partitioned.
It can keep consistency by making some nodes unavailable.
Or stay available but accept it will be inconsistent.
When there are no partitions, it is possible for database to be both consistent and available but not guaranteed.

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

What is read/write Quora ?

A

can reduce the waiting time for updating propagation to replicas by making a trade off between reads and writes.
Write to 3 replicas then read from 1 (pick any)
Write to 2 then read from 2 (pick most recent)
Write to 1 then read from 3 ( pick most recent)

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