Repository navigation
Expand file tree
/
Copy pathindex.xml
More file actions
321 lines (321 loc) · 48.4 KB
/
Copy pathindex.xml
File metadata and controls
321 lines (321 loc) · 48.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>这是来自forminio的博客</title>
<link>https://forminio.github.io/</link>
<description>know is know ,no know is no know</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh-cn</language>
<copyright>© 2026 Forminio</copyright>
<lastBuildDate>Sun, 25 Oct 2026 20:00:00 +0800</lastBuildDate>
<atom:link href="https://forminio.github.io/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>NonStop Router:给 AI 编码工具加一个永不限流的本地网关</title>
<link>https://forminio.github.io/posts/ai-api-failover-nonstop-router/</link>
<pubDate>Sun, 25 Oct 2026 20:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/ai-api-failover-nonstop-router/</guid>
<description><p>用免费 layer 的模型 key 写代码,最崩溃的场景是:代码写一半,工具突然弹一句 <code>429 rate limit exceeded</code>——配额用完了,接下来只能干等。</p></description>
</item>
<item>
<title>如何永久申请免费泛域名ssl证书与证书部署 | 地表最强教程</title>
<link>https://forminio.github.io/posts/ssl/</link>
<pubDate>Sat, 24 Oct 2026 00:45:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/ssl/</guid>
<description><p>先说一下方法,这是基于GitHub开源项目acme.sh与Let&rsquo;s Encrypt无需注册自动更新免费泛域名https证书。</p></description>
</item>
<item>
<title>计网入门基础</title>
<link>https://forminio.github.io/posts/networking/</link>
<pubDate>Tue, 20 Oct 2026 20:45:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/networking/</guid>
<description><h2 class="relative group">网络模型
 <div id="网络模型" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e7%bd%91%e7%bb%9c%e6%a8%a1%e5%9e%8b" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>网络模型分为两类一类是OSI模型,共七层,一类是TCP/IP模型,共四层</p></description>
</item>
<item>
<title>单测别只为了凑覆盖率:几个真正会救命的断言写法</title>
<link>https://forminio.github.io/posts/write-assertions-that-matter/</link>
<pubDate>Wed, 02 Sep 2026 14:20:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/write-assertions-that-matter/</guid>
<description><p>说个我自己的毛病:早几年写单测,打开覆盖率报告看到 90% 就心里踏实,然后发版。直到有一次线上把金额算错了一块多钱,一查,那块逻辑明明&quot;被覆盖&quot;了——因为它只断言了方法跑通、没断言算出来的数对不对。从那以后我写测试的顺序变了,先想&quot;我要断言什么&quot;,再想&quot;怎么把场景搭出来&quot;。</p></description>
</item>
<item>
<title>生产 CPU 一直 100% 的那个下午,我用一套命令串到底</title>
<link>https://forminio.github.io/posts/cpu-100-troubleshooting/</link>
<pubDate>Mon, 24 Aug 2026 16:40:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/cpu-100-troubleshooting/</guid>
<description><p>说个真人真事。有天一上班就看到告警:某台机器 CPU 打满,重启以后没几分钟又上去了。我当时第一反应是&quot;先看是谁在烧&quot;,结果从 <code>top</code> 一路查到线程栈,才发现元凶是个不起眼的调试日志在疯狂循环刷。这套命令谁都会,但按顺序串起来用,能少走很多弯路。这篇就当自己的笔记,顺便给你一份顺手能抄的排查清单。</p></description>
</item>
<item>
<title>Kafka 消息积压的排查与治理</title>
<link>https://forminio.github.io/posts/kafka-consumer-lag/</link>
<pubDate>Fri, 21 Aug 2026 09:45:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/kafka-consumer-lag/</guid>
<description><h2 class="relative group">先确认是不是真的积压
 <div id="先确认是不是真的积压" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%85%88%e7%a1%ae%e8%ae%a4%e6%98%af%e4%b8%8d%e6%98%af%e7%9c%9f%e7%9a%84%e7%a7%af%e5%8e%8b" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>告警说“消息积压”,第一步不是扩容,而是确认 lag 的趋势:</p></description>
</item>
<item>
<title>移动端点击穿透:那个让我加了一晚上班的 Bug</title>
<link>https://forminio.github.io/posts/mobile-click-penetration/</link>
<pubDate>Sun, 16 Aug 2026 09:30:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/mobile-click-penetration/</guid>
<description><p>先说个背景。那阵子在做一个 H5 活动页,最后一版功能都齐了,QA 在小程序里点了几下,报了一个&quot;点了取消,结果把底下的按钮也点了&quot;的问题。我当时第一反应是 JS 逻辑写 bug 了,结果从白天查到晚上,才发现根本不是逻辑问题,是移动端浏览器在背后搞的鬼。</p></description>
</item>
<item>
<title>Spring Boot 3 + GraalVM Native Image 实践</title>
<link>https://forminio.github.io/posts/springboot-graalvm-native/</link>
<pubDate>Wed, 17 Jun 2026 14:20:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/springboot-graalvm-native/</guid>
<description><h2 class="relative group">为什么要 Native Image
 <div id="为什么要-native-image" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e8%a6%81-native-image" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>传统 JVM 应用启动要经历类加载、字节码验证、解释执行、JIT 预热。一个中等规模的 Spring Boot 服务,冷启动 2 到 5 秒很常见,内存占用动辄几百 MB。</p></description>
</item>
<item>
<title>自动化测试跑三个月后,怎么保持不崩</title>
<link>https://forminio.github.io/posts/automated-test-maintenance/</link>
<pubDate>Fri, 05 Jun 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/automated-test-maintenance/</guid>
<description><p>自动化刚上线那阵子通常每天全绿。可跑满三个月,画风就变了:每天总有几条用例飘红,一查全是环境抖动、等待超时、用例互相踩,真业务 bug 反而被这堆&quot;假红&quot;淹没,分辨哪个红是真的成了每天的例行工作。这时候才会意识到,自动化不是写完就完事,它是个要持续养的东西。下面这几招是从&quot;天天飘&quot;救回&quot;基本稳&quot;的关键。</p></description>
</item>
<item>
<title>GitHub Actions 给测试搭条无人值守跑道</title>
<link>https://forminio.github.io/posts/github-actions-test-ci/</link>
<pubDate>Wed, 20 May 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/github-actions-test-ci/</guid>
<description><p>自动化和&quot;能自动跑&quot;是两回事。写好一批 pytest 用例是基本功,但如果跑还得靠本地敲命令,一忙就忘了跑回归,上线前一天才慌忙补测就晚了。把这一堆活儿交给 GitHub Actions:push 上去自动拉依赖、跑测试、出报告、挂了还自动通知。相当于给测试搭了条无人值守的跑道,人只要负责写用例,其余全自动。</p></description>
</item>
<item>
<title>团队协作 Git 习惯:分支策略与冲突处理</title>
<link>https://forminio.github.io/posts/git-branch-collaboration/</link>
<pubDate>Mon, 11 May 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/git-branch-collaboration/</guid>
<description><h2 class="relative group">先定分支策略再动手
 <div id="先定分支策略再动手" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%85%88%e5%ae%9a%e5%88%86%e6%94%af%e7%ad%96%e7%95%a5%e5%86%8d%e5%8a%a8%e6%89%8b" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>多人合作最容易乱的不是代码,是分支怎么用。一个常见问题是大伙各自拉支、随便合,主线经常被弄成一团。一套简单的约定是:主分支只接受合并请求,功能分支从主分支拉出来,改完合回去。</p></description>
</item>
<item>
<title>Spring Boot零停机部署</title>
<link>https://forminio.github.io/posts/springboot-shutdown/</link>
<pubDate>Thu, 30 Apr 2026 14:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/springboot-shutdown/</guid>
<description><h2 class="relative group">为什么需要零停机部署?
 <div id="为什么需要零停机部署" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e9%9c%80%e8%a6%81%e9%9b%b6%e5%81%9c%e6%9c%ba%e9%83%a8%e7%bd%b2" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>想象一下这个场景:你的应用正在处理一笔关键的支付请求,请求已经扣款成功,正准备返回结果给前端。此时运维同学执行了 <code>kill -9</code> 强制杀死进程——结果这笔订单状态永远停留在&quot;处理中&quot;,用户钱扣了但订单未完成。</p></description>
</item>
<item>
<title>Redis 大 Key 和热 Key,排查与化解两手抓</title>
<link>https://forminio.github.io/posts/redis-bigkey-hotkey/</link>
<pubDate>Wed, 29 Apr 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/redis-bigkey-hotkey/</guid>
<description><h2 class="relative group">延迟告警,源头可能是个 200MB 的 key
 <div id="延迟告警源头可能是个-200mb-的-key" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%bb%b6%e8%bf%9f%e5%91%8a%e8%ad%a6%e6%ba%90%e5%a4%b4%e5%8f%af%e8%83%bd%e6%98%af%e4%b8%aa-200mb-%e7%9a%84-key" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>一种典型现象:Redis 的延迟告警一波接一波,P99 冲到几百毫秒。登录 <code>redis-cli</code> 一查,一个 ZSET 里存了上百万个元素,单个 key 就 200MB。这就是<strong>大 key</strong>:查询、过期、删除时单线程的 Redis 都会卡住,直接影响整台实例上的其他请求。大 key 和热 key,是 Redis 稳定性的两个头号杀手,下面逐一过一遍。</p></description>
</item>
<item>
<title>Redis集群搭建与实战</title>
<link>https://forminio.github.io/posts/redis-cluster-setup/</link>
<pubDate>Tue, 28 Apr 2026 10:30:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/redis-cluster-setup/</guid>
<description><h2 class="relative group">前言
 <div id="前言" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%89%8d%e8%a8%80" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>在高并发场景下,单节点 Redis 往往无法满足业务需求。无论是容量限制还是性能瓶颈,都促使我们必须将 Redis 扩展到多节点架构。本文将手把手带你搭建一个生产级的 Redis Cluster 集群。</p></description>
</item>
<item>
<title>Docker Compose 搭一套部署环境:服务编排与日志</title>
<link>https://forminio.github.io/posts/docker-compose-deployment-practice/</link>
<pubDate>Thu, 26 Mar 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/docker-compose-deployment-practice/</guid>
<description><h2 class="relative group">为什么用 Compose
 <div id="为什么用-compose" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e7%94%a8-compose" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>单容器好管理,一旦服务多起来,起停、编排、网络配置都手忙脚乱。Compose 用一个 yaml 把整套环境定义清楚,<code>docker compose up -d</code> 一次拉起,团队也能照着这个文件复现环境。</p></description>
</item>
<item>
<title>数据库慢 SQL 排查:EXPLAIN 不是终点</title>
<link>https://forminio.github.io/posts/mysql-slow-sql-troubleshooting/</link>
<pubDate>Tue, 24 Mar 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/mysql-slow-sql-troubleshooting/</guid>
<description><h2 class="relative group">一张三千万行的表,把接口拖垮了
 <div id="一张三千万行的表把接口拖垮了" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%80%e5%bc%a0%e4%b8%89%e5%8d%83%e4%b8%87%e8%a1%8c%e7%9a%84%e8%a1%a8%e6%8a%8a%e6%8e%a5%e5%8f%a3%e6%8b%96%e5%9e%ae%e4%ba%86" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>一种典型场景:报表接口突然从 200ms 涨到 4s,打开慢查询日志,几乎全是同一句 SQL。用 EXPLAIN 一查,明明走了索引,怎么还慢?这正是标题想说的:<strong>EXPLAIN 显示用了索引,不代表这条 SQL 就是快的。</strong> 排查得一层层往下挖。</p></description>
</item>
<item>
<title>MyBatis-Plus 批量写入:别以为 foreach 就是批量</title>
<link>https://forminio.github.io/posts/mybatis-plus-batch-perf/</link>
<pubDate>Wed, 11 Mar 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/mybatis-plus-batch-perf/</guid>
<description><h2 class="relative group">随手一个循环就&quot;批量&quot;了?
 <div id="随手一个循环就批量了" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e9%9a%8f%e6%89%8b%e4%b8%80%e4%b8%aa%e5%be%aa%e7%8e%af%e5%b0%b1%e6%89%b9%e9%87%8f%e4%ba%86" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>一个常见误区:看到 <code>List</code> 遍历里挨个 <code>save()</code>,以为就是批量。压测数据一出来就发现根本不是——那其实是逐条 INSERT,几千条数据跑出几十秒,数据库连接来回握手全耗在等待上了。<strong>&ldquo;批量&quot;两个字不是靠循环堆出来的,是让数据库一次拿到一大坨。</strong></p></description>
</item>
<item>
<title>接口调试利器:Charles 抓包配合接口测试工具</title>
<link>https://forminio.github.io/posts/apifox-charles-api-debug/</link>
<pubDate>Thu, 05 Mar 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/apifox-charles-api-debug/</guid>
<description><p>联调期最常遇到的僵局,是&quot;明明前端调了后端接口,后端说没收到&quot;。两边谁都觉得自己对,最后往往拿抓包工具一拦,真相就浮出来。一套常用的组合是 Charles 抓包看真实流量,配合接口测试工具发请求、对比行为。这套做法能把不少说不清的&quot;玄学联调&quot;问题按到源头。</p></description>
</item>
<item>
<title>线上出问题,先会这几条 Linux 排查命令</title>
<link>https://forminio.github.io/posts/linux-troubleshoot-commands/</link>
<pubDate>Mon, 23 Feb 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/linux-troubleshoot-commands/</guid>
<description><h2 class="relative group">别一上来就翻代码
 <div id="别一上来就翻代码" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%88%ab%e4%b8%80%e4%b8%8a%e6%9d%a5%e5%b0%b1%e7%bf%bb%e4%bb%a3%e7%a0%81" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>线上报故障,第一反应最容易犯的错是直接去翻日志、改代码。真正靠谱的顺序是先用系统命令把「症状」变成「具体指标」,再决定往哪查。</p></description>
</item>
<item>
<title>Spring Data Redis 连接池:Lettuce 的坑与配置调优</title>
<link>https://forminio.github.io/posts/spring-data-redis-lettuce-connection/</link>
<pubDate>Tue, 17 Feb 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/spring-data-redis-lettuce-connection/</guid>
<description><h2 class="relative group">一段突然变慢的缓存查询
 <div id="一段突然变慢的缓存查询" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%80%e6%ae%b5%e7%aa%81%e7%84%b6%e5%8f%98%e6%85%a2%e7%9a%84%e7%bc%93%e5%ad%98%e6%9f%a5%e8%af%a2" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>一种典型现象:压测时 Redis 延迟从 1ms 蹿到几十甚至上百 ms,P99 直接拉胯。参数改了不少却没效果,最后发现问题出在 <strong>Lettuce 的连接管理</strong>——不是 Redis 慢,是客户端自己把请求堵在门口了。这个坑值得讲透。</p></description>
</item>
<item>
<title>Allure 报告:让自动化结果一眼看懂</title>
<link>https://forminio.github.io/posts/allure-test-report/</link>
<pubDate>Thu, 12 Feb 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/allure-test-report/</guid>
<description><p>自动化跑完,最怕的不是用例挂,而是挂了以后没人看得懂挂在哪儿。pytest 默认只给一屏堆栈,落在别人眼里全是找不到元素、断言失败,看不出实际卡在哪一步。Allure 能把一条用例拆成步骤、挂上截图、标好层级,跑完点开就能按流程还原问题现场,把&quot;挂了&quot;这件事讲清楚。下面说说具体怎么接进去。</p></description>
</item>
<item>
<title>用 InfluxDB 存秒级遥测数据:写入、保留策略与降采样</title>
<link>https://forminio.github.io/posts/influxdb-time-series-storage/</link>
<pubDate>Fri, 06 Feb 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/influxdb-time-series-storage/</guid>
<description><h2 class="relative group">别再拿关系库硬扛秒级数据
 <div id="别再拿关系库硬扛秒级数据" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%88%ab%e5%86%8d%e6%8b%bf%e5%85%b3%e7%b3%bb%e5%ba%93%e7%a1%ac%e6%89%9b%e7%a7%92%e7%ba%a7%e6%95%b0%e6%8d%ae" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>储能设备的 SOC、温度、功率每秒一批,攒一天就是上千万行。这类数据如果塞进关系库,表会迅速膨胀、查询得扫区间、索引也救不回来。这里需要明确一点:<strong>秒级时序这种数据,就该给时序库</strong>。InfluxDB 的存储引擎和压缩机制就是为这种&quot;高频追加、按时间切分&quot;的量身设计,落盘占用和查询效率都不是关系库能比的。</p></description>
</item>
<item>
<title>用 Flask 顺手写个小服务:从路由到部署</title>
<link>https://forminio.github.io/posts/flask-quick-service/</link>
<pubDate>Wed, 28 Jan 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/flask-quick-service/</guid>
<description><h2 class="relative group">为什么用 Flask
 <div id="为什么用-flask" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e7%94%a8-flask" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>当内部需要快速暴露几个轻量接口时,Java 那套往往偏重,而 Flask 轻、够快,几个人顺手就能撑起来。本文不是讲怎么搭大工程,而是把几个真正实用的小环节记下来。</p></description>
</item>
<item>
<title>一次线上 OOM 排查:从堆转储到定位泄漏对象</title>
<link>https://forminio.github.io/posts/jvm-oom-troubleshooting/</link>
<pubDate>Thu, 22 Jan 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/jvm-oom-troubleshooting/</guid>
<description><h2 class="relative group">服务突然挂了,先别慌
 <div id="服务突然挂了先别慌" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e6%9c%8d%e5%8a%a1%e7%aa%81%e7%84%b6%e6%8c%82%e4%ba%86%e5%85%88%e5%88%ab%e6%85%8c" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>线上接口突然全部 5xx。登上去一看,<code>jstat</code> 显示老年代一直在涨,GC 越调越频繁,最后干脆 <code>OutOfMemoryError: Java heap space</code>。OOM 看起来吓人,但排查是有套路的,不用靠猜。</p></description>
</item>
<item>
<title>分布式锁的四种实现与踩坑记录</title>
<link>https://forminio.github.io/posts/distributed-lock-practices/</link>
<pubDate>Wed, 21 Jan 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/distributed-lock-practices/</guid>
<description><h2 class="relative group">为什么单机锁不够
 <div id="为什么单机锁不够" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e5%8d%95%e6%9c%ba%e9%94%81%e4%b8%8d%e5%a4%9f" aria-label="锚点">#</a>
 </span>
 
</h2>
<p><code>synchronized</code> 和 <code>ReentrantLock</code> 只能保证同一个 JVM 内的互斥。服务一旦多实例部署,两个线程可能在不同进程里同时拿到“锁”,库存照样超卖。</p></description>
</item>
<item>
<title>第一次拆微服务,注册中心与网关先解决的两件事</title>
<link>https://forminio.github.io/posts/spring-cloud-first-look/</link>
<pubDate>Wed, 14 Jan 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/spring-cloud-first-look/</guid>
<description><h2 class="relative group">拆分前先想清楚&quot;谁管理谁&quot;
 <div id="拆分前先想清楚谁管理谁" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e6%8b%86%e5%88%86%e5%89%8d%e5%85%88%e6%83%b3%e6%b8%85%e6%a5%9a%e8%b0%81%e7%ae%a1%e7%90%86%e8%b0%81" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>从单体往微服务拆,最忌讳的是一上来就开十几个服务,结果服务互相手动配置 IP,比单体还乱。一个典型错误是服务间直接写死对方的地址,一扩缩容就全断。拆出来的第一件事必须是<strong>注册中心</strong>——让服务地址成为动态发现,而不是写死在配置里。Nacos 是常见选择,因为它同时承担注册中心和配置中心,一套搞定两种诉求。</p></description>
</item>
<item>
<title>Selenium4 Page Object:UI 自动化从脚本到框架</title>
<link>https://forminio.github.io/posts/selenium-pageobject-framework/</link>
<pubDate>Mon, 05 Jan 2026 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/selenium-pageobject-framework/</guid>
<description><p>写 UI 自动化有一种常见起步是&quot;脚本流&quot;:一个文件里 find_element、click、断言全堆一块,跑通就完事。结果一个注册流程写了两百行,页面改个 button 的 class,得满文件找哪一行在点它。换成 Page Object 模式,把每一页封装成一个类,元素定位和页面动作收进去,测试方法只负责&quot;讲故事&quot;,才算从脚本长成一个能维护的东西。</p></description>
</item>
<item>
<title>爬虫入门:请求头、频率控制与反爬的攻与守</title>
<link>https://forminio.github.io/posts/python-crawler-anti-scraping/</link>
<pubDate>Mon, 29 Dec 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/python-crawler-anti-scraping/</guid>
<description><h2 class="relative group">不要一上来就裸 requests
 <div id="不要一上来就裸-requests" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%8d%e8%a6%81%e4%b8%80%e4%b8%8a%e6%9d%a5%e5%b0%b1%e8%a3%b8-requests" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>新手写爬虫容易图省事,直接 requests.get(url) 就去抓,结果刚跑几十个就返回一堆 403。目标站反爬很直接,光看 User-Agent 一眼就能认出请求是程序发的。</p></description>
</item>
<item>
<title>后端解析 PDF 简历:PDFBox 提取文本的坑与技巧</title>
<link>https://forminio.github.io/posts/pdfbox-resume-parsing/</link>
<pubDate>Mon, 22 Dec 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/pdfbox-resume-parsing/</guid>
<description><h2 class="relative group">为什么 PDF 提取不靠谱
 <div id="为什么-pdf-提取不靠谱" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%ba%e4%bb%80%e4%b9%88-pdf-%e6%8f%90%e5%8f%96%e4%b8%8d%e9%9d%a0%e8%b0%b1" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>用后端解析 PDF 简历,最常见的坑是「提取出来的文本顺序乱」。以为 PDFBox 拿到文本就完事,但打出来一看,两栏排版的简历内容被拆得七零八落,一段话横跨两行,就读不顺了。</p></description>
</item>
<item>
<title>重复提交和请求重放,靠幂等挡住</title>
<link>https://forminio.github.io/posts/distributed-idempotency-defense/</link>
<pubDate>Fri, 19 Dec 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/distributed-idempotency-defense/</guid>
<description><h2 class="relative group">一个按钮被点了两次
 <div id="一个按钮被点了两次" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%80%e4%b8%aa%e6%8c%89%e9%92%ae%e8%a2%ab%e7%82%b9%e4%ba%86%e4%b8%a4%e6%ac%a1" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>典型的场景是支付回调:用户连点两下&quot;确认&quot;,或者网关超时重发,结果账上多了一笔。要避免这类问题,&ldquo;幂等&quot;应该写进每次接口设计的必查清单:<strong>同一个请求,发一次和发十次,业务结果必须一样。</strong></p></description>
</item>
<item>
<title>缓存穿透、击穿、雪崩,一层层防线怎么挡</title>
<link>https://forminio.github.io/posts/redis-cache-breakdown-guarantee/</link>
<pubDate>Mon, 08 Dec 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/redis-cache-breakdown-guarantee/</guid>
<description><h2 class="relative group">三种&quot;坏缓存&quot;别混着修
 <div id="三种坏缓存别混着修" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%89%e7%a7%8d%e5%9d%8f%e7%bc%93%e5%ad%98%e5%88%ab%e6%b7%b7%e7%9d%80%e4%bf%ae" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>穿透、击穿、雪崩,三个词耳熟,但如果把它们当一回事去修,方案就容易张冠李戴。说清楚区别才有对症下药的空间:</p></description>
</item>
<item>
<title>JVM 垃圾回收器选型:Serial、G1、ZGC 怎么选</title>
<link>https://forminio.github.io/posts/jvm-gc-selection/</link>
<pubDate>Sat, 06 Dec 2025 20:30:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/jvm-gc-selection/</guid>
<description><h2 class="relative group">先明确两个指标
 <div id="先明确两个指标" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%85%88%e6%98%8e%e7%a1%ae%e4%b8%a4%e4%b8%aa%e6%8c%87%e6%a0%87" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>选 GC 之前,先回答两个问题:</p></description>
</item>
<item>
<title>并发场景锁怎么选:synchronized、ReentrantLock 还是乐观锁</title>
<link>https://forminio.github.io/posts/java-concurrency-lock-selection/</link>
<pubDate>Thu, 27 Nov 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/java-concurrency-lock-selection/</guid>
<description><h2 class="relative group">先回答&quot;到底用哪把锁&quot;
 <div id="先回答到底用哪把锁" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%85%88%e5%9b%9e%e7%ad%94%e5%88%b0%e5%ba%95%e7%94%a8%e5%93%aa%e6%8a%8a%e9%94%81" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>新人总爱问:线程安全是不是无脑 <code>synchronized</code>?不是。选锁之前的第一个问题应该是:<strong>这个数据是读多写少,还是写冲突很多?</strong></p></description>
</item>
<item>
<title>RabbitMQ 可靠投递:从生产到消费全链路不丢消息</title>
<link>https://forminio.github.io/posts/rabbitmq-reliable-delivery/</link>
<pubDate>Wed, 19 Nov 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/rabbitmq-reliable-delivery/</guid>
<description><h2 class="relative group">不丢消息是三层防线的事
 <div id="不丢消息是三层防线的事" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%8d%e4%b8%a2%e6%b6%88%e6%81%af%e6%98%af%e4%b8%89%e5%b1%82%e9%98%b2%e7%ba%bf%e7%9a%84%e4%ba%8b" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>一个常见误解是&quot;消息发出去了就完事&quot;。数据对账时发现差了一批,一查是 broker 重启时内存里没来得及落盘的消息没了。<strong>消息会丢在三个地方:生产端发送、broker 存储、消费端确认</strong>。哪一层没守住,链路就漏。</p></description>
</item>
<item>
<title>SentenceTransformer 文本向量化:相似度匹配怎么落地</title>
<link>https://forminio.github.io/posts/sentence-transformer-embedding/</link>
<pubDate>Wed, 12 Nov 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/sentence-transformer-embedding/</guid>
<description><h2 class="relative group">为什么会想到用向量化
 <div id="为什么会想到用向量化" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e4%bc%9a%e6%83%b3%e5%88%b0%e7%94%a8%e5%90%91%e9%87%8f%e5%8c%96" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>文本匹配如果一直走关键词和正则,遇到一句话换个说法就匹配不上了。比如&quot;熟练掌握 Python&quot;和&quot;精通 Py&quot;本应是一个意思,正则完全看不出来。把两段文本各自转成向量、用余弦相似度判断亲疏,是更通用的一种做法。</p></description>
</item>
<item>
<title>@Scheduled 秒级调度不是无脑 Cron:幂等与补偿才是难点</title>
<link>https://forminio.github.io/posts/scheduled-task-dispatch/</link>
<pubDate>Thu, 06 Nov 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/scheduled-task-dispatch/</guid>
<description><h2 class="relative group">Cron 随手一写,坑是后置的
 <div id="cron-随手一写坑是后置的" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#cron-%e9%9a%8f%e6%89%8b%e4%b8%80%e5%86%99%e5%9d%91%e6%98%af%e5%90%8e%e7%bd%ae%e7%9a%84" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>写定时任务看似顺手,<code>@Scheduled(cron = &quot;0 0 1 * * ?&quot;)</code> 一摆,接口里对着库扫一遍就完事。可一到多实例部署就露馅:两个 Pod 同时到点,同一个任务跑两遍,脏数据、重复扣减全来了。所以说秒级调度,<strong>真正难得不是哪秒触发,而是触发了之后怎么保证只干一次、干错了能兜回来</strong>。</p></description>
</item>
<item>
<title>用 DeepSeek API 做文本匹配:上下文清洗比调 prompt 更关键</title>
<link>https://forminio.github.io/posts/deepseek-prompt-resume-matching/</link>
<pubDate>Sun, 26 Oct 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/deepseek-prompt-resume-matching/</guid>
<description><h2 class="relative group">需求最初长什么样
 <div id="需求最初长什么样" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e9%9c%80%e6%b1%82%e6%9c%80%e5%88%9d%e9%95%bf%e4%bb%80%e4%b9%88%e6%a0%b7" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>一个典型需求是做候选文档与岗位要求的文本匹配打分。很容易把重点放在堆 prompt 上:以为提示词越长、约束越多就越准,但实际效果忽高忽低,同一份输入换个措辞结果就变。</p></description>
</item>
<item>
<title>Docker 镜像瘦身:从 1.2GB 到 180MB</title>
<link>https://forminio.github.io/posts/docker-image-slim/</link>
<pubDate>Wed, 22 Oct 2025 11:05:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/docker-image-slim/</guid>
<description><h2 class="relative group">镜像为什么越做越大
 <div id="镜像为什么越做越大" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e9%95%9c%e5%83%8f%e4%b8%ba%e4%bb%80%e4%b9%88%e8%b6%8a%e5%81%9a%e8%b6%8a%e5%a4%a7" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>一个常见的 Spring Boot 项目,<code>docker images</code> 里躺着 1.2GB 的镜像:Maven、JDK、源码、<code>.git</code>、测试报告、本地仓库全都打了进去。镜像大不只是占硬盘,它还会拉慢发布、扩大攻击面、增加每台节点的存储压力。</p></description>
</item>
<item>
<title>MySQL 事务隔离级与 MVCC:从脏读说起,一层层剥开</title>
<link>https://forminio.github.io/posts/mysql-transaction-isolation-mvcc/</link>
<pubDate>Sat, 18 Oct 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/mysql-transaction-isolation-mvcc/</guid>
<description><h2 class="relative group">为什么要认真对待隔离级别
 <div id="为什么要认真对待隔离级别" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e8%a6%81%e8%ae%a4%e7%9c%9f%e5%af%b9%e5%be%85%e9%9a%94%e7%a6%bb%e7%ba%a7%e5%88%ab" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>一个很典型的翻车场景:一个定时任务先 <code>UPDATE</code> 一笔订单状态,再去读另一张表聚合出结果。如果任务跑在<strong>读未提交</strong>的隔离级别下,自己还没提交的数据可能被别人读走,一旦回滚,对账就对不上。</p></description>
</item>
<item>
<title>pytest 数据驱动:参数化写测试,少写一半重复代码</title>
<link>https://forminio.github.io/posts/pytest-data-driven-testing/</link>
<pubDate>Thu, 09 Oct 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/pytest-data-driven-testing/</guid>
<description><p>写接口测试最原始的做法,是一个接口一个用例函数,数据全写死在函数体里。结果一个&quot;查询订单&quot;的接口,要写七八个几乎一样的分支,只改动订单状态和期望值。这种场景本就不该一个个手写,用 pytest 的参数化,一套逻辑喂十几个场景,代码量能砍半还不止。</p></description>
</item>
<item>
<title>储能设备 MQTT 实时上报:从接入到落库的完整链路</title>
<link>https://forminio.github.io/posts/mqtt-telemetry-ingestion/</link>
<pubDate>Sun, 05 Oct 2025 10:00:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/mqtt-telemetry-ingestion/</guid>
<description><h2 class="relative group">先说说设备端什么脾气
 <div id="先说说设备端什么脾气" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%85%88%e8%af%b4%e8%af%b4%e8%ae%be%e5%a4%87%e7%ab%af%e4%bb%80%e4%b9%88%e8%84%be%e6%b0%94" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>储能柜里的设备上报频率说高不高、说低不低,SOC、电压、温度这些量基本是秒级一条,高峰能到几百台集群同时推。一个容易踩的坑是:让每台设备都连一个独立 client,一上线 broker 连接数会涨到几千条,线程池容易被瞬间打穿。所以<strong>设备多、消息频率高</strong>这条路上,第一件事不是写落库代码,而是先想清楚接入姿势。</p></description>
</item>
<item>
<title>从 HTTP/1.1 到 HTTP/3:一次把演进讲清楚</title>
<link>https://forminio.github.io/posts/http-evolution/</link>
<pubDate>Sun, 07 Sep 2025 15:10:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/http-evolution/</guid>
<description><h2 class="relative group">为什么需要 HTTP/2
 <div id="为什么需要-http2" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e9%9c%80%e8%a6%81-http2" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>HTTP/1.1 用 <code>keep-alive</code> 复用了 TCP 连接,但同一条连接上的请求必须串行:前一个响应没回来,后一个只能排队。这就是<strong>应用层队头阻塞</strong>。</p></description>
</item>
<item>
<title>MySQL 索引失效的十个常见场景</title>
<link>https://forminio.github.io/posts/mysql-index-pitfalls/</link>
<pubDate>Wed, 30 Apr 2025 09:20:00 +0800</pubDate>
<guid>https://forminio.github.io/posts/mysql-index-pitfalls/</guid>
<description><h2 class="relative group">前言
 <div id="前言" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e5%89%8d%e8%a8%80" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>线上一条查询突然从 20ms 涨到 2s,<code>EXPLAIN</code> 一看 <code>type=ALL</code>。表上明明有索引,为什么没走?大多数“索引失效”并不是索引坏了,而是写法让优化器没法用。</p></description>
</item>
<item>
<title>关于</title>
<link>https://forminio.github.io/about/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://forminio.github.io/about/</guid>
<description><h2 class="relative group">👋 你好!我是 Forminio
 <div id="-你好我是-forminio" class="anchor"></div>
 
 <span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
 <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#-%e4%bd%a0%e5%a5%bd%e6%88%91%e6%98%af-forminio" aria-label="锚点">#</a>
 </span>
 
</h2>
<p>一个热爱编程、热爱技术的开发者。</p></description>
</item>
</channel>
</rss>