Is there any way to limit the number of times a web service can be called??
Are you talking about a limitation on the client side or server side?
On server side, I guess, you can count the calls in the WS, and return certain status when it exceed the limit.
Hi Monica,
as far my understanding you are asking how to throttle incoming HTTPS request (web service):
If you cannot break the flow into two like getting all the request and later process them in batch (as offline process) and if its a true real-time request, then you can use the Advanced controls option to increase or decrease the thread capacity and delay for accepting incoming request.
One thing to remember is, if private thread pool is enabled and the max thread size of that is less than the incoming concurrent requests then you have to set the backlog, keepalivetimeout, Listener control and Private thread pool controls accordingly so that IS or Client doesn’t timeout or error out during the process.
It would be good, if even though it gets timeout there should be retry mechanism at client side. There is no limit to number of times user increase or decrease the listener control and Private thread pool controls. Max thread cannot be set to zero. if this is not your concern let me know more about your problem and use case .
If your organization already owns it or is willing to make the investment, the proper way to throttle web service requests in the webMethods platform is via webMethods Mediator. From the Mediator Fact Sheet:
In the absence of Mediator, you’ll likely have to build a custom solution, one perhaps that leverages private thread pools as suggested by Murali. There may be other options as well depending on your specific requirements.
Percio