Speed ​​up images in Tomcat 6

In tomcat 6, I have a servlet running openbluedragon, everything compiles and the quik servers, with the exception of images, they are really far behind. Any optimization suggestions for image service?

Here is my server.xml:

    <Service name="Catalina">

      <Connector port="8009" protocol="AJP/1.3" />
      <Connector port="8080" maxThreads="100" protocol="HTTP/1.1" connectionTimeout="20000" />
      <Engine name="Standalone" defaultHost="hostname.whatever" jvmRoute="ajp13">

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
      <Host name="hostname.whatever"  appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
        ...context
      </Host>

    </Engine>
  </Service>
+3
source share
3 answers

Another option is to use apache as an interface, connecting tomcat with mod_jk. This way you can let apache serve static content (e.g. images, css, javascript) and let tomcat generate dynamic content. You can leave some work to separate static content from dynamic, but it works fine for me.

Unix apache - , , 80, root. Apache , root , Tomcat . , root.

( , , mod_jk)

+4

? , Expires, tomcat. , , . .

+4

, . - Apache, HTTP-. URL- . Trac. ProxyPass ProxyPassReverse - , .

, /images, Apache - Tomcat. . - , , , .

Apache is not the only choice here. I think all modern web servers have similar functionality. If I started today, I would rather look at LigHTTPd, simply because it does less.

There may even be caching reverse proxies that automatically detect this for you. I am not familiar with any of them.

+3
source

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


All Articles