Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gost流量限速不够精准 #555

Open
intmain0 opened this issue Aug 8, 2024 · 1 comment
Open

gost流量限速不够精准 #555

intmain0 opened this issue Aug 8, 2024 · 1 comment

Comments

@intmain0
Copy link

intmain0 commented Aug 8, 2024

在一个连接刚开始的时候(第1秒),连接速度会冲得很高然后恢复正常。原因是限流器Token桶的容量设的比较大了。https://github.com/go-gost/x/blob/bc0d6953bcb372b6394f8ed648552dfa824d66bc/limiter/traffic/limiter.go#L19
第二个参数修改成r/20+1就可以解决了

@ginuerzh
Copy link
Member

并不是桶的大小问题,而是令牌桶初始状态下是满的,因此在第一秒会有一个burst。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants