caching服务器在Apache Tomcat的前面

我们有一个网站,现在的架构如下:

caching图像的前面有鱿鱼。 然后是Apache的httpd与mod_rewrite启用。 httpd然后与Apache的Tomcat(与mod_jk)对话dynamic请求和服务器静态的东西,如js,CSS本身。 Apache的httpd重写干净的URL到原始的(与丑陋的URL PARAMS),tomcat处理。 mod_rewriteconfiguration中有超过100个重写规则。 我们也有一些PHP的东西,我们一起砍了facebook的工作。 PHP文件由Apache服务,但负载明显较less。

因此,我们的目标是能够积极caching静态文件(js,css,images),并将dynamic的东西直接提供给tomcat。 我们需要url重写(这可能是在tomcat本身),gzip / deflate支持以及对php的支持。

所以,根据我们的需要,像squid / varnish这样的caching服务器可以直接放在tomcat前面来完成这个工作,或者我们需要一个像nginx / lighttpd这样的web服务器,因为我们需要php吗?

为什么不同时使用apache / lighttpd作为代理/caching服务器和php解释器?

lighttpd作为caching代理: http : //forum.lighttpd.net/topic/4845

Apache作为caching代理: http : //httpd.apache.org/docs/2.2/caching.html