Today, when you look at the varnish upper-level Source traffic, we find that the traffic is much larger than usual. At this time, you need to calmly think about the problem and see how small series solves it.
- View the traffic diagram of zabbix, and find that the bandwidth is significantly increased by several hundred MB.
- Go to the CDN node and run the varnishlog-I txurl command to check which URLs cause back-to-source. It is found that the origin is always returned because of cookies. The solution is as follows:
3. Add the following in the varnish configuration file:
# Remove Cookies and query strings (static files do not usually need to process Cookies and QueryStrings)
If (req. url ~ "^/[^?] + \. (F3d | jpg | png )(\?. * |) $ ")
Unset req. http. cookie;
Set req. url = regsub (req. url, "\?. * $ "," ");
}
View the zabbix traffic diagram again. The traffic is down.
Conclusion: You can view the Back-to-source traffic diagram later. If the url cannot be hit, or you MISS it in a few minutes after hit, you can add a suffix to it to solve the problem.