SQUID之cache_peer

一共关系到cache_peer/always_direct/never_direct/hierarchy_stoplist/prefer_direct等配置项。

squid的使用指南上,关于always_direct和never_direct这么写到:

Squid checks all always_direct tags before it checks any never_direct tags. If a matching always_direct tag is found, Squid will not check the never_direct tags, but decides which cache to talk to immediately....If the line used the deny keyword instead of allow, Squid would have simply skipped on to checking the never_direct lines

squid的配置说明上,关于hierarchy_stoplist这么写到:

use this to not query neighbor caches for certain objects....never_direct overrides this option

squid的邮件列表上,Amos这么解释:

always_direct *prevents* peers being used. It does not force them. " hierarchy_stoplist ? " is the directive preventing the peer being used. 看起来挺让人晕头转向的。 其实就是说: always_direct allow的优先级高于never_direct,但deny(包括allow !)时则不。 hierarchy_stoplist强制请求通过域名解析回源,但never_direct又优先于它。 prefer_direct用于所有cache_peer都down了时,never_direct会报错,而prefer会转入dns解析。

时间: 2024-08-07 08:38:19

SQUID之cache_peer的相关文章

Squid 代理服务器的构建与访问控制

Squid 一款开源的代理服务软件,用于实现HTTP和FTP以及DNS查询,SSL等应用的应用层代理 官方站点:http://www.squid-cache.org squid 作为应用层代理服务软件,主要提供缓存加速,应用层过滤控制的功能(访问的目标,客户机地址,访问的时间) squid可构建的代理服务:传统代理.透明代理.反向代理 DNS view(视图) + SQUID 反向代理 = CDN(内容分发网络) 代理的工作原理:客户端通过代理来请求web页面时,指定的代理服务器首先检查自己的高

squid服务器的代理

实验前提:准备三台虚拟机,如果是在windows上安装的vmware 真实机也可以作为其中一台使用 squid服务器IP:192.168.4.103 WEB服务器IP :192.168.4.200 客户机IP :192.168.4.254 实验一:传统代理 squid服务器上操作 yum -y install squid vim /etc/squid/squid.conf visible_hostname   squid.tarena.com cache_dir ufs /var/spool/s

笔记十一

#####apache的虚拟主机 在desktop端: cd /etc/httpd/conf.d/ vim news.conf 修改内容为: 1 <Virtualhost *:80> 2         Servername news.westos.com 3         Documentroot /var/www/virtual/news.westos.com/html 4         Customlog "logs/news.log" combined 5 &l

http服务器的搭建(二)

http(二)apache虚拟主机的加密(https:加密有CA证书)<Virtualhost *:80>       servername music.westos.com       Documentroot/var/www/virtual/music.westos.com/htmlCustomlog "logs/music.log" combined</Virtualhost><Directory"/var/www/virtual/musi

squid.conf 的cache_peer 详解

通过squid.conf配置文件中的cache_peer选项来配置代理服务器阵列,通过其他的选项来控制选择代理伙伴的方法.Cache_peer的使用格式如下: cache_peer hostname type http_port icp_port option 共有5个选项可以配置:    1) hostname:指被请求的同级子代理服务器或父代理服务器.可以用主机名或ip地址表示:    2) type:指明hostname的类型,是同级子代理服务器还是父代理服务器,也即parent(父) 还

squid

squid是一种高性能的代理缓存服务器,分为正向代理和反向代理,正向代理就是翻墙,反向代理指web服务其加速,就是指如果一个人想要下载一web页面,他请求squid为他取得这个页面.squid随之连接到远程服务器并向这个页面发出请求.然后squid再把数据到客户端服务器,同时复制一份.当下一次有人需要同一个页面时,squid可以简单地从磁盘上读到它,这样数据很快就会传输到客户主机上. 一 反向代理: 客户端请求访问web服务时,dns将访问的域名解析为squid反向代理服务器的ip地址,这样客户

squid代理

1.正向代理 *作用:借助代理访问客户端访问不到的地址 *yum install squid -y  ##安装squid服务 *vim /etc/squid/squid.conf http_access allow all    ##允许所有http服务访问 # Squid nsu ormally listens to port 3128 http_port 3128   ##访问端口为3128 # Uncomment and adjust the following to add a disk

配置Squid代理服务器

1. 什么是squid Squid是一个支持HTTP.HTTPS.FTP等服务的缓存代理软件,它可以加快客户端网页浏览的速度,提高客户机的访问命中率,节省宝贵的带宽资源.squid不仅可以做正向代理,还可以利用反向代理技术提高网站访问性能,反向代理结合智能DNS解析就能实现一个最基本的CDN. 2. 搭建squid正向代理 正向代理一般用于企业内部访问外网,就是我们通常说的通过代理服务器上网,通过缓存页面数据可以节省带宽,提高上网速度. squid官方网站为 http://www.squid-c

代理服务squid和varnish使用与区别

------------------------------- 客户主机: 192.168.4.100  eth0 ------------------------------- 代理主机: 192.168.4.5    eth0 192.168.2.5     eth1 -------------------------------- Web主机:  192.168.2.100  eth1 -------------------------------- #clone-vm   软件[goog