Clearing stale cache by domain

You can clear a site’s cache by domain, this is really nifty if you have Varnish in front of multiple sites. You can log into Varnish’s administration console via telnet and execute the following purge command to wipe out the undesired cache.

purge ~

Monitor Response codes

Worried that some of your clients might be receiving 503 Varnish response pages? Find out with varnishtop.

varnishtop -i TxStatus

Here is how the output looks like.

list length 7                                                                                                                                                                               web

  4018.65 TxStatus	 200
   132.35 TxStatus	 304
    44.17 TxStatus	 404
    34.63 TxStatus	 302
    30.87 TxStatus	 301
     9.36 TxStatus	 403
     1.39 TxStatus	 503