Need help with system-design-interview?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

15.8K Stars 4.1K Forks 87 Commits 17 Opened issues


System design interview for IT companies

Services available


Need anything else?

Contributors list


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.

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!

Table of Contents

[⬆] System Design Interview Tips:

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.

[⬆] Basic Knowledge about System Design:

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.

[⬆] Company Engineering Blogs:

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

[⬆] Products and Systems:

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

[⬆] Hot Questions and Reference:

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

Design a CDN network
* Globally Distributed Content Delivery

Design a Google document system
* google-mobwrite * Differential Synchronization

Design a random ID generation system
Reference: * Announcing Snowflake * snowflake

Design a key-value database
* Introduction to Redis

Design the Facebook news feed function
* What are best practices for building something like a News Feed? * What are the scaling issues to keep in mind while developing a social network feed? * Activity Feeds Architecture

Design the Facebook timeline function
Reference: * Building Timeline * Facebook Timeline

Design a function to return the top k requests during past time interval
* Efficient Computation of Frequent and Top-k Elements in Data Streams * An Optimal Strategy for Monitoring Top-k Queries in Streaming Windows

Design an online multiplayer card game
* How to Create an Asynchronous Multiplayer Game
* How to Create an Asynchronous Multiplayer Game Part 2: Saving the Game State to Online Database
* How to Create an Asynchronous Multiplayer Game Part 3: Loading Games from the Database
* How to Create an Asynchronous Multiplayer Game Part 4: Matchmaking
* Real Time Multiplayer in HTML5

Design a graph search function
* Building out the infrastructure for Graph Search * Indexing and ranking in Graph Search * The natural language interface of Graph Search and Erlang at Facebook

Design a picture sharing system
* Flickr Architecture * Instagram Architecture

Design a search engine
* How would you implement Google Search?
* Implementing Search Engines

Design a recommendation system
* Hulu’s Recommendation System
* Recommender Systems

Design a tinyurl system
Reference: * System Design for Big Data-tinyurl * URL Shortener API

Design a garbage collection system
* Baby's First Garbage Collector

Design a scalable web crawling system
* How can I build a web crawler from scratch?

Design the Facebook chat function
* Erlang at Facebook
* Facebook Chat

Design a trending topic system
* Implementing Real-Time Trending Topics With a Distributed Rolling Count Algorithm in Storm
* Early detection of Twitter trends explained

Design a cache system
* Introduction to Memcached

[⬆] Good Books:

[⬆] Object Oriented Design:

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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.