<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>慢日志</title>
  <subtitle>后端开发 / 分布式系统 / 偶尔写点前端</subtitle>
  <link href="https://slowlog.dev/feed.xml" rel="self"/>
  <link href="https://slowlog.dev/"/>
  <id>https://slowlog.dev/</id>
  <updated>2026-03-18T00:00:00Z</updated>
  <author><name>陈默</name></author>
  <entry>
    <title>MySQL 主从延迟排查，别一上来就调并行复制</title>
    <link href="https://slowlog.dev/notes/mysql-replication-lag.html"/>
    <id>https://slowlog.dev/notes/mysql-replication-lag.html</id>
    <updated>2026-03-18T00:00:00Z</updated>
    <published>2026-03-18T00:00:00Z</published>
    <summary>主从延迟的成因至少有五种，并行复制只能解决其中一种。记录一次排查过程，以及最后为什么问题出在一条 UPDATE 上。</summary>
    <author><name>陈默</name></author>
  </entry>
  <entry>
    <title>Go 里 context 被取消后，那些还在跑的 goroutine 怎么办</title>
    <link href="https://slowlog.dev/notes/go-context-cancellation.html"/>
    <id>https://slowlog.dev/notes/go-context-cancellation.html</id>
    <updated>2026-02-05T00:00:00Z</updated>
    <published>2026-02-05T00:00:00Z</published>
    <summary>context 只负责通知，不负责等待。这个区别我踩过一次，服务重启时丢了批处理任务，排查了半天。</summary>
    <author><name>陈默</name></author>
  </entry>
  <entry>
    <title>用了三年 etcd 才搞明白 lease 续期为什么会导致性能抖动</title>
    <link href="https://slowlog.dev/notes/etcd-lease-jitter.html"/>
    <id>https://slowlog.dev/notes/etcd-lease-jitter.html</id>
    <updated>2026-01-22T00:00:00Z</updated>
    <published>2026-01-22T00:00:00Z</published>
    <summary>服务注册用 lease + watch，量上来之后 etcd 出现周期性 CPU 尖刺。根因是所有人都在同一秒续期。</summary>
    <author><name>陈默</name></author>
  </entry>
  <entry>
    <title>《数据密集型应用系统设计》第 9 章读了两遍，还是想记一下</title>
    <link href="https://slowlog.dev/notes/ddia-chapter-9.html"/>
    <id>https://slowlog.dev/notes/ddia-chapter-9.html</id>
    <updated>2025-12-11T00:00:00Z</updated>
    <published>2025-12-11T00:00:00Z</published>
    <summary>一致性这个词在这本书里被拆得很干净——线性一致性、可串行化、因果一致性是三个不同维度的问题，混在一起谈就会永远谈不清。</summary>
    <author><name>陈默</name></author>
  </entry>
  <entry>
    <title>用 pprof 找出一个 20% 的 CPU 开销，顺便说说怎么读火焰图</title>
    <link href="https://slowlog.dev/notes/go-pprof-regexp.html"/>
    <id>https://slowlog.dev/notes/go-pprof-regexp.html</id>
    <updated>2025-11-08T00:00:00Z</updated>
    <published>2025-11-08T00:00:00Z</published>
    <summary>服务升级后 CPU 涨了两成，代码看了一遍没发现问题。pprof 十分钟定位，是一个每请求都会重新编译的正则。</summary>
    <author><name>陈默</name></author>
  </entry>
  <entry>
    <title>把 RSS 订阅量当 KPI 的第 11 个月</title>
    <link href="https://slowlog.dev/notes/stop-tracking-subscribers.html"/>
    <id>https://slowlog.dev/notes/stop-tracking-subscribers.html</id>
    <updated>2025-10-19T00:00:00Z</updated>
    <published>2025-10-19T00:00:00Z</published>
    <summary>给博客加订阅统计是个错误决定。看着数字涨落的那几个月，我写得越来越不像自己。</summary>
    <author><name>陈默</name></author>
  </entry>
  <entry>
    <title>Kafka 重复消费这事，我最后还是接受了至少一次</title>
    <link href="https://slowlog.dev/notes/kafka-at-least-once.html"/>
    <id>https://slowlog.dev/notes/kafka-at-least-once.html</id>
    <updated>2025-09-27T00:00:00Z</updated>
    <published>2025-09-27T00:00:00Z</published>
    <summary>试图做到精确一次的那个月，我写出的代码比原来复杂三倍，而线上还是出过两次重复。后来换了思路。</summary>
    <author><name>陈默</name></author>
  </entry>
  <entry>
    <title>Linux 上一个进程「卡住」了，我一般按这个顺序查</title>
    <link href="https://slowlog.dev/notes/linux-hung-process.html"/>
    <id>https://slowlog.dev/notes/linux-hung-process.html</id>
    <updated>2025-08-30T00:00:00Z</updated>
    <published>2025-08-30T00:00:00Z</published>
    <summary>从 top 到 strace 的固定套路。大部分「卡住」不外乎五种情况：在等 IO、在等锁、在等网络、在换页、在等子进程。</summary>
    <author><name>陈默</name></author>
  </entry>
  <entry>
    <title>Redis 的 bigkey 不是「大」的问题，是「阻塞」的问题</title>
    <link href="https://slowlog.dev/notes/redis-bigkey.html"/>
    <id>https://slowlog.dev/notes/redis-bigkey.html</id>
    <updated>2025-08-14T00:00:00Z</updated>
    <published>2025-08-14T00:00:00Z</published>
    <summary>一个 200MB 的 Hash 让整个实例每隔几分钟抖动一次。删它的时候还踩了 DEL 阻塞的坑。</summary>
    <author><name>陈默</name></author>
  </entry>
  <entry>
    <title>写了个 200 行的工具，专门用来查「这个端口被谁占了」</title>
    <link href="https://slowlog.dev/notes/port-tool.html"/>
    <id>https://slowlog.dev/notes/port-tool.html</id>
    <updated>2025-07-21T00:00:00Z</updated>
    <published>2025-07-21T00:00:00Z</published>
    <summary>受够了 lsof 的输出，自己写了个。顺便记录一下怎么从 /proc 里把进程信息拼出来，比想象中麻烦。</summary>
    <author><name>陈默</name></author>
  </entry>
</feed>
