Home
- [Overview:](#overview)
- [Approaches to system design in an interview:](#approaches-to-system-design-in-an-interview)
- [List of System Design Topics:](#list-of-system-design-topics)
- [References:](#references)
Overview:
Scalability is the property of a system to handle growing amount of traffic. The scaled program with client-server will act as an online service.
I the case the program is scaled offline, it is known as batch processing
When the input is not fixed and comes as a stream, it is known as
Stream Processing.
Approaches to system design in an interview:
-
Step 1: Gather system requirements
-
Gather Functional Requirements
- Detailed Problem Statement
- Describe user’s view of the system in plain English
- Shows that you can communicate and unpack an open-ended problem
- Ask clarifying questions
- Main players, their actions, results etc.
-
Design Constraints and Scalability Requirements (Technical requirements)
- Number of users, transactions per second etc.
- The interviewer may give them or may ask the candidate
- Can be collected at a later step as well
- CP or AP etc
-
-
Step 2: Micro services
- Take the functional requirement and write them as user stories
- Group these user stories to similar business objects
- These become microservices (call them after business objects such as picture service, file service etc)
-
Step 3: Draw Logical Diagram
- Image of hte microservices connected using arrows.
- Shows how data flows through the system
-
Step 4: Pick one or two micro services and do a deep dive into them
- Talk about application tier, storage tier and cache tier
- Explain how it works for single user single system, single request.
-
Step 5: Scale the application, storage and cache tier
-
Step 6: IF time permits, make final proposal
- Go back to the logical diagram and summarize the microservices.
Microservices
-
independently depoloyable service modeled around a business domain
-
Each one is a blackbox for other microservices
-
They communicate using language independent APIS like REST or HTTP
-
Small and focused on doing one thing
-
To define microservices,
-
cluster the requirements such that each cluster can be handled indpendentlhyby a different eam
-
Rule of thumb is if API and data of two functional requirements, do not look the same, then they belown got two different microservices
-
This should tell us if it is a depth oriented problem (1 microservice) or breadth oriented problem ( many microservices
-
Always the system has profile, analytics and authentication micro services but do not spend time on these Unless the interview is for one of these teams
-
-
Architecture:
- Each microservice has upto 3 tiers:
- Backend tier or business logic (App Server) - Where the code goes
- Cache tier for faster resposne time (Cache) - subset of database tier
- Storage tier for data storage and retrieval (Database) - Store in row-major or col major or files (for unstructured data)
- Each microservice has upto 3 tiers:
Step 1: Wear the product Management Hat:
-
Treat interviewer as an end-user/customer
-
Collect Functional Requirements (max 5 to 6 minutes)
- Detailed problem statement
- High level
- Spend a few minutes to show that youc an communicate given an unknown problem
- The idea is to visualize APIs from the requirements
-
Collect design constraints
- Numbers, how many, how much
- Required for answering scalability
- Often interviewers throw these back to the candidate, so it is beneficial to reseach on them.
- Can be collected at a later step
List of System Design Topics:
- Design a Cache (single Server)
- Design a distributed Cache
- Design a URL shortner
- Design Chat (Messenger) server
- Design NetFlix streaming service
- Design Photo Sharing
- Design Twitter
- Design Recommendation System
- Design Unique ID generator
- Design Request Counters (hit Counters)
- Design E-commerce website
- Design Recently viewed items
- Design Social Gaming
- Design Log Search
- Design Google Maps
- Design API Rate Limiter
- Design Web Crawler
- Design Ticket Master
Stream Processing Examples:
- Uber has some stream processing
- In financial world, stock trading is an example
- IOT uses stream processing
- Logging
References:
Blogs and Papers:
- Designing online game system
- Engineering MLOps
- System Design Donne Martin
- Designing a Web crawler
- System Design Tutorial from freecodecamp
- Patterns of Distributed System
- System Design for Twitter - Narendra
- Strategies for heavy write DB
- The Google File System - Paper
- How to do Distributed Locking - Martin Kleppman
- Apache Samsa
- A comparision of data stores for online feature store
- Database Caching Strategies using Redis
- System Design Interview Twitter or Facebook Feed
- What to look for in a code review
- How to build an exchanges
- SRE Classroom Google
- ML system design architecture
- Uber Data Management
- Senior Engineer Interviews
- Airbnb-Microservices architecture
Books:
- Foundations of Scalable Systems
- Designing Machine Learning Systems
- Building Secure and reliable systems
- The Site reliability Workbook
- Site Reliability Engineering
Youtube Channels:
- System Design Interview Channel
- Narendra’s videos on System Design
- SDE Skills channel on System design
- AirBNB Hotel Booking Design
- Work With Googler YT channel
- Distributed Systems - Lectures by Martin Kleppman
- Streaming a million likes - InfoQ YT channel
- Papers we love YT channel - Chubby Lock Service
- MIT Distributed System Lecture Series
- Scaling HOTSTAR for 25 million concurrent users
- Building a real time metrics database at datadog
- System Design Interview Prep Exponent YT channel
- System Design Tushar Rao Channel
Github Channels:
Linkedin List:
-
Gaurav Sen - (https://lnkd.in/dQzUk9Ek)
-
SudoCode - (https://lnkd.in/dKPi59vK)
-
WhatsApp System Design - (https://lnkd.in/gGxPqGw6)
-
Instagram Design - (https://lnkd.in/gnBWQqs6)
-
TikTok Architecture Design - (https://lnkd.in/g8wn2AbE)
-
Tinder System Design - (https://lnkd.in/gbf5WKNW)
-
System Design of Amazon, Flipkart like E-commerce - (https://lnkd.in/gyMHRC5S)
-
Mock Low Level Design Interview - (https://lnkd.in/gv63EQMr)
-
High Level Design vs Low Level Design - (https://lnkd.in/gDZNjGCK)
-
low Level Design of a Fitness App - (https://lnkd.in/gME6rpQz)
-
Mock Low Level Design Interview - (https://lnkd.in/gAXKJNrP)
-
LOW LEVEL DESIGN
-
Somyajit bhattacharya - (https://lnkd.in/dT3H8uji)
-
Sandeep Kaul - (https://www.codekarle.com/)
-
Crack the System DesigN Interview - (https://lnkd.in/d5GbEdWy)
-
System Design Interview - (https://lnkd.in/dqptpeYv)
-
System Design - (https://lnkd.in/d4bKKp3h)
-
Services Engineering - (https://lnkd.in/dSs9gJ%5F9)
-
Blogs - (https://lnkd.in/dUb4X%5F73)
Courses: