系统构建者的动画
Animations for System Builders

原始链接: https://brooker.co.za/blog/2026/10/23/animations.html

LLMs 和动画可以帮助建立对系统行为的直觉。作者使用真实追踪记录来展示生产级系统中的亚稳态故障:如果存储对 fsync 撒谎,Raft 集群可能会丢失写入;Postgres 在负载峰值后变慢,因为内存压力将查询从页缓存推到磁盘;etcd 过载,触发应用重试;以及与 GC 相关的反馈循环可能阻止读取峰值后的恢复。这些示例说明,亚稳态发生在真实、广泛使用的系统中,而不仅仅是在抽象模拟中。这些动画是使用 Kiro/KiroCrew 基于 Opus 5.5 生成的,数据来自真实测试环境的追踪记录。

黑客新闻 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 面向系统构建者的动画 ( brooker.co.za ) 3 分 由 KraftyOne 1 小时前 | 隐藏 | 过往 | 收藏 | 讨论 帮助 考虑申请 YC 的 2027 冬季批次! 申请 开放至 11 月 2 日。 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请加入 YC | 联系 搜索:
相关文章

原文

Pretty pictures help us learn, maybe?

One of the things I love using LLMs for is helping me understand systems better. In the Strands Decider post I wrote about how I often ask ask me questions to check I understand this. The other technique I’m enjoying right now, and am delighted to see folks around me using too, is building animations.

Animations can help us build an intuition for how and why systems work, or how and why they fail.

Here’s one example: did you know that a Raft cluster can lose writes if even one of the cluster members has a storage layer that lies about fsync()?

When I built Stability Sim, I wanted to help engineers understand metastable failures better. That worked pretty well on an abstract level (e.g. retries and queues make metastability really easy to trigger), but I still hear doubts that these behaviors happen in real systems. After all, those real systems are production-proven, and wouldn’t we have shaken out the behaviors by now if they existed?

Let’s start with Postgres.

In this example, captured from traces on real Postgres 16 running in a real MicroVM. Before a load spike, the database is easily able to handle its 20 queries-per-second load, thanks to the whole working set sitting in the page cache. But after the load spike, we’ve filled up a lot of the memory running queries (each takes 12MB), which now run slower because they’re served off the disk rather than the page cache. I like this example, because it shows that even simple, non-distributed systems have these behaviors.

What about etcd?

Again, we have load spike triggering the metastable state. Writes, in this case. The overloaded peers look like they’re unavailable, which triggers a storm of application-level resends. I like this example, because etcd is widely-used quality software. Operational experience doesn’t seem to effectively shake out these kinds of issues.

When I wrote Garbage Collection and Metastability, a widely-known systems academic told me that it was a fantasy. I’ve seen it happen in the wild in ways I couldn’t share, and I can forgive people for not believing this can happen based on the hand waving in the blog.

So it’s nice to have a real world example, picking on etcd again.

At the start, we’re ticking along nicely at 500 reads/second, before spiking load to 1000 reads/s. The read spike increases the time spent in GC, increasing average tenure, and making less CPU available for the read workload. This is a self-reinforcing loop, and the system doesn’t recover without intercession.

I believe the same thing could happen on a runtime without GC, due to increasing work in the allocator, but haven’t been able to reproduce that yet.

The animations here are all generated with Kiro and KiroCrew, mostly with Opus 5.5. The actual results came from a real test environment, which captures the traces that back the animations.

联系我们 contact @ memedata.com