Open zhaowujin opened 3 years ago
I found it works as token bucket but NOT leaky bucket, I wonder if I miss understand the leaky bucket algorithm
I found it works as token bucket but NOT leaky bucket, I wonder if I miss understand the leaky bucket algorithm
According to the code, it has burst which proves it's a token bucket where you can have burst because you didn't use all the tokens. For a leaky packet, it will slows down the coming traffic until the gate opens, it surely not the same thing.
@whongki Thanks for the clarification! I spent the whole day wondering why it was a leaky bucket rate limiter, this tool looks more like a token bucket.
@whongki Thanks for the clarification! I spent the whole day wondering why it was a leaky bucket rate limiter, this tool looks more like a token bucket.
hmm... After more research on my part, it seems that GRCA is not a traditional leaky bucket, but an algorithm based on time windows but belonging to the leaky bucket type I don’t quite understand the difference between GRCA and token bucket, nor why GRCA is a leaky bucket algorithm as mention
It seems like there are 2 version of leaky bucket
In case of took it as a meter, leaky bucket actually the same as token bucket.
In fact both are effectively the same, i.e. implementations of both the leaky bucket and token bucket, as these are the same basic algorithm described differently.
Sometimes, token bucket is more suitable.