top of page

Varnish Cache


Overview :

Varnish Cache is a web application accelerator "Caching HTTP reverse proxy". We can install in front of any server that speaks HTTP and configure to cache its contents.

This helps in where your content management is on a slower side and you have no other way of replacing it (might be due to its dependencies)

Architecture :

Installation :

  1. yum install epel-release

  2. curl -s https://packagecloud.io/install/repositories/varnishcache/varnish5/script.rpm.sh | sudo bash

  3. yum install varnish

Remove the default files :

4. rm /etc/varnish/default.vcl

5. rm /etc/varnish/varnish.params

6. Open /etc/varnish/default.vcl and set the value of .host for the backend nuxeo to the IP or Host Name or Nuxeo server. Please refer below snippet.

Open /etc/varnish/default.vcl and set the value of .host for the backend nuxeo to the IP or Host Name or Nuxeo server. Please refer below snippet.

image

Monitoring Varnish cache :

Varnishhist : It reads varnishd shared memory logs and presents a continuously updated histogram showing the distribution of the last N requests by their processing.

Varnishtop -1 : To check what are all the data that is there in the Varnish

Varnishstat : This view gives us information about the misses, hits, information about the storage, threads created, deleted objects.

varnishncsa : To see the logs for Varnish (This is updated in runtime)

bottom of page