知识卡片
服务端执行限流规则
客户端可减少无效请求,却可能被绕过;真正的保护规则需要在可信服务端或网关执行。放在业务服务中便于定制算法,复用现有网关可减少建设成本,选择取决于能力与维护资源。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 第04章 限流器
原书出处 · 1 处
- 限流器 · 查看原书依据
Where to put the rate limiter? Intuitively, you can implement a rate limiter at either the client or server-side. •Client-side implementation. Generally speaking, client is an unreliable place to enforce rate limiting because client requests can easily be forged by malicious actors. Moreover, we might not have control over the client implementation. •Server-side implementation. Figure 4-1 shows a rate limiter that is placed on the
参考来源
- 位置:《System Design Interview – An insiders guide, Second Edition》第04章《限流器》(来源项目 book-sources;源文件:extracted/System Design Interview – An insiders guide, Second Edition/_epub-src/text/part0009_split_002.html)
- 结论依据:原文在该位置给出所述对象、机制或比较,支持本卡的解释;原书未展开的实现不作为已证明结论,算式与一致性边界在正文明确限定。
- 原始内容:Where to put the rate limiter? Intuitively, you can implement a rate limiter at either the client or server-side. •Client-side implementation. Generally speaking, client is an unreliable place to enforce rate limiting because client requests can easily be forged by malicious actors. Moreover, we might not have control over the client implementation. •Server-side implementation. Figure 4-1 shows a rate limiter that is placed on the