线上服务增加varnish缓存
来源:互联网 发布:mac 外置触摸板 编辑:程序博客网 时间:2024/05/16 01:51
varnish的特点。
(1)是基于内存缓存,重启后数据将消失。
(2)利用虚拟内存方式,io性能好。
(3)支持设置0~60秒内的精确缓存时间。
(4)VCL配置管理比较灵活。
(5)32位机器上缓存文件大小为最大2G。
(6)具有强大的管理功能,例如top,stat,admin,list等。
(7)状态机设计巧妙,结构清晰。
(8)利用二叉堆管理缓存文件,达到积极删除目的。
varnish很强大。上线之后立即减少了服务器load。
而且接口访问速度加快了。页面加载时间变得更短了。
安装
官方网站:http://varnish-cache.org/
3.0文档:https://www.varnish-cache.org/docs/3.0/
centos安装: http://www.varnish-cache.org/installation/redhat
redhat 6 安装 :
rpm --nosignature -i http://repo.varnish-cache.org/redhat/varnish-3.0/el6/noarch/varnish-release/varnish-release-3.0-1.el6.noarch.rpm
http://varnish-cache.org/
yum install varnish
设置开机启动:
chkconfig varnish on
启动:
service varnish start
varnish配置:
/etc/sysconfig/varnish设置carche路径,内存大小。
VARNISH_STORAGE_SIZE=8G
vcl配置,默认vcl路径:
/etc/varnish/default.vcl把所有注释的代码都取消注释,然后修改成自己的服务器和端口。
backend default {
.host = "127.0.0.1";
.port = "80";
}
上线之后性能还是超级强悍的。服务器的负载 立刻就下降了。
并且访问速度比之前快了很多。varnish做http cache,性能很好。
varnish默认是2分钟失效。上面的配置基本上够使用了。
- 线上服务增加varnish缓存
- 缓存服务varnish安装配置
- 缓存服务varnish 3.0安装配置
- Varnish缓存
- CentOS 6.5 Varnish缓存服务详解及应用实现
- CentOS 6.5 Varnish缓存服务详解及应用实现
- Varnish purges 缓存清除
- Web缓存(Varnish方案)
- Web缓存(Varnish方案)
- Varnish 缓存服务器
- Varnish缓存服务器原理
- Web缓存 --- Varnish方案
- varnish缓存配置详解
- 缓存服务器之varnish
- 配置varnish服务
- varnish服务配置
- Varnish purges 缓存清除技术研究
- ESI+varnish页面片段缓存
- VIM 正则表达式
- 关于printf("%*.*f")的问题
- tomcat+花生壳
- sql语句问题,查询表中两字段
- NamedPipe
- 线上服务增加varnish缓存
- strchr function
- CPLD与FPGA的主要区别
- 指点一下这两段sql的差别
- floyd算法(最短路径)
- Silverlight MVVM + WCF Ria Service 餐馆点菜DEMO
- Oracle调用存储过程输出的游标问题
- java学习笔记02
- [Linux] 文件时间属性及touch命令