Enabling gzip compression for a JBoss cluster using mod_jk load balancer

We have JBoss configured in a cluster with Apache HTTP + mod_jk as a load balancer. Do I need to configure anything on the Apache side in addition to setting compression in the JBoss configuration for the connector?

+4
source share
1 answer

In standard JBoss, gzip compression can be enabled for the HTTP connector, but not for AJP. An AJP connector is used between the Apache HTTP server and JBoss.

To enable gzip compression on the Apache HTTP server side, add the following lines to mod_jk.conf before </VirtualHost>:

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript 

This will allow you to use gzip compression for the given mime types using the mod_deflate output filter http://httpd.apache.org/docs/2.2/mod/mod_deflate.html .

Also uncomment the following line in httpd.conf to enable mod_deflate:

LoadModule deflate_module Modules / mod _deflate.so

+6
source

All Articles