Where to start? Flashcards
1
Q
You are given a prompt. Start here with these 7 steps.
A
- Clarify Requirements / Functionality
- Scale and Data Estimation
- System Interface Definition
- Define Data Model
- High-level Design
- Detailed Design
- Identify and Resolve Bottlenecks
2
Q
- Clarify Requirements / Functionality
A
- what is the in-depth functionality?
- what can the users do?
- what data needs to be stored?
- Who/What/When/Where/Why/How?
- which characteristic of Distributed Systems need to be
prioritized?
3
Q
- Scale and Data Estimation
A
- estimate scale of system
- how much storage is needed?
- expected network bandwidth usage?
- this is where you will get information to make informed
decision on Scaling, Partitioning, Load Balancing, and
Caching
4
Q
- System Interface Definition
A
- define what APIs are expected
- Twitter example:
- PostTweet(user_id, tweet_data, time_stamp)
- generateTimeline(user_id, user_location)
5
Q
- Define Data Model
A
- clarify how data flows between components
- identify system entities and their interactions
- this is where you will get information to make informed
decisions on data management: storage, transportation,
encryption, partitioning
-Twitter example:
- User: userId, Name, Email, LastLogin, etc
- tweet: tweetID, content, numLikes, timestamp, etc
- userFollow: userID1, userID2, etc
- relational or non-relational database?
- what kind of block storage?
- where do you store which type of data?
6
Q
- High-level Design
A
- this is where you draw a high-level drawing of the different
parts of the system and how they interact. - think about potential bottlenecks, but don’t need to
resolve them yet. - Twitter example:
- multiple application servers to serve all read/write
requests, with load balancers in front of traffic
distributions. - back-end: efficient db that can store all the tweets and
support large number of reads. - distributed file storage system for storing photos and
data.
- multiple application servers to serve all read/write
- clients –> load balancer –> application servers –> data
bases and file storage
7
Q
- Detailed Design
A
- ask interviewer which major components to dig deeper
into. typically will be 2-3. - present different approaches and their pros and cons,
consider tradeoffs, and explain your choice. - consider load balancing, caching, SQL v NOSQL, and
Data partitioning
8
Q
- Identify and Resolve Bottlenecks
A
- are there any single points of failures, and how to mitigate
them? - do we have enough data replicas?
- do we have enough copies of different services running
so that failures wont prevent shutdown? - how are we monitoring the performance of the system?