Here are my notes on installing and configuring varnish proxy cache on ubuntu systems ::
# Install varnish on webserver via apt-get
# Uncomment the backend default setting in /etc/varnish/default.vcl
# Change the port numbers in /etc/default/varnish
# Change the port numbers in /etc/apache/ports.conf
# Restart Apache and Varnish
More information here : http://varnish.projects.linpro.no/static/getting-started.html
| Function | Description | Possible keywords |
|---|---|---|
| vcl_recv | Called after receiving a request. Decides how to serve the request | error, pass, pipe |
| vcl_pipe | Called after entering pipe mode.Creates a direct connection between the client and the backend, bypassing Varnish all together. | error, pipe |
| vcl_pass | Called after entering pass mode. Unlike pipe mode, only the current request bypasses Varnish. Subsequent requests for the same connection are handled normally. |
error, pass |
| vcl_hash | Called when computing the hash key for an object. | hash |
| vcl_hit | Called after a cache hit. | error, pass, deliver |
| vcl_miss | Called after a cache miss. | error, pass, fetch |
| vcl_fetch | Called after a successful retrieval from the backend. An ‘insert’ will add the retrieved object in the cache and then continue to vcl_deliver |
error, pass, insert |
| vcl_deliver | Called before the cached object is delivered to the client. | error, deliver |
| vcl_timeout | Called by the reaper thread shortly before an object expires in the cache ‘discard’ will discard the object and ‘fetch’ will retrieve a fresh copy |
discard, fetch |
| vcl_discard | Called by the reaper thread when a cached object is about to be discarded due to expiration or space is running low | discard, keep |
Varnish has a set of command line tools and utilities to monitor and administer Varnish. These are:

Post new comment