/etc/yum.repos.d/varnish.repo
[varnishcache_varnish41]
name=varnishcache_varnish41
baseurl=https://packagecloud.io/varnishcache/varnish41/el/6/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/varnishcache/varnish41/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
OK, ready then
yum clean all
yum install varnish
Check the version:
…
# /usr/sbin/varnishd -V
varnishd (varnish-4.1.8 revision d266ac5c6)
varnishadm ban
When cleaning the cache on varnish 3.0 there is a way to only ban the specific host.
The command is:
varnishadm -T localhost:1234 ban req.http.host ~ “site.com” && req.url ~ …
check_backend.sh
Another bash script to monitor if there were any failed connections to the backend’s.
It is a simple aproach using the command:
varnishstat -1 -f backend_fail
Then it puts the …
varnish performance analyser
A script to get the time of each requests and verify how long it took.
Example
req | [0,1[ | [1,2] | ]2,3] | ]3,4] | ]4,5] | <=10 | …
Script to purge varnish cache
There is a easy way to allow developers to stop bugging us the system adminsitror, “clean the cache”.
Just setup this php page on a apache server and they can …
check_conntrack_unreplied
Our front end varnish servers expierence a lot of traffic and we currently
must have a iptables NAT that routes from port 80 to port 81, where the varnish daemon …
How varnish can identify mobile users
How varnish can identify mobile users
In this example it basically finds out via regex on the user-agent tag if the user
is mobile if so it redirect to a …