Question
· Nov 7

how to get notification that a web client has disconnected when using EnsLib.SOAP.Service/EnsLib.REST.Service

We've got some web services that utilise EnsLib.SOAP.Service/EnsLib.REST.Service. These do some further requests to a few operations to call some other services and return the combined results.

An issue that we are noticing is that some of the usage involves users hitting the refresh button a few too many times and generating a lot of requests. This is mostly an issue when the service that the operations are calling are down or slow to respond. IRIS starts using a lot of RAM when this occurs and has caused outages by getting through an extra 50-60GB of RAM.

I'm looking at possible ways to help prevent the unintended denial of service that result.

Does IRIS have any ability to get notification of prematurely closed client connections from calls through httpd using the csp_module_sa module? I've only seen that it just displays the error when it fails to send the result back, but can't see if there is any eventing of the connection status.

Other solutions involve counting how many active sessions are in place and just denying access when the session count exceeds a threshold. I thought of possibly adding a counter that increases when at the start of the service and decreases at the end. I haven't checked to see if sessions are always returned as cancelled if manually removed. Is there anything like this that already exists?

 

I'm aware that an API manager may help with this situation, but need a stopgap measure.

Product version: IRIS 2024.1
Discussion (0)1
Log in or sign up to continue