envoyproxy / envoyproxy/ratelimit

Rolling window limits?

Đang mở
#32 10 bình luận 9 reaction 0 người được giao Xem trên GitHub
enhancement help wanted
Ngôn ngữ chính
Go
Star
2.7k
Fork
535
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi!
Does the library support rolling windows limits?
For example, if my limit is 60 per hour, there are 2 ways to go about it
1) If the user hits the limit, she has to wait for 1 hour before the limit resets. Making even one call during the one hour time period will extend the limit by another hour. For example: if I made 60 calls in 1 hour, and then make one call in 1:59, I will be rate limited, and will have to wait for until 2:59 for the limit it reset )
2) The limits get incremented as the time window slides, to always count only the events in the last hour. For example: if I made 60 calls in 1 hour (5 of which were in the first minute), and 1:01 I am allowed to make 5 more calls.

Based on reading the code, I think only 1 is supported, but just want to make sure

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.