Speeding up blojsom
Posted by Pepijn Oomen
After the switch to Jetty, I was still not quite happy with the performance of blojsom on my server, but it looks like activating Apache's mod_proxy really makes a difference.
What happens now is that requests to blog.piprograms.com are rewritten to be served to the /blog servlet and then send off to a reverse proxy running on localhost where if is passed onto Jetty through the AJP/1.3 connector. Here are the relevant parts from the configuration for Apache:
<VirtualHost _default_>
ServerName blog.piprograms.com
...
RewriteEngine On
...
RewriteRule ^/(.*) /blog/$1 [L,P]
ProxyRequests Off
ProxyPass /blog http://127.0.0.1/blog
ProxyPassReverse /blog http://127.0.0.1/blog
...
CacheRoot "/var/cache/apache"
CacheSize 10240
CacheGcInterval 24
</VirtualHost>
<VirtualHost 127.0.0.1>
JkMount /blog/* ajp13
</VirtualHost>


