Varnish + Tomcat vs Apache + mod_cache + mod_jk +Tomcat

Dridi Boukelmoune dridi.boukelmoune at
Wed Oct 16 12:53:49 CEST 2013


I have no data to show, but since I use all three tools, I can give
you my two cents :)

Varnish + Tomcat is definitely the simplest architecture, because it
does not involve AJP. I would also consider changing the default
(blocking) http connector on the Tomcat side and measuring performance
improvements (non blocking, native...). I'm also a big fan of the VCL
which feels a lot more natural than httpd's configuration to me.

As I trust Varnish not to be the bottleneck, I am not keen on adding a
new indirection (httpd) for a binary protocol that is not relevant to
me anymore. I believe (still no data) having a 10Gb/s connection
between Varnish and Tomcat (I assume they're not sitting too far from
each other) outperforms the compactness of AJP (serialization

Best Regards,

On Wed, Oct 16, 2013 at 10:54 AM, Adrian Ber <beradrian at> wrote:
> Does anyone have some comparison data in terms of performance for using in
> front of Tomcat either Varnish or Apache with mod_jk. I know that AJ
> connector suppose to be faster than HTTP, but I was thinking that in
> combination Varnish which is lighter and highly optimized could perform
> better. There is also the discussion between static resources (which I think
> will perform faster with Varnish than Apache, even with mod_cache) and
> dynamic pages.
> I asked this question on ServerFault too
> Which configuration would be advisable Varnish + Tomcat or Apache +
> mod_cache + mod_jk +Tomcat?
> Thanks,
> Adrian Ber.
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at

More information about the varnish-misc mailing list