Lecture 7 Flashcards

1
Q

What are the two types of scaling?

A

Vertical and Horizontal scaling

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

Horizontal scaling

A

Adding more servers to your application to spread the load.

  • Can make use of non-demand cloud server architectures.
  • Facilitates redundancy - having each layer running on multiple servers means that if any single machine fails, your application keeps running.
  • Requires more complicated software and architecture.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Vertical scaling

A

Add more RAM, processors, bandwidth, or storage to a a machine.

  • Quick and east way to get your application’s level of service back up to standard. Will only get you so far.
  • Upgrading a single server beyond a certain level can become very expensive and often involves downtime and comes with an upper limit.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

CAP theorem meanings:

A
  • Consistency
  • Availability
  • Partition tolerance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Consistency

A

A consistent view of data on all nodes of the distributed system.

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

Availability

A

Demands the system ti eventually answer every request, even in case of failures.

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

Partition tolerance

A

The system is resilient to message losses between nodes.

A partition is an arbitrary split between nodes of a system, resulting in complete message loss in between.

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

Partitioning (Definition)

A

Separating one table’s rows into multiple different tables.

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

Types of partitioning

A
  1. Range based
  2. Key based
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Partitioning explanation

A

Partitioning may be stored on different table spaces, which can be on different storage tiers. (RAM/SSD/HD)
- Partitions can be compressed using different compression schemes.

  • Local indexes can be dropped for some partitions.
  • Table statistics can be frozen on some partitions, while being periodically refreshed on others.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Partitioning explanation

A

Partitioning may be stored on different table spaces, which can be on different storage tiers. (RAM/SSD/HD)
- Partitions can be compressed using different compression schemes.

  • Local indexes can be dropped for some partitions.
  • Table statistics can be frozen on some partitions, while being periodically refreshed on others.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Distributed Partitions are also known as..

A

Sharding

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

Distributed Partitions / Sharding

A
  • Storage and badwidth constraints
  • Scale read and write capacity
  • Geolocation: Proximity, Privacy and data protection laws.
  • Higher Availability (losing a single shard vs losing all connection)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Distributed Partitions / Sharding

A

Sharding key needed, the value used to determine to which database to connect.

  • Smaller reference tables may need to be replicated to all shards, a strategy is needed for how these tables can be modified and changes propagated to all shards.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Distributed DBMS - Parallel Database

A
  • Nodes are physically close to each other.
  • Nodes are connected via high-speed LAN.
  • The communication cost between nodes is assumed to be small. As such, one does not need to worry about nodes crashing or packets getting dropped when designing internal protocols.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Distributed DBMS - Distributed Database

A
  • Nodes can be far from each other.
  • Nodes are potentially connected via a public network, which can be slow and unreliable.
  • The communication cost and connection problems cannot be ignored.
16
Q

NoSQL Hashed Sharding

A

Since records have no relations and cannot be joined, there are no transactions.
We can use a hash-function to distribute the data, this evenly distributes the data across clusters.

17
Q

Leader-Follower Replication

A

Check online.

  • Replicas of databases, where follower replicas, can only execute read-only queries.
18
Q

Replication Synchronous

A

Check online.

19
Q

Distributed databases: Linearizability

A

Check online.