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

How to make a load testing plan

Load testing gives insight into a web application’s behavior under peak load conditions and realistic load conditions. By load testing your web application you will identify the maximum capacity the web application can handle as well as any bottlenecks and determine which element is causing degradation.

Read More

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 affecting the workload. But you won’t get it automatically by just deploying your Pods on Kubernetes.

Read More