System Design Flashcards

1
Q

What is a single point of failure?

A

When you have a component in your system solely responsible for one thing, if it goes down that whole functionality goes down which is bad

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

Disadvantages of MySQL?

A
  1. Have to create unique index hases to serve scans quickly, and keep those indexes in memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are cons of master slave db replication?

A

All writes happen on master, SINGLE POINT OF FAILURE = MASTER

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

What are advantages of MySQL?

A
  1. Widely used and mature
  2. Clear scaling paradigms like master/slave and master/master replication, sharding.
  3. Big tech uses
  4. Fast index lookups comparable to nosql
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you make your app to handle more users?

A

Horizontal and vertical scaling

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

What are some downsides of database sharding?

A

Shard capacity/splitting, complicate joining,

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

What is database sharding and its advantages?

A

Horizontal scaling of db’s, high availability, faster queries since smaller boxes, more write throughput,

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

What is vertical scaling and its cons?

A

Increase resources/spend more money

Cons: Bottleneck + expensive

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

What is RAID-0,1,5,10?

A

Stripe data across n hard-drives
Write data in whole to each drive
Only 1/5 disks are copy/redundant

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

If using MySQL, how do you perform fast lookups repeatedly?

A

Store unique index hashes in memory

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

When deciding on a db to use, what are some things to consider?

A
  1. The amount and type of data being stored
  2. If any relationships between data’s
  3. Number of reads vs number of writes
  4. Need quick lookups?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What’s database replication?

A

Copy databases, master slaves, slaves do everything masters do

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

What is horizontal scaling and its cons?

A

Increase number of machines/servers

Cons: Need to figure out how to distribute load across servers

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

How do you handle load balancing?

A

Round-robin DNS resolving

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