系统与基础设施github.com编辑精选
系统设计入门:学习设计大型系统
Learn how to design large-scale systems
2018 — 2021,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这个 GitHub 仓库(system-design-primer)整理大规模系统设计的核心主题,包括可扩展性、缓存、数据库、异步处理等,并附有系统设计面试准备材料和 Anki 记忆卡片。它面向想了解分布式系统架构、准备系统设计面试的读者。
为什么经久不衰:系统设计面试与分布式架构知识长期热门,这个仓库把散落的概念和资源组织成可操作的入门路线,所以反复被推荐。
HN 评论精选
批评盲目追求大规模架构,强调可缩容性和维护成本。
我厌倦了每个人都想构建“大规模系统”并扮演 Netflix。绝大多数人的项目永远不需要这样做,反而会做出维护昂贵、组件过多的烂摊子。和设计可扩展系统至少同样重要的是设计可缩小的系统:你不知道组织何时会降低这个项目的优先级,还得让它在不每年烧掉几百万资源的情况下继续运行。参见微服务(说的是问题,不是解决方案)。
ris查看英文原文
I'm quite tired of everyone wanting to build "large scale systems" and play at being Netflix. The truth of the matter is the vast vast majority of people will never need to do this with their project and instead will just end up making an expensive to maintain mess with way too many moving parts. At least as important as designing something that can scale up is designing something that can scale down. You don't know when the organization's going to need to deprioritize this project and be able to keep it running without burning a couple of million in resources every year. See: microservices. (as in, for the problem, not the solution)
架构图不是重点,数据模型、寻址、安全、审计和最小权限等基础问题才决定系统能否演化。
这类架构图我一年大概会见到半打。架构本身通常“还行”,但子系统之间的通信路径很可能是问题中最简单的部分。一般来说,重组系统架构是可能的——前提是底层数据模型合理。更重要的问题是:资产和实体的寻址约定是什么?是否一致且能同时服务于安全和数据路由?特定实体的安全策略是什么?如何修改?变更传播需要多久?认证有多集中?失败事件产生的信息如何被正确垃圾回收?如何独立审计所有子系统之间的一致性?发现一条“数据”时,追溯其来源有多复杂?如何强制子系统只拥有非常窄的修改信息的能力?如果这些问题回答正确,你可以把架构从单体扩展到任何程度。
cjhanks查看英文原文
I see something comparable to these diagrams (it feels like) a half-dozen times a year. The architecture is in general 'fine'. But communication paths of subsystems is probably the easiest part of the problem. And in general, re-organizing the architecture of a system is usually possible - if and only if - the underlying data model is sane. The more important questions are; - What is the convention for addressing assets and entities? Is it consistent and useful for informing both security or data routing? - What is the security policy for any specific entity in your system? How can it be modified? How long does it take to propagate that change? How centralized is the authentication? - How can information created from failed events be properly garbage collected? - How can you independently audit consistency between all independent subsystems? - If a piece of "data" is found, how complex is it to find the origin of this data? - What is the policy/system for enforcing subsystems have a very narrow capability to mutate information? If you get these questions answered correctly (amongst others not on the tip of my tongue), you can grow your architecture from a monolith to anything you want.
推荐 DDIA 作为深入理解大规模系统的延伸阅读。
如果你喜欢这个页面,可能也会喜欢《Designing Data-Intensive Applications》这本好书,它综述了大规模系统的许多特性并介绍了一些方法。注意它不是系统设计面试题的准备书,但肯定有帮助。
bandwitch查看英文原文
If you liked this page, you might also like the excellent book "Designing Data-Intensive Applications" that among others surveys many characteristics of large-scale systems and presents some. Note that it's not a book for preparing you on system design questions, but it can definitely help.
指出资源范围局限于 Web 分布式系统,缺少桌面应用等其他大型系统的设计讨论。
似乎所有这类资源都关于 Web 规模分布式系统,内容和方法也相当标准化。其他大规模系统呢?比如桌面应用——如何设计像 Adobe Photoshop 或 MS Office 这样的大型桌面系统?
zerr查看英文原文
It seems like all such resources are about web-scale distributed systems and the content/methods are quite standardized. What about other large-scale systems? E.g. desktop applications - for instance, how to design a large-scale desktop system such as Adobe Photoshop or MS Office.
历次讨论
同类还值得读
TTY 揭秘(2008)
The TTY demystified (2008)
经典文章深入剖析了 Unix/Linux 中 TTY 子系统的工作原理,包括线路规程、终端驱动、信号与控制字符等机制。
系统与基础设施上首页 11 次 · 2009–2025linusakesson.net编辑精选为什么 GNU grep 这么快
Why GNU grep is Fast
FreeBSD 邮件列表上一篇广为流传的帖子,解释 GNU grep 为什么快:核心在于 Boyer-Moore 字符串搜索算法配合精心优化的内部循环和 I/O,让程序在搜索时“…
系统与基础设施上首页 9 次 · 2010–2022lists.freebsd.orgXplain:为普通人讲解 X11
Xplain – Explaining X11 for the rest of us
《Xplain》是作者(HN 用户 Jasper_)写的一系列 X11 长文,用他在浏览器中重建的 X11 绘图模型做交互演示,讲解 X11 的绘图模型与窗口系统设计。
系统与基础设施上首页 6 次 · 2013–2020magcius.github.io编辑精选旋风教程:为 Linux 创建极小 ELF 可执行文件(1999)
A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux (1999)
breadbox 写于 1999 年的经典教程,主题是如何为 Linux 手工构造并裁剪出体积极小的 ELF 可执行文件。
系统与基础设施上首页 6 次 · 2007–2025muppetlabs.comPostgreSQL 内部原理
The internals of PostgreSQL
《The Internals of PostgreSQL》是一本免费在线书籍,系统讲解 PostgreSQL 的内部实现,包括查询处理、并发控制、WAL、缓冲区管理等核心机制。
系统与基础设施上首页 5 次 · 2017–2025interdb.jp编辑精选