I had asked this question on ITSecurity, but I felt this question is better placed here.
On a recent assesment, I found that sending large (>5 MB) requests to a tomcat server causes 100% CPU usage on the server. The simplest fix that came to mind was to use the maxPostSize on the connector. However this did not help since the request I need to send is not "form-url-encoded". I read around to find that the maxPostSize is only applicable to that header.
So, what is the alternate way to stop such large packets right at the server before passing it on to the application ?
In other words: How do I prevent a DoS on a Tomcat server by from an attacker who sends multiple large data requests