Varnish - identifying the account with highest traffic

If you are running multiple domains on your server and content is cached through Varnish, you may often need to identify in real time which accounts are generating the most traffic.

 

Below are some Varnish 4.x commands that can be used to identify accounts with the highest traffic:

1. Sorted list of hostnames with the highest number of requests:

varnishtop -C -I ReqHeader:Host

The output may look like this:

 

2. Find the most frequently accessed URLs:

varnishtop -i ReqURL

Here is an example of the output:

 

3. Sort requests by any header value (e.g., by User-Agent header):

varnishtop -C -I ReqHeader:User-Agent

The output may look like this:

×