系统与基础设施github.com
TiDB:兼容 MySQL 协议的分布式 NewSQL 数据库
TiDB – A distributed NewSQL database compatible with MySQL protocol
2015 — 2025,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
TiDB 是 PingCAP 开发的开源分布式 NewSQL 数据库,兼容 MySQL 协议,底层采用 KV 存储并支持水平扩展与分布式事务。这个 GitHub 页面是该项目的代码仓库,曾于 2015、2017、2025 年多次登上 Hacker News 首页。评论中既有对 SQL-on-KV 架构的类比与质疑,也有对一致性备份、Go 语言数据库层性能和项目早期成熟度的讨论。
为什么经久不衰:它把 MySQL 生态与分布式扩展能力结合起来,历经多年迭代仍活跃,是理解 NewSQL 架构和开源分布式数据库演进的经典入口。
HN 评论精选
质疑 TiDB 是否支持一致性备份,并列举其他分布式数据库在备份一致性上的缺陷。
许多支持线性一致性的分布式数据库无法提供一致性备份。MongoDB 文档说从分片集群做时间点备份必须停止所有写入;Cassandra 的全局快照是最终一致的;Riak 的备份在节点间可能略有差异;CockroachDB 也不保证 NOW() 在事务顺序中单调。TiDB 支持一致性备份吗?有文档说明如何实现吗?
rystsov查看英文原文
Many distributed databases supporting linearizability fail to provide consistent backups. MongoDB's docs: "To capture a point-in-time backup from a sharded cluster you must stop all writes to the cluster" Cassandra's docs: "To take a global snapshot, run the nodetool snapshot command using a parallel ssh utility ... This provides an eventually consistent backup. Although no one node is guaranteed to be consistent with its replica nodes at the time a snapshot is taken" Riak's docs: "backups can become slightly inconsistent from node to node" CockroachDB's docs: "The table data is dumped as it appears at the time that the command is started ... there is no guarantee that NOW() is monotonic in transaction order" Does TiDB support consistent backups? Are there any docs covering how it is implemented?
将 TiDB 类比 FoundationDB 的 SQL-on-KV 路线,并追问两者的差异。
所以是在 KV 存储上加了 SQL 层?这不和 FoundationDB 很像吗(而且它当时遇到了很多麻烦)?如果是这样,VoltDB 的 John Hugg 有篇好文章讲这件事。TiDB 和它相比如何?
manigandham查看英文原文
So a SQL layer on top of a KV base? Isn't this very similar to what FoundationDB did (and had a lot of trouble with)? if so, good post by John Hugg of voltdb about it: http://voltdb.com/blog/foundationdbs-lesson-fast-key-value-store-not-enough How does tiDB compare to this?
认为 TiDB 可能成为 Aurora 的开源替代,但担心 MySQL 生态选择和 Go 在数据库层的性能。
看起来 AWS Aurora 刚有了一个开源竞争者。只是有点遗憾又是 MySQL,而我们已经押注 PostgreSQL 且不再回头。性能方面我有点担心:Go 很适合高性能并发应用层代码,但我不太看好它在数据库层的表现。InfluxDB 在较大负载下表现很差,不过可以看看 TiDB 会怎样。
endymi0n查看英文原文
Seems like AWS Aurora just got an open source competitor. I'm just a little sad that it's all MySQL again, now that we're betting on PostgreSQL and don't really look back. On the performance side I'm just a litte worried however. While Go is an excellent choice for performant and concurrent app-level code, I'm not too bullish on the language on the database level. InfluxDB sucked hard when we put it under some more load, but let's see what comes out there.
质疑项目早期公开的时机,追问设计文档、技术选型和实际用例。
我很好奇在这个开发阶段公开项目背后的动机,因为关键特性(分布式事务存储引擎)在路线图上还很远。有详细实现的设计文档吗?我看了 wiki 似乎没有。考虑过哪些替代方案,为什么放弃?另外,这个系统有具体用例吗?如果有,能否公开一些细节,比如访问模式、数据量等?
brandtg查看英文原文
I'm curious to know the motivation behind publicizing the project at this stage in development, as it seems like the key feature (distributed transactional storage engine) is quite far away on the road map. Are there any design documents detailing its implementation? I checked the wiki but it didn't look like there was anything there. What alternatives were considered, and why were they abandoned? Also, is there a concrete use case for which this system is being built? If so, what are some (publicly releasable) details about the use case, e.g. access patterns, data volume, etc.?
历次讨论
同类还值得读
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编辑精选