5. Getting the data
● https://github.com/varnish/varnishgather was born
● Gathers OS,Varnish and companion tools details
● One file per command
6. Stability
● Crash, panic or something else?
● Check varnishadm panic.show and syslog
● Start from command line
● Install debugging symbols, allow coredumps
● Get your hands dirty
7. Functional
● Code not reached, wrong logic or expectations
● printf debugging (std.log / std.syslog)
● Enable tracing (param.set vsl_mask +VCL_trace)
● Reproduce with varnishtest
● Check varnishlog
8. Anatomy of a .vtc
varnishtest "Hello world"
server s1 {
rxreq
expect req.http.msg == "hello"
txresp -body "world"
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
set req.http.msg = "hello";
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.body == "world"
} -run
10. Operational
● Low hitrate or high response times
● Inspect headers on the client side
● Use varnishtop
● Increase your EXP with varnishlog
● Understand the waitinglist
11. Request coalescing
● Automatically enabled for misses
● Only one request at a time goes to the backend
● Other requests for the same object will wait
● Avoids overloading the backend
12. Capacity
● Inadequate number of threads
● Dataset too big / cache too small
● Monitor varnishstat output
● Did I say varnishlog?
13. Not my problem
● “It must be the cache” axiom
● Test bypassing Varnish
● Check timeouts
● The truth is on the wire (aka look at tcpdump)
15. The bottom line
● It is not always the cache
● Not all errors are the same
● Become familiarised with the tools
● varnishlog is the swiss army knife of varnish