2

I have a Apache load balancer and a jBoss cluster serving it.

Now I would like to add compression/gzip to the responses but so far I've only found how to enable it on the load balancer or on the http-connector in jBoss. Nothing about enabling it on the ajp-connector.

I don't want to do the compression on the load balancer as I think it should do as little as possible save load balancing.

Is it possible?

VC1
  • 1,660
  • 4
  • 25
  • 42
Andreas Wederbrand
  • 38,065
  • 11
  • 68
  • 78

2 Answers2

0

If you are using AJP to connect from JBoss to your proxy there is no need for compression, do the compression in your virtualhosts configuration or in your httpd.conf.

http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html

It's not even supported.

Jeremy
  • 2,870
  • 3
  • 23
  • 31
  • I would like the result that leaves the load balancer to be compressed but not add work to it (as there is only one load balancer and an entrire cluster of jBoss servers). I know how to add compression in Apache, but that is not the question :) – Andreas Wederbrand Sep 26 '12 at 04:38
  • Doing it at Apache is the standard way to do it. I doubt you'll even notice any additional load. Alternatively add another layer. – Jeremy Sep 26 '12 at 14:00
0

As mentioned AJP doesn't support compression. For scenarios where you want JBoss to do the compression you should just have to do the proxy over http:

<Proxy balancer://mycluster>
BalancerMember http://192.168.1.50:8080
BalancerMember http://192.168.1.51:8080
</Proxy>
ProxyPass /test balancer://mycluster

Where 192.168.1.50 and .51 are your JBoss servers, configured to use compression on http.

Tea Curran
  • 2,923
  • 2
  • 18
  • 22