知识卡片
安全延迟要盯住访问热路
一次会话认证后用户仍会反复携令牌访问,热路径的令牌校验和权限检查需随系统扩展。减少不必要的远程查库、合理缓存模型可降延迟,但不能删掉必需的验证。容量问题往往先表现为延迟,尤其缓存未命中的尾部慢请求;应独立度量并测试这些路径,而非只看平均值。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 宏观架构中的安全 · 查看原书依据
Token checks also need to scale with the rest of the system. If those checks are stateless (make the decision only by looking at the request when tokens are used), it greatly simplifies the scaling design. In addition, latency challenges often surface, not as average latency spikes, but as tail latency spikes, where the latter is much harder to debug because they are harder to recreate. Tail latencies often occur in cache-miss paths, so careful and focused testing at development can save a lot of time later.
参考来源
- 位置:《Software Architecture and Decision-Making》第08章《宏观架构中的安全》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch08.xhtml)
- 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。
- 原始内容:Token checks also need to scale with the rest of the system. If those checks are stateless (make the decision only by looking at the request when tokens are used), it greatly simplifies the scaling design. In addition, latency challenges often surface, not as average latency spikes, but as tail latency spikes, where the latter is much harder to debug because they are harder to recreate. Tail latencies often occur in cache-miss paths, so careful and focused testing at development can save a lot of time later.