Is there any way to achieve the service throttling ability to the rest services in Spring, particular with Spring boot.
The Expectation here is: My services are exposed to outside world, currently there are no restrictions on the number of service calls per second/min. We want to control this by putting the throttling limit.
But more interested in the way spring in considering this. I know that i can be able to do it in node.js / scala
There is a fairly new opensource project which handles this:
https://github.com/shlomokoren/spring-boot-throttling
Declarative approach of throttling control over the Spring services. @Throttling annotation helps you to limit the number of service method calls per java.util.concurrent.TimeUnit for a particular user, IP address, HTTP header/cookie value, or using Spring Expression Language (SpEL).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With