Axis WebService Java Congestion Management

We want to implement the overload mechanism on our web service. Basically, we want to reject incoming SOAP requests when the TPS (transaction per second) value reaches the specified value, for example, 100 or 150. To do this, we need to count the number of requests received and the number of responses sent.

Could you suggest me where to start this implementation? How to count requests and answers?

Thanks a lot, Sekhar

+3
source share
1 answer

I think you should implement message counting and deletion in a handler. Here's a good description in the Axis documentation on how to write and register handlers in your web service: Using handlers in JAX-WS web services .

Basically what you do by code: you create a handler class that implements javax.xml.ws.handler.soap.SOAPHandler. In the method, handleMessage(...)you count incoming messages and, as Javadoc points to the Handler interface , return falseif there is an overload limit.

Hope this helps you get started.

+1
source

All Articles