缓存为王-varnish
2、varnish的软件清单
[root@centos69 ~]# rpm -ql varnish
/etc/logrotate.d/varnish
/etc/rc.d/init.d/varnish
/etc/rc.d/init.d/varnishlog
/etc/rc.d/init.d/varnishncsa
/etc/sysconfig/varnish
/etc/varnish
/etc/varnish/default.vcl
/usr/bin/varnishadm
/usr/bin/varnishhist
/usr/bin/varnishlog
/usr/bin/varnishncsa
/usr/bin/varnishreplay
/usr/bin/varnishsizes
/usr/bin/varnishstat
/usr/bin/varnishtest
/usr/bin/varnishtop
/usr/sbin/varnish_reload_vcl
/usr/sbin/varnishd
/usr/share/doc/varnish-2.1.
/usr/share/doc/varnish-2.1./ChangeLog
/usr/share/doc/varnish-2.1./INSTALL
/usr/share/doc/varnish-2.1./LICENSE
/usr/share/doc/varnish-2.1./README
/usr/share/doc/varnish-2.1./README.redhat
/usr/share/doc/varnish-2.1./examples
/usr/share/doc/varnish-2.1./examples/default.vcl
/usr/share/doc/varnish-2.1./examples/zope-plone.vcl
/usr/share/man/man1/varnishadm..gz
/usr/share/man/man1/varnishd..gz
/usr/share/man/man1/varnishhist..gz
/usr/share/man/man1/varnishlog..gz
/usr/share/man/man1/varnishncsa..gz
/usr/share/man/man1/varnishreplay..gz
/usr/share/man/man1/varnishsizes..gz
/usr/share/man/man1/varnishstat..gz
/usr/share/man/man1/varnishtest..gz
/usr/share/man/man1/varnishtop..gz
/usr/share/man/man7/vcl..gz
/var/lib/varnish
/var/log/varnish
for i in {..}; do echo "Page $i on Web1" > /var/www/html/test$i.html; done

修改
vim default.vcl # Default backend definition. Set this to point to your content server.
backend default {
.host = "192.168.142.134"; #指定后端web server地址
.port = "";
} sub vcl_recv {
# Happens before we check if we have this in cache already.
#
# Typically you clean up the request here, removing cookies you don't need,
# rewriting the request, etc.
} sub vcl_backend_response {
# Happens after we have read the response headers from the backend.
#
# Here you clean the response headers, removing silly Set-Cookie headers
# and other mistakes your backend does.
} sub vcl_deliver {
# Happens when we have all the pieces we need, and are about to send the
# response to the client.
#
# You can do accounting or modifying the final object here.
}
是
[root@CentOS71 varnish]#varnishadm -S /etc/varnish/secret -T 127.0.0.1: -----------------------------
Varnish Cache CLI 1.0
-----------------------------
Linux,3.10.-.el7.x86_64,x86_64,-smalloc,-smalloc,-hcritbit
varnish-4.0. revision 07eff4c29 Type 'help' for command list.
Type 'quit' to close CLI session. help help [<command>]
ping [<timestamp>]
auth <response>
quit
banner
status
start
stop
vcl.load <configname> <filename>
vcl.inline <configname> <quoted_VCLstring>
vcl.use <configname>
vcl.discard <configname>
vcl.list
param.show [-l] [<param>]
param.set <param> <value>
panic.show
panic.clear
storage.list
vcl.show [-v] <configname>
backend.list [<backend_expression>]
backend.set_health <backend_expression> <state>
ban <field> <operator> <arg> [&& <field> <oper> <arg>]...
ban.list
缓存为王-varnish的更多相关文章
- Varnish 缓存加速, Varnish 菜鸟看过来,Varnish实战
Varnish可以有效降低web服务器的负载,提升访问速度.按照HTTP协议的处理过程,web服务器接受请求并且返回处理结果,理想情况下服务器要在不做额外处理的情况下,立即返回结果,但实际情况并非如此 ...
- WEB缓存系统之varnish缓存项修剪
前文我们聊了下varnish的状态引擎和不同类型的变量对应该使用在那个状态引擎中,以及每个状态引擎的对应处理事务:回顾请参考https://www.cnblogs.com/qiuhom-1874/p/ ...
- 如何构建日均千万PV Web站点(二) 之~缓存为王~
随着网站业务的不断发展,用户的规模越来越大:介于中国无比蹩脚复杂的网路环境:南电信:北联通:中间竟然只用一条链路进行互联通信!有研究表明,网站访问延迟和用户流失率正相关,网站访问速度越慢,用户越容易失 ...
- 缓存反向代理-Varnish
简介 Varnish是一款高性能.开源的缓存反向代理服务器.它从客户端接受请求,并尝试从缓存中响应请求,如果无法从缓存中提供响应,Varnish 向后端服务器发起请求,获取响应,将响应存储在缓存中,然 ...
- WEB缓存系统之varnish基础入门(一)
前文我们聊了下http协议里的缓存控制机制以及varnish架构组件介绍,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/12620538.html:今天我们来聊 ...
- WEB缓存系统之varnish状态引擎
前文我们聊了下varnish的VCL配置以及语法特点,怎样去编译加载varnish的vcl配置,以及命令行管理工具varnishadm怎么去连接varnish管理接口进行管理varnish,回顾请参考 ...
- WEB缓存系统之varnish代理以及健康状态检测配置
前文我们聊了下varnish的缓存项修剪配置,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/12666406.html:今天我来说一下varnish作为代理服务 ...
- 项目实战5—企业级缓存系统varnish应用与实战
企业级缓存系统varnish应用与实战 环境背景:随着公司业务快速发展,公司的电子商务平台已经聚集了很多的忠实粉丝,公司也拿到了投资,这时老板想通过一场类似双十一的活动,进行一场大的促销,届时会有非常 ...
- varnish缓存系统基础知识
缓存系统类型 1.页面缓存/pageCache 缓存静态资源(html js css image) 例如:varnish squid 2.数据缓存/dataCache 缓存应 ...
随机推荐
- Python中函数和方法的区别
方法是一种特殊的函数属于某个类的的函数叫方法不属于某个类的函数叫函数 转自csdn https://blog.csdn.net/weixin_40380298/article/details/7825 ...
- webpack 4.0配置2
上个博客记录了webpack 的基本配置今天主要是css-loader的介绍,包括单独提出css,压缩css.js文件 这里使用的插件npm 地址:https://www.npmjs.com/pack ...
- Win10系统下,本地连接远程桌面(Win2016)图解
1.Win+R在运行框中输入mstsc,回车 2.在出现的远程登陆窗口中,计算机中输入远程桌面IP 3.点击显示选项按钮,在远程桌面窗口中,点击常规(默认),输入登陆的用户名: XXXXXX 4.点击 ...
- Spring MVC随笔记录
根据https://blog.csdn.net/abc997995674/article/details/80353410整理 @ModelAttribute 可以用在方法.方法参数上,也可以和@re ...
- Jenkins解析日志(log-parser-plugin)
Jenkins打包机打包时产生了大量的日志,当报错时,不方便查看error日志 因为日志量太大,查看全部log的时候整个web页面会卡死,所以引用log-parser-plugin可以增加过滤条件显示 ...
- ASCII,Unicode,GBK和UTF-8字符编码的区别和联系
如果经常写python2,肯定会遇到各种“奇怪”的字符编码问题,每次都通过谷歌解决了,但是为什么会造成这种乱码.decode/encode失败等等,本文就字符和字符编码做一个总结,更加清晰区分诸多的编 ...
- IDEA查看项目对应的git地址
参考 https://blog.csdn.net/yyyadan/article/details/85091972 项目文件夹/.git/config
- 登录注册页面(连接MySQL8.0.15版本)
原文链接:https://mp.weixin.qq.com/s?__biz=MzI4Njg5MDA5NA==&mid=2247483779&idx=1&sn=e23e68e96 ...
- 利用百度编辑器和IIS限制文件上传的大小
1.百度编辑器的大小限制 针对不同的文件类型限制大小 例如图片是imageMaxSize ,依次类推 /* 前后端通信相关的配置,注释只允许使用多行方式 */ { /* 上传图片配置项 */ ...
- Error merging: refusing to merge unrelated histories
解决方案: git pull git pull origin master git pull origin master --allow-unrelated-histories idea提交git提交 ...