Squid2.5-2.6的改进以及反向代理实现Web缓存加速

Squid2.6反向代理实现Web缓存加速
 
主要的改进 
1、融合加速和反向功能
Major improvements to the way that Squid handles web proxy, accelerated and transparent proxy requests to make it easier to configure transparent and acceleration functionality. The default behaviour is to function as a standard HTTP proxy on each port that Squid is configured to listen on, but in addition in this release the keywords "accelerated" and "transparent" can be specified after each port to indicate to Squid the functionality that is to be enabled on that port. This means that the old config directives relating to httpd_accel_* are now deprecated.
 2、行为分析
Logging enhancements to allow even greater customization of the way Squid logs requests in the access-log or to syslog if required
Support for parsing X-Forwarded-For headers allowing access controls to be based on the real client IP even if behind secondary proxies
Support for Etag and Vary HTTP headers. This further moves Squid towards HTTP/1.1 compliance. The Vary header field is used for improved caching and delivery of customized content to end clients, and the Etag is used similar to an MD5 checksum between client and server to determine if a web page has changed since it was last retrieved.
 
1、http_port、cache_peer规则使用
由于
httpd_accel_host 被http_port、cache_peer选项替代
httpd_accel_port 由cache_port来定义
httpd_accel_uses_host_header由http_port vhost选项替代
则 

                                 -------------------------               ---------------------------
ajax.aaa .com
请求 /   |    Squid                 |        /  127.0.0.1   ajax.aaa.com      80
Sns.xxx.com
请求       |                             |          211.100.100  sns.xxx.com     80           
live.yyy.com
请求     --  |    10.10.10.10/11   |    ----   169.100.100 live.yyy.com      81
tag.zzz.com
请求  /   |    /etc/hosts            |        /  58.100.100  tag.zzz.com       82
                                 -------------------------              ---------------------------
 
http_port 110.10.10.10:80 transparent vhost vport
cache_peer 127.0.0.1 parent 80 0 no-query originserver
 cache_peer 211.100.100 parent 80 0 no-query originserver
 cache_peer 169.100.100 parent 81 0 no-query originserver
 cache_peer 58.100.100 parent 82 0 no-query originserver
 
2、Log改进
 A、Log记录方式更改,可用记录至系统Log或access-log,引入X-Forwarded-For headers功能后,Log可直接通过后台web的log进行分析
B、X-Forwarded-For headers功能使后端被加速web的log更加便于分析,直接分析后端web的log即可分析用户行为,原先版本后端web的log日志全来自前端squid机器,无法从后端直接分析log
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值