On Windows i connect Apache2 to Tomcat7 via AJP.

Is there any configuration that can throttle the communication?

This is my workers.properties


This is my httpd.conf:

  JkMount /* node1

We need to test upload-progress-bars and async request in enterprise ajax application.

mod_bw does not work with JkMount.

  • Why do you want to do this? Dec 14, 2013 at 15:14
  • @TomO'Connor See updated question.
    – Grim
    Dec 15, 2013 at 9:25

1 Answer 1


As far as I know AJP neither on the Apache nor on the Tomcat end does throttling, but instead tries to pass the request on between the layers as fast as it can.

Here are some thoughts:

One can set connection limits for workers, which when reached leads to the worker not accepting more connections, so as to avoid saturation and overload.

One can introduce more backend hosts and balance workers between them, so as to increase capacity.

One can limit bandwidth in Tomcat for instance using custom filters, which would be a coding solution.

One can use the http connector instead of AJP in order to use the compression option, and possibly increase throughput over the same connections.

One can introduce network level bandwidth control to throttle the AJP connection throughput "from the outside". In Linux this could be done natively using the iptables --limit and --limit-burst directives. To the best of my knowledge Windows is however lacking a native network level bandwith throttling solution. Lucckily there are third-party add-ons which provide granular bandwidth control such as Netlimiter and Netbalancer.

Looking outside the OS one could run the connections through a limiter appliance such as a hardware load balancer, but then why use AJP at all?

Critical though is that whichever way you manage to do your throttling, you need to see that both Apache and Tomcat has capacity to let their request queues/backlogs grow, as one can imagine the session count increases if requests are fulfilled more slowly.

Finally, IIS has native bandwidth throttling, and can reverse-proxy/URL rewrite through the ARR module to a backend Tomcat. I am not sure if throttling is available to ARR:ed connections, but if you are on Windows anyway it may be worth taking a look.

  • Too bad, they are on the same machine.
    – Grim
    Dec 21, 2013 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.