项目介绍

System Design Primer 是由 Donne Martin 创建的开源项目,旨在帮助工程师学习如何设计大规模系统,同时为系统设计面试做充分准备。该项目在 GitHub 上拥有超过 33 万颗星,是系统设计领域最全面、最受欢迎的学习资源。

系统设计是一个广泛的话题,网络上散布着大量的资源。这个仓库是一个有组织的资源集合,帮助你系统性地学习如何构建大规模系统。无论你是准备面试还是提升架构能力,这里都有你需要的内容。

项目信息详情
作者Donne Martin (donnemartin)
GitHub Stars338,404+
开源协议Creative Commons Attribution 4.0
内容形式文档、图表、代码示例、Anki 卡片
多语言支持英语、中文、日语、韩语等 15+ 语言

核心主题

项目涵盖了系统设计的所有重要主题,以下是主要知识领域:

📈 可扩展性

水平扩展与垂直扩展、负载均衡策略、数据库分片、缓存机制等核心概念。

🔄 可用性与一致性

CAP 定理、一致性模式(强一致性、最终一致性)、可用性模式(故障转移、复制)。

🌐 网络与通信

CDN、DNS、负载均衡器、反向代理、REST、RPC、WebSocket 等网络架构组件。

🗄️ 数据库系统

SQL 与 NoSQL 对比、RDBMS、文档存储、键值存储、图数据库、列式存储。

⚡ 缓存策略

客户端缓存、CDN 缓存、Web 服务器缓存、数据库缓存、应用层缓存及更新策略。

📨 异步与消息队列

消息队列、任务队列、背压机制、发布-订阅模式等异步处理方案。

🏗️ 微服务架构

微服务 vs 单体架构、服务发现、API 网关、分布式事务等架构模式。

🔒 安全与性能

加密、认证、授权、性能指标(延迟、吞吐量)、性能优化策略。

主要特点

  • 系统设计面试题及解答 — 包含多道经典系统设计面试题,附带详细的讨论、代码和架构图
  • 面向对象设计题 — OOD 面试题及示例解答,涵盖常见设计模式
  • Anki 记忆卡片 — 提供系统设计、系统设计练习和 OO 设计三套 Anki 卡片,利用间隔重复加深记忆
  • 编码挑战 — 姊妹项目 Interactive Coding Challenges 提供配套的编程练习
  • 权衡分析 — 每个主题都包含优缺点分析,帮助理解架构决策中的取舍
  • 深度链接 — 每个章节都链接到更深入的外部资源,方便进一步学习
  • 学习指南 — 根据面试时间线(短期、中期、长期)提供不同的学习计划
  • 开源社区 — 持续接受社区贡献,内容不断完善和更新

如何开始

以下是推荐的学习步骤,帮助你高效地使用 System Design Primer:

1. 克隆仓库到本地

git clone https://github.com/donnemartin/system-design-primer.git cd system-design-primer

2. 制定学习计划

根据你的面试时间安排选择学习路线:

时间线建议内容
短期(1-2 周)重点学习核心概念:可扩展性、数据库、缓存、负载均衡
中期(1-2 月)系统学习所有主题,完成系统设计面试题练习
长期(3+ 月)深入学习所有内容,包括 OOD 题目和编码挑战

3. 下载 Anki 卡片

安装 Anki,下载项目提供的卡片组,利用碎片时间复习系统设计概念。

4. 练习面试题

从简单的系统设计题开始(如设计 URL 短链接服务),逐步挑战更复杂的题目(如设计 Twitter 的时间线)。

常见问题

学习系统设计需要什么基础?
建议具备基本的编程能力和对计算机网络、操作系统的基础了解。不需要是专家,但需要理解 HTTP、TCP/IP、数据库基本概念等。
这个项目和 Grokking the System Design Interview 有什么区别?
System Design Primer 是完全免费和开源的,内容覆盖更广泛,并且由社区持续维护。Grokking 是付费课程,结构更教科书化。两者可以互补使用。
Anki 卡片如何使用?
首先从 AnkiWeb 下载 Anki 应用,然后导入项目提供的 .apkg 文件。Anki 使用间隔重复算法,帮助你在最佳时机复习,长期记忆效果显著。
面试中系统设计环节通常多长时间?
大多数科技公司的系统设计面试为 45-60 分钟。建议按照「需求澄清 → 高层设计 → 深入组件 → 权衡讨论」的框架来组织回答。
项目内容是否有中文版?
是的,项目提供简体中文和繁体中文翻译版本。你可以在仓库中找到 README-zh-Hans.md(简体中文)和 README-zh-TW.md(繁体中文)。

社区议题

以下是该项目当前开放的 Issue(按评论数排序),共 110 条,标题已翻译为中文供参考。

编号 议题标题(中文翻译 / 英文原文) 创建日期 评论
#136 Spanish translation
Spanish translation
需要帮助translation
2018-02-22 52
#28 请求 for Translations
Request for Translations
需要帮助feature-requesttranslation
2017-03-21 52
#40 Brazilian Portuguese translation
Brazilian Portuguese translation
需要帮助translation
2017-03-27 44
#39 Turkish translation
Turkish translation
需要帮助translation
2017-03-27 30
#127 Vietnamese Translation
Vietnamese Translation
需要帮助translation
2018-01-20 27
#4 PDF Download
PDF Download
需要帮助feature-requestuser-feedback-wanted
2017-03-09 25
#170 Arabic translation
Arabic translation
需要帮助translation
2018-07-14 24
#250 French translation
French translation
需要帮助translation
2019-02-07 23
#220 Bengali Translation
Bengali Translation
需要帮助translation
2018-10-01 21
#110 Persian Translation
Persian Translation
需要帮助translation
2017-10-02 18
#87 Russian Translation
Russian Translation
需要帮助translation
2017-06-29 18
#272 Hebrew translation
Hebrew translation
需要帮助translation
2019-04-20 17
#104 Italian Translation
Italian Translation
需要帮助translation
2017-09-18 16
#102 Korean Translation
Korean Translation
需要帮助translation
2017-09-15 16
#271 应该 we have a chat to help and connect members ?
Should we have a chat to help and connect members ?
user-feedback-wanted
2019-04-19 12
#100 Japanese Translation
Japanese Translation
需要帮助translation
2017-09-15 11
#248 Ukrainian translation
Ukrainian translation
需要帮助translation
2019-01-27 10
#894 Suggestion: 添加 链接 to AnkiCode in the README
Suggestion: Add Link to AnkiCode in the README
needs-review
2024-08-21 9
#344 Typo in "Load balancer" flashcard
Typo in "Load balancer" flashcard
缺陷
2019-12-24 9
#38 Simplified Chinese translation
Simplified Chinese translation
需要帮助translation
2017-03-27 8
#1089 Hindi Translation
Hindi Translation
2025-06-05 6
#630 添加 White Background to all 图片
Add White Background to all images
needs-review
2021-12-22 6
#235 Anki 错误 on Launching using Ubuntu 18.10
Anki Error on Launching using Ubuntu 18.10
需要帮助needs-review
2018-11-17 6
#1151 Python
Python
2025-09-19 5
#655 Ggg
Ggg
needs-review
2022-03-30 5
#571 anki card cannot be imported as anki doesn't 支持 importing apkg 文件.
anki card cannot be imported as anki doesn't support importing apkg files.
needs-review
2021-09-13 5
#278 第二步:回顾可扩展性的文章对应的链接打不开
第二步:回顾可扩展性的文章对应的链接打不开
needs-reviewresponse-needed
2019-05-08 5
#236 Latency numbers every programmer 应该 know 更新
Latency numbers every programmer should know update
needs-review
2018-11-21 5
#187 Thai translation
Thai translation
需要帮助translation
2018-07-28 5
#816 更新 to a URL
Update to a URL
needs-review
2023-12-07 4
#780 Github Night Theme Makes 图片 With Transparent Background Illegible
Github Night Theme Makes Images With Transparent Background Illegible
needs-review
2023-05-25 4
#774 Unable to compile and install, Python 版本 is 3.11.2
Unable to compile and install, Python version is 3.11.2
needs-review
2023-04-24 4
#769 如何 write a code about input code
how to write a code about input code
needs-review
2023-04-13 4
#646 RiMajol Joel
RiMajol Joel
needs-review
2022-03-06 4
#515 Diagrams not clear in README.md
Diagrams not clear in README.md
needs-review
2021-03-13 4
#86 Unit prefix in Powers of two table
Unit prefix in Powers of two table
增强user-feedback-wanted
2017-06-22 4
#7 Convert this to a Gitbook(suggestion)
Convert this to a Gitbook(suggestion)
feature-requestuser-feedback-wanted
2017-03-09 4
#1094 Issue : 不正确 type hint in LinkedList class of query_cache_snippets.py
Issue : Incorrect type hint in LinkedList class of query_cache_snippets.py
2025-06-22 3
#1039 Anki cards unreadable in nightmode; all Anki cards contain colors declared in HTML, 应该 have colors in styles
Anki cards unreadable in nightmode; all Anki cards contain colors declared in HTML, should have colors in styles
needs-review
2024-12-23 3
#830 Replace SQL Write "Master-Slave" in Main Diamgram with more appropriate term
Replace SQL Write "Master-Slave" in Main Diamgram with more appropriate term
needs-review
2024-01-06 3
#819 链接 for Redis architecture 需要 to be replaced.
Link for Redis architecture needs to be replaced.
needs-review
2023-12-19 3
#818 更新 to a URL
Update to a URL
needs-review
2023-12-10 3
#744 链接 损坏 in readme.md
Link Broken in readme.md
needs-review
2023-02-15 3
#672 链接 to "Round robin or weighted round robin" 页面 under "Load balancer" section is not working
Link to "Round robin or weighted round robin" page under "Load balancer" section is not working
needs-review
2022-05-04 3
#671 GithubPages 部署?
GithubPages deployment?
needs-review
2022-05-03 3
#531 Convert to epub 损坏
Convert to epub broken
needs-review
2021-04-28 3
#482 请求: 添加 GraphQL in the `Communication` section
Request: Add GraphQL in the `Communication` section
needs-review
2020-10-13 3
#463 问题 - Is their a repo as comprehensive as this for Algorithms & Data Structures?
Question - Is their a repo as comprehensive as this for Algorithms & Data Structures?
needs-review
2020-08-28 3
#415 DNS diagram not accurate
DNS diagram not accurate
增强needs-review
2020-05-17 3
#130 Greek Translation
Greek Translation
需要帮助translation
2018-02-08 3
#68 Polish translation
Polish translation
需要帮助translation
2017-04-20 3
#1145 The 图片 in the flashcards of the System Design deck are not working
The images in the flashcards of the System Design deck are not working
2025-08-24 2
#1141 Faster 链接 to the LeCloud URLs
Faster Links to the LeCloud URLs
2025-08-05 2
#1076 Can't import decks into mobile or desktop anki
Can't import decks into mobile or desktop anki
2025-05-01 2
#1065 Scaliblity 链接 is wrong
Scaliblity link is wrong
2025-03-13 2
#1058 Suspicious 链接 in Load Balancer section
Suspicious link in Load Balancer section
needs-review
2025-02-16 2
#1052 Spotify-crack-v0.23--2025-
Spotify-crack-v0.23--2025-
needs-review
2025-01-30 2
#1046 移除 unused JavaScript and CSS .
Remove unused JavaScript and CSS .
needs-review
2025-01-09 2
#923 Can we look at a way to filter topics being 创建. A lot of suspicious posts have been seen in the last 6 hours.
Can we look at a way to filter topics being created. A lot of suspicious posts have been seen in the last 6 hours.
needs-review
2024-09-04 2
#840 is this awesome repo no longer been 更新?
is this awesome repo no longer been updated?
needs-review
2024-02-14 2
#838 Dyn DDoS attack 链接 under disadvantages of DNS redirects to oracle
Dyn DDoS attack link under disadvantages of DNS redirects to oracle
needs-review
2024-01-31 2
#804 Unable to download the flash cards
Unable to download the flash cards
needs-review
2023-10-08 2
#791 "About" 应该 mention *network*
"About" should mention *network*
needs-review
2023-07-18 2
#789 Where are the exercises?
Where are the exercises?
needs-review
2023-06-29 2
#756 Tranlsation
Tranlsation
needs-review
2023-03-21 2
#752 Sdp
Sdp
needs-review
2023-03-11 2
#692 Not clear how 性能 & scalability is a trade-off
Not clear how performance & scalability is a trade-off
needs-review
2022-07-28 2
#691 can you make it be a book?
can you make it be a book?
needs-review
2022-07-25 2
#668 Markdown Picture Color Problem
Markdown Picture Color Problem
needs-review
2022-04-26 2
#642 无效 链接 如何 Ace System Design Interview
Invalid Link How to Ace System Design Interview
needs-review
2022-02-25 2
#635 Python 文件 Arrangement 问题
Python File Arrangement Question
needs-review
2022-01-01 2
#625 تصميم برامج عربي
تصميم برامج عربي
needs-review
2021-12-03 2
#567 链接 is not available
link is not available
needs-review
2021-09-04 2
#562 nit: Powers of two or powers of ten?
nit: Powers of two or powers of ten?
needs-review
2021-08-22 2
#540 system design
system design
needs-review
2021-05-27 2
#525 图片 not visible in dark mode
Image not visible in dark mode
needs-review
2021-04-15 2
#495 line arrows are not clear on dark mode on 图片/jj3A5N8.png
line arrows are not clear on dark mode on images/jj3A5N8.png
needs-review
2020-12-16 2
#493 Correcting RPC mention of Protobuf with mention of gRPC
Correcting RPC mention of Protobuf with mention of gRPC
needs-review
2020-11-29 2
#445 修复 the reference URLs of the solution READMEs in the zh-Hans 版本修改中文答案链接
Fix the reference URLs of the solution READMEs in the zh-Hans version修改中文答案链接
needs-review
2020-07-12 2
#390 Reverse index vs. inverted index
Reverse index vs. inverted index
needs-review
2020-03-09 2
#359 Indonesian translation
Indonesian translation
需要帮助translation
2020-02-05 2
#274 问题 about `Redis is useful as a simple message broker but messages can be lost.`
Question about `Redis is useful as a simple message broker but messages can be lost.`
needs-review
2019-04-28 2
#256 Design Uber.com
Design Uber.com
feature-request
2019-02-21 2
#254 [Anki Cards] Reference Url all 损坏
[Anki Cards] Reference Url all broken
缺陷
2019-02-19 2
#249 Translate language 列表
Translate language list
需要帮助translation
2019-02-06 2
#203 DNS layer to elect loadbalancer health
DNS layer to elect loadbalancer health
needs-review
2018-08-19 2
#201 The typesetting is too messy
The typesetting is too messy
needs-review
2018-08-14 2
#150 Can we have more explanation for Object Oriented design questions?
Can we have more explanation for Object Oriented design questions?
feature-request
2018-03-27 2
#134 请求: 添加 average time-to-read with each topic/task will help in planing
Request: Adding average time-to-read with each topic/task will help in planing
feature-request
2018-02-19 2
#63 Efficient method to address concurrent 请求 in a successfully e-commerce platform
Efficient method to address concurrent requests in a successfully e-commerce platform
需要帮助问题
2017-04-15 2
#32 Company architectures 链接 to old references
Company architectures link to old references
增强需要帮助user-feedback-wanted
2017-03-23 2
#1193 Translation: 添加 Georgian language (ka)
Translation: Add Georgian language (ka)
2026-01-29 1
#1162 Wifi hacking password
Wifi hacking password
2025-10-22 1
#1128 pip install flask flask_sqlalchemy python app.py
pip install flask flask_sqlalchemy python app.py
2025-07-05 1
#1090 Supervisor Class 实现
Supervisor Class Implementation
2025-06-12 1
#1075 More Programming Languages Options
More Programming Languages Options
2025-04-27 1
#1060 损坏 链接 for Redis Architecture
Broken Link for Redis Architecture
2025-02-25 1
#1020 来一个中国python爬虫逆向人员,报酬可观
来一个中国python爬虫逆向人员,报酬可观
needs-review
2024-11-19 1
#1011 一元机场官网,一元机场官方地址
一元机场官网,一元机场官方地址
needs-review
2024-10-22 1
#882 The weighted round-robin 链接 goes to the wrong website
The weighted round-robin link goes to the wrong website
needs-review
2024-07-05 1
#874 "Design the data structures for a social network" both prompt and solution make little sense
"Design the data structures for a social network" both prompt and solution make little sense
needs-review
2024-06-21 1
#868 System-Design
System-Design
needs-review
2024-06-17 1
#837 现在看着真累。就不能整个层级目录序号吗 ?
现在看着真累。就不能整个层级目录序号吗 ?
needs-review
2024-01-19 1
#826 openai
openai
needs-review
2024-01-04 1
#798 Progr
Progr
needs-review
2023-08-20 1
#762 System design primer
System design primer
needs-review
2023-04-02 1
#734 Sysdes
Sysdes
needs-review
2023-01-23 1
#729 为什么 "True if BOOL_EXPR else False"?
Why "True if BOOL_EXPR else False"?
needs-review
2023-01-10 1
#727 ja: Japanese translation doesn't have a section of "Availability in numbers" which exists in English 版本
ja: Japanese translation doesn't have a section of "Availability in numbers" which exists in English version
needs-review
2023-01-08 1
#706 This ksat 链接 is 损坏.
This ksat link is broken.
needs-review
2022-09-30 1