System Design and Scaleability Questions

Get Started. It's Free
or sign up with your email address
Rocket clouds
System Design and Scaleability Questions by Mind Map: System Design and Scaleability Questions

1. Handling the Questions

1.1. Communicate

1.2. Go broad first

1.2.1. consider

1.2.1.1. easy to use

1.2.1.1.1. clients

1.2.1.1.2. owners

1.2.1.2. flexibility

1.2.1.3. scalability and efficiency

1.3. Use the whiteboard

1.3.1. help interviewer follow your proposed design

1.4. Acknowledge interviewer concerns

1.4.1. validate them

1.4.1.1. make changes accordingly

1.5. Be careful about assumptions

1.5.1. State them explicitly

1.6. Estimate when necessary

1.7. Drive

1.7.1. ask questions

1.7.1.1. be open about tradeoffs

1.7.1.1.1. go deeper

2. Design

2.1. Systems (SMraDIR)

2.1.1. Scope the Problem

2.1.1.1. what exactly you need to implement

2.1.1.1.1. list major features

2.1.2. Make Reasonable Assumptions

2.1.2.1. Evaluate "product sense"

2.1.3. Draw the Major Components

2.1.3.1. What the system might look like

2.1.3.2. Walk through from end-to-end to provide a flow

2.1.3.2.1. Pretend to ignore major scaleability challenges at the moment

2.1.4. Identify the Key Issues

2.1.4.1. What will be the bottlenecks or major challenges?

2.1.5. Redesign for the Key Issues

2.1.5.1. Be open about limitations in your design

2.2. Algorithms (AMaGS)

2.2.1. Ask Questions

2.2.2. Make Believe

2.2.2.1. pretend that data can fit on one machine

2.2.2.2. provide the general outline for your solution

2.2.3. Get Real

2.2.3.1. How much data can fit on one machine?

2.2.3.2. What problems will occur when you split up the data?

2.2.4. Solve problems

2.2.4.1. a solution can remove or mitigate an issue

2.2.4.2. Mind iterative approach

2.2.4.2.1. Solve problems as they emerge

3. Key Concepts

3.1. Horizontal vs. Vertical Scaling

3.1.1. Vertical

3.1.1.1. increasing the resources of a specific node

3.1.2. Horizontal

3.1.2.1. increasing number of nodes

3.2. Load Balancer

3.2.1. software

3.2.1.1. application

3.2.1.2. DNS based

3.2.2. hardware

3.2.2.1. routers

3.3. Database Denormalization and NoSQL

3.3.1. to avoid joins

3.4. Database Partitioning (Sharding)

3.4.1. Vertical Partitioning

3.4.1.1. by feature

3.4.1.1.1. if one db gets very large you might need to repartition db

3.4.2. Key-Based (or Hash-Based) Partitioning

3.4.2.1. adding new servers means reallocating all data

3.4.3. Directory-Based Partitioning

3.4.3.1. lookup table can be a single point of failure

3.4.3.1.1. consider ranges and duplicating the table

3.4.3.2. accessing the table impacts performance

3.5. Caching

3.5.1. in-memory

3.5.1.1. between your app layer and your data store

3.6. Asynchronous Processing & Queues

3.6.1. pre-process

3.6.1.1. notifying when the process is done

3.7. Networking Metrics

3.7.1. Bandwidth (bit/s, Gbits/s)

3.7.1.1. Max amount of data that can be transferred in a unit of time

3.7.1.1.1. Best conditions

3.7.2. Throughput

3.7.2.1. Actual amount of data that is transferred in time

3.7.2.1.1. In real

3.7.3. Latency

3.7.3.1. How long it takes data to go from one end to the other

3.7.3.2. Delay between the sender and receiver

3.8. MapReduce

3.8.1. Map

3.8.1.1. Takes in some data and emits a <key,value> pair

3.8.2. Reduce

3.8.2.1. Takes a key and a set of associated values and "reduces" them, emitting a new key and value

3.8.2.1.1. The result can be reduced again

4. Considerations (FARS-RW)

4.1. Failures

4.1.1. Plan for many or all of them

4.2. Availability

4.2.1. Uptime / Total time

4.2.1.1. operational availability->

4.2.1.2. function of the percentage of time the system is operational

4.3. Reliability

4.3.1. Mean Time Between Failure (MTBF) = total time in service / number of failures

4.3.2. Failure Rate = number of failures / total time in service

4.3.3. a reliable machine has high availability but an available machine may or may not be very reliable

4.4. Security

4.5. Read-heavy vs. Write-heavy

4.5.1. caching vs queuing up the writes

5. Demonstrate you can analyse the problems