---
title: "使用Varnish反向代理Tomcat"
author: "codingstandards"
date: "2012-11-22T13:04:40Z"
tags: []
categories: ["开源软件"]
slug: "varnish-tomcat"
draft: false
lastmod: "2012-11-22T13:06:23Z"
id: 1733177
url: "https://codingstandards.iteye.com/blog/1733177"
---

Varnish是一款高性能开源HTTP加速器，挪威最大的在线报纸 Verdens Gang (http://www.vg.no) 使用3台Varnish代替了原来的12台squid，性能居然比以前更好。

　　Varnish 的作者Poul-Henning Kamp是FreeBSD的内核开发者之一，他认为现在的计算机比起1975年已经复杂许多。在1975年时，储存媒介只有两种：内存与硬盘。但现在计算 机系统的内存除了主存外，还包括了cpu内的L1、L2，甚至有L3快取。硬盘上也有自己的快取装置，因此squid cache自行处理 的架构不可能得知这些情况而做到最佳化，但操作系统可以得知这些情况，所以这部份的工作应该交给操作系统处理，这就是 Varnish cache设计架构。

　 　经过varnish开发团队和网友们的辛苦耕耘，现在的varnish已经很健壮。很多门户网站已经部署了varnish，并且反应都很好，甚至反应比 squid还稳定，且效率更高，资源占用更少。相信在反向代理，web加速方面，varnish已经有足够能力代替squid。

- [高性能网站加速器 Varnish Cache 简介](http://www.vktone.com/articles/intro_of_varnish_cache.html)
- ### [在 CentOS 下安装 Varnish Cache](http://www.vktone.com/articles/install_varnish_cache_on_centos.html)
- ### [让 varnish 反向代理 tomcat 缓存（一）](http://www.vktone.com/articles/tomcat_via_varnish_1.html)
- ### [让 varnish 反向代理 tomcat 缓存（二）](http://www.vktone.com/articles/tomcat_via_varnish_2.html)
- ### [让 varnish 反向代理 tomcat 缓存（三）区分手机访问](http://www.vktone.com/articles/tomcat_via_varnish_3.html)
- ### [让 varnish 反向代理 tomcat 缓存（四）](http://www.vktone.com/articles/tomcat_via_varnish_4.html)
- ### [varnish配置语言-VCL详解](http://www.vktone.com/articles/vcl_intro.html)
- ### [varnish默认VCL逻辑（一）](http://www.vktone.com/articles/default_vcl_in_varnish_1.html)