Skip to content

raeez21/system-design-interview

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 

Repository files navigation

https://www.amazon.com/Cracking-Coding-Interview-6th-Programming/dp/0984782850/ref=sr_1_1?ie=UTF8&qid=1462241515&sr=8-1&keywords=cracking+the+coding+interview&tag=charity48-20

logo

How to prepare system design questions for an IT company

System design is a very broad topic. Even a software engineer with many years of working experience at a top IT company may not be an expert on system design. If you want to become an expert, you need to read many books, articles, and solve real large scale system design problems.

SOME TIPS

  1. you should always be confident in saying, “While I’ve never used technology X, I know it’s a common solution to problem Y.” This repository only teaches you how to handle the system design interview with a systematic approach in a short time. You can dive into each topic if you have time. Of course, welcome to add your thoughts!
  2. Actual experience with a wide range of tools and systems is an advantage, but being able to identify a need and suggest a standard solution for it would get you a long way, even if you’ve never used it yourself.
  3. Consider it an opportunity to work with your interviewer, just as two team members would, to solve a real problem related to the company’s goals.
  4. Your final design is less important than the thought process behind your design choices
  5. you must familiarize yourself with the topics that system design interview questions might involve and how to approach them.

A Step-by-Step Approach to Acing your System Design Interview

  1. Understand the Goals - ensure you understand the basic requirements and ask clarification questions.
    1. What is the goal of the system?
    2. Who are the users of the system? What do they need it for? How are they going to use it?
    3. What are the inputs and outputs of the system?
  2. Establish the Scope - Try to define all the features and all the components you think of in order of importance to the user. Ask clarifying questions, such as:
    1. Do we want to discuss the end-to-end experience or just the API?
    2. What clients do we like to support (mobile, web, etc.)?
    3. Do we require authentication? Analytics? Integrating with existing systems?
  3. Design for the Right Scale - The same feature set requires a very different approach for different scales.
    1. What is the expected read-to-write ratio?
    2. How many concurrent requests should we expect?
    3. What’s the average expected response time?
    4. What’s the limit of the data we allow users to provide?
  4. Start High-Level, then Drill-Down - Start with covering the end-to-end process based on the goals you’ve established. start simple and iterate.
  5. Data Structures and Algorithms (DS&A)
  6. Tradeoffs - When it comes to system design interviews, almost every decision you’ll need to make will involve a tradeoff. Being able to describe them in real-time, as you’re suggesting solutions, shows that you understand that complex systems often require compromises and allow you to demonstrate your knowledge regarding the pros and cons of different approaches

Link to the medium article https://blog.pramp.com/how-to-succeed-in-a-system-design-interview-27b35de0df26

Clarify the constraints and identify the user cases

Spend a few minutes questioning the interviewer and agreeing on the scope of the system. Remember to make sure you know all the requirements the interviewer didn't tell you about in the beginning.

User cases indicate the main functions of the system, and constraints list the scale of the system such as requests per second, requests types, data written per second, data read per second.

High-level architecture design

Sketch the important components and the connections between them, but don't go into some details. Usually, a scalable system includes webserver (load balancer), service (service partition), database (primary/secondary database cluster plug cache).

Component design

For each component, you need to write the specific APIs for each component. You may need to finish the detailed OOD design for a particular function. You may also need to design the database schema for the database.

Here are some articles about system design related topics.

Of course, if you want to dive into system related topics, here is a good collection of reading list about services-engineering, and a good collection of material about distributed systems.

If you are going to have an onsite with a company, you should read their engineering blog.

The following papers/articles/slides can help you to understand the general design idea of different real products and systems.

There are some good references for each question. The references here are slides and articles.

Design a CDN network
Reference:

Design a Google document system
Reference:

Design a random ID generation system
Reference:

Design a key-value database
Reference:

Design the Facebook news feed function
Reference:

Design the Facebook timeline function
Reference:

Design a function to return the top k requests during past time interval
Reference:

Design an online multiplayer card game
Reference:

Design a graph search function
Reference:

Design a picture sharing system
Reference:

Design a search engine
Reference:

Design a recommendation system
Reference:

Design a tinyurl system
Reference:

Design a garbage collection system
Reference:

Design a scalable web crawling system
Reference:

Design the Facebook chat function
Reference:

Design a trending topic system
Reference:

Design a cache system
Reference:

Tips for OOD Interview

Clarify the scenario, write out user cases

Use case is a description of sequences of events that, taken together, lead to a system doing something useful. Who is going to use it and how they are going to use it. The system may be very simple or very complicated.

Special system requirements such as multi-threading, read or write oriented.

Define objects

Map identity to class: one scenario for one class, each core object in this scenario for one class.

Consider the relationships among classes: certain class must have unique instance, one object has many other objects (composition), one object is another object (inheritance).

Identify attributes for each class: change noun to variable and action to methods.

Use design patterns such that it can be reused in multiple applications.

Useful Websites

About

System design interview for IT companies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published