You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
The token bucket algorithm can be conceptually understood as follows:
1. A token is added to the bucket every 1/r seconds.
2. The bucket can hold at the most b tokens. If a token arrives when the bucket is full, it is discarded.
3. When a packet (network layer PDU) of n bytes arrives, n tokens are removed from the bucket, and the packet is sent to the network.
4. If fewer than n tokens are available, no tokens are removed from the bucket, and the packet is considered to be non-conformant.
您好,我是华中科技大学的一名研究生,我在github上看到了阿里巴巴开源的文件分发系统的源码draonfly,该系统中提到提供主机级别限速的功能,我对这方面很感兴趣,在阅读源码的过程中,有一些地方不太理解,源码的gettet模块是客户端处理文件分发和共享的模块,其中有一个componnet中有一个ratelimiter的类是用来限速的,其中有几个关键变量token和window是具体代表什么呢?没有特别弄明白。
另外,我想问一下您的主机限速的逻辑是什么呢?是怎么保证该主机的速度不超过其设置的运行速度的呢?
The text was updated successfully, but these errors were encountered: