I’m a newbie on Nginx and I became interested in it because Apache 2 is
so wasteful with resources. However, Nginx seems a lot slower than
Apache. It takes about 3 seconds to return a request even when I’m
within the cache timeout period which surprises me.
My test server is 512MB, Lucid Lynx with Apache Tomcat 6.0.24 and Nginx
0.7.65.
I’ve set up an asset server configuration and an application server
configuration.
Any help’s appreciated.
server.xml
I also tried the Nio protocol with the same result.
I used apt-get install libtcnative-1 (1.1.19) to install the APR support
for Tomcat and I can see that the native libraries are being loaded
Do you see something like this at tomcat startup?
Jan 3, 2011 6:29:22 PM org.apache.catalina.core.AprLifecycleListener
init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
Jan 3, 2011 6:29:22 PM org.apache.catalina.core.AprLifecycleListener
init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].
Jan 3, 2011 6:29:23 PM org.apache.coyote.http11.Http11AprProtocol init
And do you have defined connector for your service catalina in
server.xml with Http11AprProtocol :
If yes, you have indeed Tomcat with APR well configured.
@Weibin
Do you know the difference between the apr_cache directives and the
proxy_cache directives
They are probably fudnamentally different but because they look so
similar I’m wondering
@Weibin
Do you know the difference between the apr_cache directives and the
proxy_cache directives
They are probably fudnamentally different but because they look so
similar I’m wondering
apr_cache or ajp_cache? ajp_cache is the similar feature with
proxy_cache while nginx_ajp_module connects with backends via AJP
connector.