David Beavon (Software) asked a question.

Adminstration of Tomcat filters for Rate-Limiting (for sake of PASOE)

We've been experiencing an client-side issue on PASOE lately where a NetCoreApp openclients will exhaust their TCP ports (because the openclient won't pool the HTTP connections and reuse them).

 

Server-Side

And depending on specific moment of time when that happens, it can apparently bring down an entire APSV ABL application in the back-end PASOE server. Yes, it is very strange but true.

 

Persistent Procs are Involved (?)

I think it is partly to do with the fact that we are running "persistent procedures" over a "session-free" connection to APSV. I've heard this is a recipe for problems, although the docs are not explaining the stuff very well. And the openclient itself isn't discouraging the use of persistent procs on session-free connections (... it seems like it should be easy for Progress engineers to discourage this, by throwing a well-placed exception in their client library, or whatever).

 

Tomcat-based solution?

I think one option to avoid running out of TCP ephemeral ports is to just throttle the rate of requests from the misbehaving remote openclient. An OE admin might be able to implement this on the tomcat/PASOE server side. They could throttle a particular IP so severely that there would never be an opportunity to run out of TCP ports when interacting with this service. For example, if we restricted client IPs to 100 requests per minute then it would be virtually impossible for the clients to exhaust their outbound TCP ports that connect to PASOE. Has anyone looked into configuring rate filters on PASOE/tomcat? Would Progress fully support these sorts of tomcat features? Is this one of the main benefits that they gained when they built PASOE on top of apache tomcat?

 

https://tomcat.apache.org/tomcat-9.0-doc/config/filter.html#Rate_Limit_Filter

 

 

If someone has implemented rate limits for PASOE, can you please share your experiences?

 

If we opened a ticket and our web.xml had these interesting tomcat features enabled, then would Progress still continue to offer full support? Or would it void the warranty?


    • David Beavon (Software)

      Thanks for that tip. We use IDisposable, and it works most of the time.

       

      I think the problems arise primarily on the NetCoreApps because there is a new bug where client-side TCP sockets can be exhausted and then IDisposable can't make whatever round-trip is needed to tell the server that the bound connection is no longer required.

       

      The bound resources are held indefinitely (until the expiration of the HTTP session in tomcat, which is a very long time - almost forever by computer standards).

       

      I have a support case open but it is taking a long time, and I'm trying to brainstorm ways where the server-side can administratively protect itself from misbehaving clients. It isn't ideal that a server process can be at the mercy of a buggy openclient in a NetCoreApp. There should be a way for the server to protect itself, possibly with the DoS prevention features in tomcat.