Comments (8)
Let me ask, did you check the configuration example in the README file? It shows you how to configure access limit per user.
About the restart, it's not really necessary, are you using spring-boot-actuator along with Spring Cloud Config Server? Applying these tools to your project will make it possible to change the configuration on the fly.
answered by @marcosbarbero
from spring-cloud-zuul-ratelimit.
I also have a doubt, that why dont we use code to dynamic change the filter params, so we can store the config in mysql or redis instead. and also can effect the config for a certain time interval. otherwise the refresh config is also a dangerous action, it may damage the online program.
from spring-cloud-zuul-ratelimit.
Hello @zhongyusimon, as this project is meant to use spring-cloud-netflix
implementation in which supports spring-cloud-config-server
, I don't believe it's good to add this jdbc
configuration support as it's already supported by spring-cloud-config-server
.
This project will always support the same configurations available for spring-boot
.
from spring-cloud-zuul-ratelimit.
Then i have a suggestion about this. cause the project lack of custom logic, we could support config the rule of code style in addition. just like we can use most of models in config way or in code way, so that we can do a lot of things in code with persistence config or complex logic for routing.
from spring-cloud-zuul-ratelimit.
I'm not really sure if I understood your suggestion
from spring-cloud-zuul-ratelimit.
it means we can config the params in yaml or config it in code. just like we can use feign with packed function, or use RestTemplate with custom function.
from spring-cloud-zuul-ratelimit.
Feign
and RestTemplate
are totally different beasts comparing to this library.
Let's say that feign
and restTemplate
are libraries meant to be used directly and then you can reconfigure it as necessary because it needs to be explicitly used in the code in order to make the requests.
In the other hand, this rate limiter implementation is not meant to be explicitly used in the code, it needs to be configured and used as such, you won't explicitly call a filter
or anything like that, however, if what you need is to be able to create your own filter
then it will be necessary to revisit this project architecture, right now it's not that simple to make it.
from spring-cloud-zuul-ratelimit.
First, the configuration is on the refresh scope, so restart is not needed.
I strongly agree with @marcosbarbero, this project is an implementation specific to zuul in order to add rate limit capabilities with a minimum overhead and as fast as possible.
It is definitely not meant to be explicitly used in the business logic code.
But, if you want to customize the policies dynamically, you can always add a filter that runs before the rate limit filter and modify the policies configuration as you wish.
Of course, there are some limitation to the dynamicity of how this project use the configuration.
from spring-cloud-zuul-ratelimit.
Related Issues (20)
- Rate Limit for List of Users HOT 4
- JDK 8 compatibility HOT 6
- Rate Limit by multiple types : Origin and HTTP_HEADER HOT 1
- How to use url_pattern ? HOT 9
- url_pattern in v.2.42.0 HOT 2
- Consul repository not working with URL_PATTERN HOT 2
- Fix Travis-CI Integration
- High Performance degradation happen because of method synchronization HOT 3
- How do you pass REDIS configs for REDIS based ratelimit HOT 8
- URL Pattern key HOT 2
- Working example using bucket4j HOT 8
- Migrate from Travis CI to Circle CI HOT 1
- Visibility on the usage of Log4j HOT 1
- Recent Spring Boot Support? HOT 2
- General Question for better understanding HOT 10
- Configuration "zuul.ratelimit.enable=false" failed to start the service HOT 3
- Rate Limited consistently though refresh interval is crossed HOT 13
- Query regarding MatchType And breakOnMatch HOT 11
- How can set the zuul ratelimit filter for group of users other than the user with name xxxx HOT 2
- Not able to make policy with url_pattern HOT 2
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 spring-cloud-zuul-ratelimit.