Varnish is a high-performance open-source HTTP accelerator. VerdensGang, the largest online newspaper in Norway, uses three Varnish instances to replace the original 12 Squids. The performance is even better than before. Varnish's author, Poul-HenningKamp, is one of FreeBSD's kernel developers. He believes that today's computers are much more complex than in 1975. In March 1975,
Varnish is a high-performance open-source HTTP accelerator. Verdens Gang, Norway's largest online newspaper, uses three Varnish instances to replace the original 12 squ instances.IdThe performance is better than before.
Varnish's author, Poul-Henning Kamp, is one of FreeBSD's kernel developers. He believes that today's computers are much more complicated than in 1975. In 1975, there were only two storage media types: memory and hard disk. However, in addition to primary memoryCpL1, L2, or even L3 cache in u. The squid cache also has its own caching device on the hard disk.ArchitectureIt is impossible to know these situations for optimization, but the operating system can know these situations, so this part of the work should be handed over to the operating system, which is the Varnish cache design architecture.
1. Varnish official https://www.varnish-cache.org/
2. Get source wget http://repo.varnish-cache.org/source/varnish-3.0.0-beta2.tar.gz
3.
Tar zxvf varnish-3.0.0-beta2.tar.gz
CdVarnish-3.0.0-beta2
./Configure -- prefix =/usr/local/varnish
Make & make install
If No package 'libpcre' found is returned, run yum install pcre-devel.
4. Modify/usr/local/varnish/etc/varnish/default. vcl
#
Backend default {
. Host = "10.146.87.240"; // The cache is not found and then switched to the server
. Port = "80 ";
}
5. Start
/Usr/local/varnish/sbin/varnishd-f/usr/local/varnish/etc/varnish/default. vcl-s malloc, 1G-T 127.0.0.1: 2000
Port 80 is listened on by default.