NIO connector + gzip compression

I have been a tomcat user for a long time, and now I want to start the game with tomcat 7 in order to update

We use standalone tomcat, using BIO serving a lot of static resources ... so this article is in your "top ten of 2010" http://www.tomcatexpert.com/blog/2010/03/24/myth-or-truth -one-should-always-use-apache-httpd-front-apache-tomcat-improve-perform was of great interest

However, our current use (Tomcat 6 + BIO) uses gzip compression, for example:

<Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="9400" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,text/javascript,text/css"/> 

However, when I looked at the documentation, I noticed that both APR and NIO connectors do not have / options for compression. Can someone clarify how I can configure compression in a similar way via server.xml / connector? If it is not available, do you plan to enable this functionality?

I know that we can write this ourselves using our own gzip filters, etc .; however, the connector approach is simpler and more elegant, since the gzip filter should be applied to all of our webapps (10+ web applications in the SOA architecture).

thanks

+4
source share
1 answer

I think you misunderstood the documentation. He says :

The standard HTTP connectors (BIO, NIO, and APR / native) support the following attributes in addition to the common connector attributes listed above.

The compression property is in the "standard" list, so I would assume that all its other connectors support it.

0
source

Source: https://habr.com/ru/post/1336704/


All Articles