Link : https://leetcode.com/discuss/career/229177/My-System-Design-Template [@Topcat]
(1) FEATURE EXPECTATIONS [5 min]
(1) Use cases
(2) Scenarios that will not be covered
(3) Who will use
(4) How many will use
(5) Usage patterns
(2) ESTIMATIONS [5 min]
(1) Throughput (QPS for read and write queries)
(2) Latency expected from the system (for read and write queries)
(3) Read/Write ratio
(4) Traffic estimates
- Write (QPS, Volume of data)
- Read (QPS, Volume of data)
(5) Storage estimates
(6) Memory estimates
- If we are using a cache, what is the kind of data we want to store in cache
- How much RAM and how many machines do we need for us to achieve this ?
- Amount of data you want to store in disk/ssd
(3) DESIGN GOALS [5 min]
(1) Latency and Throughput requirements
(2) Consistency vs Availability [Weak/strong/eventual => consistency | Failover/replication => availability]
(4) HIGH LEVEL DESIGN [5-10 min]
(1) APIs for Read/Write scenarios for crucial components
(2) Database schema
(3) Basic algorithm
(4) High level design for Read/Write scenario
(5) DEEP DIVE [15-20 min]
(1) Scaling the algorithm
(2) Scaling individual components:
-> Availability, Consistency and Scale story for each component
-> Consistency and availability patterns
(3) Think about the following components, how they would fit in and how it would help
a) DNS
b) CDN [Push vs Pull]
c) Load Balancers [Active-Passive, Active-Active, Layer 4, Layer 7]
d) Reverse Proxy
e) Application layer scaling [Microservices, Service Discovery]
f) DB [RDBMS, NoSQL]
> RDBMS
>> Master-slave, Master-master, Federation, Sharding, Denormalization, SQL Tuning
> NoSQL
>> Key-Value, Wide-Column, Graph, Document
Fast-lookups:
-------------
>>> RAM [Bounded size] => Redis, Memcached
>>> AP [Unbounded size] => Cassandra, RIAK, Voldemort
>>> CP [Unbounded size] => HBase, MongoDB, Couchbase, DynamoDB
g) Caches
> Client caching, CDN caching, Webserver caching, Database caching, Application caching, Cache @Query level, Cache @Object level
> Eviction policies:
>> Cache aside
>> Write through
>> Write behind
>> Refresh ahead
h) Asynchronism
> Message queues
> Task queues
> Back pressure
i) Communication
> TCP
> UDP
> REST
> RPC
(6) JUSTIFY [5 min]
(1) Throughput of each layer
(2) Latency caused between each layer
(3) Overall latency justification
(7) OTHERS
Topics to read for System Design interviews:
- key features of distributed systems
- load balancing
- caching
- data partitioning
- indexes
- proxies
- redundancy & replication
- SQL vs NoSQL
- CAP theorem
- consistent hashing
- long polling
- web sockets
- server sent events
More => https://www.enjoyalgorithms.com/blog/design-youtube-system-design-interview-question
Services
Interview Cake - https://www.interviewcake.com/ - Interview Cake is a thoroughly documented site on programming interviews and concepts. It can be expensive for the year membership but if you're serious about buckling down to learn the fundamentals can be worth it. They also offer a money-back gaurantee.
Daily Coding Questions - https://dailycodingproblem.com/ - Coding question emailed to you everyday for free. If you want the answer emailed to you the following day it's $8/month.
exercism - https://exercism.io/ - Level up your programming skills with 2,629 exercises across 48 languages, and insightful discussion with our dedicated team of welcoming mentors. Exercism is 100% free forever.
codewars - https://www.codewars.com/ - Codewars has thousands of questions generated by the community. You'll never run out of practice problems. They're organized by difficulty, concept and programming language.
codesignal - https://codesignal.com/ - Really great user interface and user experience. I like the gamification and points system they have going on.
Irfan Baqui: ace coding interviews - https://www.irfanbaqui.com/coding-interview-prep/ - get one free problem to practice each week and get the solution next week
interviewing.io - https://interviewing.io/ - Anonymously practice coding interviews with engineers from prominent tech companies.
Pramp - https://www.pramp.com/ref/gt7 - Real practice with actual engineers. Book a time and practice interviewing with real human beings
LeetCode - https://leetcode.com/ - Pick from an expanding library of more than 190 questions, code and submit your solution to see if you have solved it correctly.
Coderbyte - https://coderbyte.com/challenges/?a=true - Lots of programming challenges, access 10 for free otherwise $30 per month
HackerRank - https://www.hackerrank.com/domains - Very popular platform for practicing coding questions. HackerRank is used by companies to evaluate candidates also
InterviewBit - https://www.interviewbit.com/ - Practice Coding Interview Questions. Give us time and we get you the job you deserve.
Codility - https://codility.com/programmers/ - Become a better programmer. Develop your coding skills with our lessons. Take part in our challenges.
Codility Solutions - https://www.martinkysel.com/codility-solutions/ - One engineer's solutions to the codility.com problem sets.