Comments (10)
Has there been a decision on an algorithm for rolling window rate limiting yet?
from ratelimit.
Windowed limits are not currently supported.
from ratelimit.
Would you be interested in something like https://github.com/brandur/redis-cell?
This practically shifts the rate limit algorithm implementation from the service to Redis, but I think could be implemented with minimal effort.
from ratelimit.
@andrascz it might be interesting to support something like that, though I think to be useful we would need to support those commands with whatever sharding/cluster system is being used. A single redis host is not going to scale in most deployments.
from ratelimit.
I am not 100% sure as I did not try it on cluster, but based on brandur/redis-cell#30, either it is already working or needs minimal tweaks.
from ratelimit.
@mattklein123 If the redis-cell
support sentinel and cluster setup, will envoyproxy/ratelimit
use it? Or you are inclined toward internal code implementation?
from ratelimit.
@mattklein123 If the redis-cell support sentinel and cluster setup, will envoyproxy/ratelimit use it?
Can you describe more what you are proposing?
from ratelimit.
There are two possible approaches to support rolling window limits:
- Use redis-cell then create a new cache impl that uses redis-cell commands
- Implement rolling window limit logic in new cache impl with basic Redis commands
The first approach would create a dependency on redis-cell
module and shifting implementation to Redis.
This is a tradeoff between creating dependency vs maintaining implementation, which approach does the maintainer prefer?
from ratelimit.
In general I think (2) is better, but I have no objection to having an option that requires redis-cell as long as it is opt-in.
from ratelimit.
I don't think there was a decision made to strictly use a certain algorithm. There was work being done in #243 and #193 to implement rolling window but it's gone stale unfortunately.
from ratelimit.
Related Issues (20)
- Support for prefix match in global rate limiting HOT 2
- Feature Request: Configurable Time Units for Rate Limit HOT 2
- Rate Limiting quota adjustment and key identification prior to rate limiting when applying multiple descriptors HOT 3
- Missing one descriptor value in statsD message with two unspecific value descriptors. HOT 4
- Nested descriptors with the json endpoint HOT 2
- Error in rate-limit integration tests HOT 3
- How do you monitor Limits value? HOT 2
- No stable and recommend version from v1.4.0 HOT 4
- Return unavailable when arrive limit for grpc request. HOT 1
- Upgrade google.golang.org/grpc from v1.52.0 to v1.56.3/v1.57.1/v1.58.3 for CVE HOT 5
- Applying global ratelimit filter on certain routes only HOT 3
- detailed_metric support for dynamic config using xDS server HOT 2
- response time is too long when Redis is DOWN HOT 7
- xDS client doesn't handle stream closure with RST_STREAM
- Can the input of REDIS_URL be ip adress rather than URL? HOT 3
- `RateLimitResponse_DescriptorStatus` should include the name of the descriptors HOT 2
- radix.v3 to radix.v4 HOT 2
- Is there a REST API? HOT 1
- Config error, unknown key 'detailed_metric' HOT 2
- Allow control of stats flush interval with env var HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ratelimit.