缓存为王-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 缓存应 ...
随机推荐
- redis cluster介绍
讲解分布式数据存储的核心算法,数据分布的算法 hash算法 -> 一致性hash算法(memcached) -> redis cluster,hash slot算法 一.概述 1.我们的m ...
- 传统应用、服务器集群、分布式、SOA各种架构的简单解释
传统架构:无论是SE应用还是WEB应用,传统架构都是表现层---业务层---持久层---数据库 1000并发(tomcat单台500并发,tomcat一般做集群的话,节点数量不能太多,5个左右): ...
- JS数据类型之Number类型
Number类型的转换及方法 var num = 10; num.toString() //"10"转字符串,参数表示几进制 num.toFixed(2) //10.00 自动舍入 ...
- 在docker集群下,使用VNC,物理机器重启后VNC失败解决
首先重装咯: sudo apt-get update sudo apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon met ...
- C语言典型编程1
关于C的一些小而精的编程,适合希望提升编程能力的初学者学习:关键编程也就几句,但思维可以迁移到其他编程语言.同一问题,算法多种 //阶乘运算(有多种编写方式,编程需要看懂,更要打出来)#include ...
- POJ-3660.Cow Contest(有向图的传递闭包)
Cow Contest Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17797 Accepted: 9893 De ...
- Loadrunner 11.00录制App脚本篇(Win10)
参考博文1:https://www.cnblogs.com/mxqh2016/p/6016866.html 参考博文2:https://blog.csdn.net/myohmy2008/article ...
- Spring Cloud+Dubbo对Feign进行RPC改造
因为Spring Cloud Feign是基于Http Restful的调用,在高并发下的性能不够理想(虽然他是基于Ribbon以及带有熔断机制,可以防止雪崩),成为性能瓶颈,所以我们今天对Feign ...
- yum 安装时遇到“UnicodeDecodeError: 'ascii' codec”的问题
今天新安装了一个6.9系统,配置好本地yum源后,用yum安装时报了以上的错误信息,在/etc/yum.repos.d/目录下多出了TTT的一个目录 (手动问号),在百度上查了一些文档. 解决方法:1 ...
- jmeter导入DB数据再优化
由于同一个迭代中每天都在执行.之前设计的思路是同个迭代只执行一次插入DB操作!! 因而没有在插入数据前没有做版本.产品类型.页面类型.接口名.接口名是否相等判断操作. 因此,若是这些条件相等,数据不是 ...