Service Throttling ability in Spring Boot

Kiran Parepalli :

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.

  • I have an alternative option, by tracking the requests in concurrent Hash Map or any caching mechanism.

But more interested in the way spring in considering this. I know that i can be able to do it in node.js / scala

trf :

There is a fairly new opensource project which handles this:

https://github.com/weddini/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).

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=453395&siteId=1