how to restrict/allow n number of parallel calls to access rest api method
how to restrict/allow n number of parallel calls to access rest api method
How to allow n number of calls to a particular rest api method.
For example I would like to prevent/allow '10' calls only to access rest api method.If I'm trying to call rest api method 11th time, it should not allow you to execute.Is there any chance to achieve this type of situations.
Thanks in advance.
Thanks for reply..Is there any examples please
– B Nagarjuna
Aug 31 at 10:08
@Rohit this question is a poor fit over there for the same reasons as it is here. Please abstain of recommending sites you're not familiar with. See also: What goes on Software Engineering (previously known as Programmers)? A guide for Stack Overflow
– gnat
Aug 31 at 14:02
1 Answer
1
There is no build-in Spring solution for this.
The best from my perspective is the solution based on Guava's RateLimiter. This article has a good explanation of whats going on inside.
Other examples are available by this links: here, or here
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
For rate limiting or throttling read here
– Rohit
Aug 31 at 9:32