system-design-primer README

The project's README from github.com/donnemartin/system-design-primer. As one markdown file: README.md.

English ∙ 日本語 ∙ 简体中文 ∙ 繁體中文 | العَرَبِيَّة‎ ∙ বাংলা ∙ Português do Brasil ∙ Deutsch ∙ ελληνικά ∙ עברית ∙ Italiano ∙ 한국어 ∙ فارسی ∙ Polski ∙ русский язык ∙ Español ∙ ภาษาไทย ∙ Türkçe ∙ tiếng Việt ∙ Français | Add Translation

Help translate this guide!

The System Design Primer


Motivation

Learn how to design large-scale systems.

Prep for the system design interview.

Learn how to design large-scale systems

Learning how to design scalable systems will help you become a better engineer.

System design is a broad topic. There are a vast number of resources scattered throughout the web on system design principles.

This repo is an organized collection of resources to help you learn how to build systems at scale.

Learn from the open source community

This is a continually updated, open source project.

Contributions are welcome!

Prep for the system design interview

In addition to coding interviews, system design is a required component of the technical interview process at many tech companies.

Practice common system design interview questions and compare your results with sample solutions: discussions, code, and diagrams.

Additional topics for interview prep:

Anki flashcards


The provided Anki flashcard decks use spaced repetition to help you retain key system design concepts.

Great for use while on-the-go.

Coding Resource: Interactive Coding Challenges

Looking for resources to help you prep for the Coding Interview?


Check out the sister repo Interactive Coding Challenges, which contains an additional Anki deck:

Contributing

Learn from the community.

Feel free to submit pull requests to help:

Content that needs some polishing is placed under development.

Review the Contributing Guidelines.

Index of system design topics

Summaries of various system design topics, including pros and cons. Everything is a trade-off.

Each section contains links to more in-depth resources.


Study guide

Suggested topics to review based on your interview timeline (short, medium, long).

Imgur

Q: For interviews, do I need to know everything here?

A: No, you don't need to know everything here to prepare for the interview.

What you are asked in an interview depends on variables such as:

More experienced candidates are generally expected to know more about system design. Architects or team leads might be expected to know more than individual contributors. Top tech companies are likely to have one or more design interview rounds.

Start broad and go deeper in a few areas. It helps to know a little about various key system design topics. Adjust the following guide based on your timeline, experience, what positions you are interviewing for, and which companies you are interviewing with.

Short Medium Long
Read through the System design topics to get a broad understanding of how systems work :+1: :+1: :+1:
Read through a few articles in the Company engineering blogs for the companies you are interviewing with :+1: :+1: :+1:
Read through a few Real world architectures :+1: :+1: :+1:
Review How to approach a system design interview question :+1: :+1: :+1:
Work through System design interview questions with solutions Some Many Most
Work through Object-oriented design interview questions with solutions Some Many Most
Review Additional system design interview questions Some Many Most

How to approach a system design interview question

How to tackle a system design interview question.

The system design interview is an open-ended conversation. You are expected to lead it.

You can use the following steps to guide the discussion. To help solidify this process, work through the System design interview questions with solutions section using the following steps.

Step 1: Outline use cases, constraints, and assumptions

Gather requirements and scope the problem. Ask questions to clarify use cases and constraints. Discuss assumptions.

Step 2: Create a high level design

Outline a high level design with all important components.

Step 3: Design core components

Dive into details for each core component. For example, if you were asked to design a url shortening service, discuss:

Step 4: Scale the design

Identify and address bottlenecks, given the constraints. For example, do you need the following to address scalability issues?

Discuss potential solutions and trade-offs. Everything is a trade-off. Address bottlenecks using principles of scalable system design.

Back-of-the-envelope calculations

You might be asked to do some estimates by hand. Refer to the Appendix for the following resources:

Source(s) and further reading

Check out the following links to get a better idea of what to expect:

System design interview questions with solutions

Common system design interview questions with sample discussions, code, and diagrams.

Solutions linked to content in the solutions/ folder.

Question
Design Pastebin.com (or Bit.ly) Solution
Design the Twitter timeline and search (or Facebook feed and search) Solution
Design a web crawler Solution
Design Mint.com Solution
Design the data structures for a social network Solution
Design a key-value store for a search engine Solution
Design Amazon's sales ranking by category feature Solution
Design a system that scales to millions of users on AWS Solution
Add a system design question Contribute

Design Pastebin.com (or Bit.ly)

View exercise and solution

Imgur

View exercise and solution

Imgur

Design a web crawler

View exercise and solution

Imgur

Design Mint.com

View exercise and solution

Imgur

Design the data structures for a social network

View exercise and solution

Imgur

Design a key-value store for a search engine

View exercise and solution

Imgur

Design Amazon's sales ranking by category feature

View exercise and solution

Imgur

Design a system that scales to millions of users on AWS

View exercise and solution

Imgur

Object-oriented design interview questions with solutions

Common object-oriented design interview questions with sample discussions, code, and diagrams.

Solutions linked to content in the solutions/ folder.

Note: This section is under development

Question
Design a hash map Solution
Design a least recently used cache Solution
Design a call center Solution
Design a deck of cards Solution
Design a parking lot Solution
Design a chat server Solution
Design a circular array Contribute
Add an object-oriented design question Contribute

System design topics: start here

New to system design?

First, you'll need a basic understanding of common principles, learning about what they are, how they are used, and their pros and cons.

Step 1: Review the scalability video lecture

Scalability Lecture at Harvard

Step 2: Review the scalability article

Scalability

Next steps

Next, we'll look at high-level trade-offs:

Keep in mind that everything is a trade-off.

Then we'll dive into more specific topics such as DNS, CDNs, and load balancers.

Performance vs scalability

A service is scalable if it results in increased performance in a manner proportional to resources added. Generally, increasing performance means serving more units of work, but it can also be to handle larger units of work, such as when datasets grow.1

Another way to look at performance vs scalability:

system-design-primer (donnemartin/system-design-primer)

Searching Database…

Что это такое?Подобранная и структурированная коллекция материалов для изучения проектирования крупномасштабных систем, созданная специально для подготовки инженеров к собеседованиям по проектированию систем.
Это учебник, справочный список или то, что нужно запустить?Это руководство для чтения и самостоятельного изучения: указатель тем по проектированию систем, вопросы с собеседований с примерами решений и колоды карточек Anki. Устанавливать или запускать ничего не нужно.
Как устроено содержание и с чего мне начать?Сначала идёт указатель тем по проектированию систем (масштабируемость, базы данных, кэширование, балансировка нагрузки и т. д.), затем вопросы с собеседований по проектированию систем с решениями и вопросы по объектно-ориентированному проектированию с решениями. Новичкам стоит начать с лекции и статьи о масштабируемости в разделе «System design topics: start here».
Нужны ли мне какие-то инструменты, чтобы пользоваться этим?Для чтения руководства никакие специальные инструменты не нужны; единственное необязательное дополнение — приложение Anki, если вы хотите использовать прилагаемые колоды карточек для интервального повторения.
Нужно ли изучить всё это перед собеседованием?Нет — в README прямо сказано, что знать всё не нужно; в руководстве предлагаются разные уровни глубины (короткий, средний и длинный план подготовки) в зависимости от вашего опыта и целевых компаний.
Для кого предназначено это руководство?Для инженеров, готовящихся к собеседованиям по проектированию систем в технологических компаниях, от рядовых разработчиков до архитекторов и тимлидов, а также для всех, кто хочет научиться строить масштабируемые системы.
Какие темы охватывает указатель по проектированию систем?Указатель охватывает DNS, CDN, балансировщики нагрузки, микросервисы, базы данных (SQL/NoSQL, репликация, шардирование), стратегии кэширования, асинхронность с очередями сообщений и задач, а также протоколы связи TCP, UDP, RPC и REST.
Какие вопросы для собеседований здесь есть?Здесь есть разобранные задачи по проектированию систем, например Pastebin, лента Twitter, веб-краулер и Mint.com, а также задачи по объектно-ориентированному проектированию, такие как парковка или кэш LRU. Каждая сопровождается обсуждением, кодом и диаграммами.
Есть ли связанный ресурс для подготовки к собеседованиям по программированию?Да, автор поддерживает родственный репозиторий «Interactive Coding Challenges» с собственной колодой Anki, посвящённой практике собеседований по программированию.
Size
11 MB
Stars
374.8K
Updated
CommitMar 20
Age
9y
Commits · 90 Days