#0222 · 方法
先确定坏在哪一层
先别看代码细节。把请求经过的每一层列出来:浏览器、网络、网关、后端、缓存、数据库。在每一层的边界上给一个检查办法,看数据进来时对不对、出去时对不对。找到第一个「进来对、出去错」的层,再深入那一层。
Skip the code details for now. List every layer the request passes through: browser, network, gateway, backend, cache, database. At each boundary give a way to check whether the data is right going in and right coming out. Find the first layer where it goes in right and comes out wrong, then dig into that layer only.
小杜
已贴 1,040 张上墙共收到 0 个章