简体   繁体   中英

Enable compression/gzip on the ajp-connector in jBoss

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM