6. Enabling GZIP compression in Tomcat

You can speed up the serving of QueueMetrics pages over a WAN by transparently compressing the page before being sent; it will be transparently decompressed by your browser. As QueueMetrics pages (especially large tables) are highly redundant, this technique can buy large improvements in the user experience at a cost of some CPU time on the server.

6.1. Prerequisites

  • A working QueueMetrics instance

6.2. Changes to Tomcat

Edit the server.xml file under tomcat/config; locate the HTTP connector instance (the one that shows port 8080) and change it as follows:

<Connector port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true"

    compression="on"
    compressionMinSize="2048"
    noCompressionUserAgents="gozilla, traviata"
    compressableMimeType="text/html,text/xml"
/>

Restart QueueMetrics.

6.3. Changes to QueueMetrics

None required.

6.4. For further reading