包含标签 varnish articles

Varnish的优雅模式和神圣模式

今天在和同事谈论现网后端tomcat挂起导致前端varnish线程堆积,最终造成varnish挂掉或前端web处理繁忙的问题。由于之前详细的看过varnish的文档,当时记得有一个上帝模式还是圣杯模式来着(由于英向汉翻译的问题,可能有N种翻译方法)。由于时隔相当一段时间了,所以记……

Continue reading

varnish缓存清理

本篇日志应该较早该去写的,一直脱了好久,直到最近才写。在使用任务cache工具时,都会提到的一个问题。如何只清理想清理的那部分缓存,而其已缓存的部分不受影响 。这里就要用到varnishadm工具,先看下其用法: 1root@cache-40.sangame.com:[/root]/App/varnish/bin/varnishadm help 2help [command] 3ping [timestamp] 4auth response 5quit 6banner 7status 8start 9stop 10vcl.load <configname> <filename> 11vcl.inline <configname> <quoted_VCLstring> 12vcl.use <configname> 13vcl.discard <configname> 14vcl.list 15vcl.show <configname> 16param.show [-l] [<param>] 17param.set <param> <value> 18panic.show 19panic.clear 20storage.list……

Continue reading

varnish强制刷新与Modify Header

varnish是一个性能十分优越,配置语法又比较灵活的cache软件。当然在对站点做cache的时候,遇到的比较多的一个问题就是对ctrl+F5强制刷新的处理 。例如,有时候想让更新过的内容立即可以启用,就可以在varnish上配置ctrl+F5强制刷新后立即去后端服务器上检测文件……

Continue reading

varnish利用acl实现黑白名单

像普通的web应用可以能过deny 和allow这样的参数设置黑白名单,当使用varnish直接监听80端口对外提供服务时,我们也可以通过vcl 规则来实现黑白名单的功能。 1、定义ACL,导入外部IP列表 1acl forbidden { 2 include "/etc/varnish/chinaip.dat"; 3} 而chinaip.dat的内部如下: 1"192.168.1.0"/24; 2"10.0.0.0"/24; 2、通过vcl_recv策……

Continue reading

varnishstat与缓存效果

同squidclient一样,varnish同样也提供了一个工具 ———— varnishstat 用于查看varnish的缓存状态 ,并且后者显的更为专一 。熟悉每个参数所表示的意义,对varnish的优化和调优是很有帮助的 。 一、varnishstat的使用参数 1usage: varnishstat [-1lV] [-f field_list] [-n varnish_name] [-w delay] 2 -1 # Print the statistics to stdout. 3 -f field_list # Comma separated……

Continue reading

varnish性能监控小结之check_varnish.pl、rsvp

一个优秀的工具,总会相应的会衍生很多与其相关的优秀插件或产品。就像varnish一样,其衍生的监控插件非常多。像munin-varnish、varnishgather、check_varnish.pl、rsvp等等。上面提到的前两个是官方提到的,尤其是munin也确实非常优秀。不……

Continue reading

varnish-nagios的安装使用

就目前来说,最流行的cache加速,应该算是varnish了,最流行的监控当然是nagios ———— 至少我是这样认为的。为了将varnish的stat进行很好的监控。varnish官方提供了varnish-nagios功能插件。用于整合到nagios的libexec里。下面就针对……

Continue reading

通过Munin监控进行Varnish Cache优化

近期在开发通知的提醒下进行了Varnish3.0.3缓存的优化处理,分析过程使用的是Munin监控数值做的分析,下面将优化过程进行叙述: 一、初期概况 初期做的地图数据缓存,最高命中率在90%,认为命中率很高。后经过日志统计发现,全天的URL总的内存占用在12G,而分配的内存是是36……

Continue reading

varnish服务器在内存大量富余时使用交换空间的原因及解决方法

在varnish机器上发现一个比较奇怪的现象。在可用内存还有3G左右,系统已经开始使用交换空间,也就是说有数据在内存与硬盘之间换进换出了。在当前的流量下,这个对整体性能的影响虽不大。但这个问题有必要彻底查一下。以避免在高负载下可能的问题。 硬件:机器使用Dell r710,两颗CPU……

Continue reading

varnish日志相关

varnish提供了varnishlog和varnishncsa两个工具用于日志处理。varnishlog 用于记录varnish 自身定义的日志格式,varnishncsa 用于记录作类似apache/ncsa定义的日志格式 。两个工具可以说是互相补充,前者便于详细的查看varnish……

Continue reading

Latest articles

Categories

Tags

ACL AD AES AI AWS Ansible Atlassian Azure BMC Blockchain Brocade CDH5 CL210 Cobbler Confd C语言 DDOS DISTINCT DNS Duckdb EKS ELK GCP Ghost Git Glusterfs Go Godaddy Grafana HBA HCIE Hotspot HttpWatch IBM IIS IOS InfluxDB Ingress InnoDB JavaScript Jinja2 KVM Keepalived Mplayer MySQLdb Netlify OpenResty PM PostgreSQL QoS RH318 RH442 RHCA RHCE RHEV RSA SRE SecureCRT Statuscode SublimeText2 TC Telecom Tencentcloud VBA aira2 alpine android anpic apache apm apparmor appfog apr apt-get aria2 array atop audit awk awstats axel backdoor backup bamboo bash bat benchmark bigdata bin bind bitwise book bootstrap bsd c1000 cache capistrano catlog centos centos7 chatops chattr check_mk checkinstall cisco clearall clickhouse cloud-desktop cmdb cms collectd comm compress conver corosync cpu crontab crunchbang css curl date decode dell desktop devops df dhcp diff diskpart django docker dos2unix dpkg drupal etcd excel fail2ban fastcgi fdisk fiddler find firewalld flask flvtool ftp function fuser geek gin github gitlab glances golang google gooupadd graphviz gravatra grep grub2 hadoop haproxy hardware heartbeat helm hexdump hhvm history html http/html/web httplogs https huawei huaweicloud hugo icmp iconv ifconfig inotify iopp ipmitool iptables iredmail iscsi isito it-news java jdk jenkins jira join joomla k3s k8s kdump kernel kingate lamp last leetcode lib light-http linux linux高级篇 ln ls lsi lsof lvm lvs mac mail man mark markdown matplotlib maven memcached microservice mimikatz mkdocs mkpasswd mmonit mod_jk mongodb monit monitor mono moodle mosh mount mpm mrtg mtr my.cnf mysql mysqlbinlog mysqld_multi mysqldump mysqlhotcopy nagios nc nethogs nexus nfs nginx nmon nocatlog node.js nrpe ntfs ntop ntp obs ocr open-falcon openbox opencv openldap openssl openstack oracle oswatch paas pacemaker pam pandas parted pcp pcre pdf percona perl pexpect pgrep php php-fpm ping plsql develope postfix powershell prettify proc prometheus puppeteer pushd pwgen pxe pyecharts python python模块 radmin raid rdesktop read redhat redis redmine regex rh134 rhel7 rhel8 rm rman rootkit route rpm rpmforge rrdtool rsync rsyslog safe saltstack samba scapy screen sed selenium selinux seo seq session set shc sheepdog shell shopt sitemap skydns smokeping snffier snmp socket soft sort spider sql sqlserver squid ss ssh sshpass strace strings su sudo suse svn sysbench syslog-ng sysstat systemd t tar tcpcopy tcpdump tech telnet tengine test testlink threads time tmux tomcat touch tr tsar twisted ubuntu udev ulimit unix unixbench user-agent useradd varnish vbs vercel vi vim visudo vmstat vmware vnc voice vpn vscode vsftp vsftpd vue watchdog web webcam webistrano wget wiki windows wol wordpress workshop wsl x-windows xampp xcache xmllint xtrabackup yule yum zabbix zeromq zip zonetime zookeeper 下载工具 云主机 云原生 代理 加密 古意 吐槽 圈里圈外 娱乐 字符串函数 安全 平台架构 意林 推理 提权 故事汇 故障案例 数据结构 每日看点 民国史 生活 科学记录 站长管理工具 算法 管理 网站架构 翻墙 股票 行业 诗韵 负载均衡 远程管理 面试题

Links

Meta