Skip to content

Commit

Permalink
doc: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
WTIFS committed Oct 30, 2023
1 parent 5bb4bc4 commit 5b46766
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugin/ratelimiter/bbr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,12 @@ func (l *BBR) maxInFlight() int64 {
- `l.minRT()` 为 单个采样窗口中最小的响应时间
- 0.5为向上取整
- 则上述公式表示每毫秒能同时处理的最多请求数。用当前并发请求数 `inFlight` 与计算值比较,判断是否触发限流

## 代码结构
```go
├── core BBR核心算法实现
├── cpu CPU使用率采集相关实现
├── window 滑动窗口相关实现
├── bucket.go 实现 `QuotaBucket` 接口
├── plugin.go 实现 `Plugin` 接口
```

0 comments on commit 5b46766

Please sign in to comment.