TRAFEX TRAFEX Consultancy Consultancy
Debugging Varnish requests with varnishncsa

Debugging Varnish requests with varnishncsa

June 2, 2014

Varnish provides some tools to help you monitor and debug Varnish' health. One of those tools is varnishncsa. When you run it without arguments it shows a real-time access log in the Apache combined log format. That’s nice and can come in handy. But, it really gets interesting when you define your own format like this:

varnishncsa -F '%t %r %s %b %{Varnish:time_firstbyte}x %{Varnish:handling}x'

This will give the following output:

[03/Jun/2014:14:55:54 +0200] GET http://<domain>/<page> HTTP/1.1 200 493 0.167023897 pass

The last two are the interesting values:

This makes it easy to see which requests are hurting the backend and need some attention.

Go back

Recent articles

Articles

Checklist: Prepare your website for Go Live

When you’re ready to launch your website or web application, you can use this checklist to be fully prepared for the Go Live and have a smooth transition!

Read More

Articles

The key components of Kubernetes autoscaling

Autoscaling is an important feature of Kubernetes. With this feature you always have enough resources for the workload, and when a node becomes unhealthy it gets replaced without effecting the workload. But you won’t get it automatically by just deploying your Pods on Kubernetes.

Read More

Articles

Create a DB backup from a pod running MySQL on Kubernetes

When using the MySQL docker image you can easily create a DB dump with this one-line CLI command.

Read More