作者:sealinger
发布时间:December 3, 2011
分类:都学杂了
No Comments
squid-2.7.STABLE6
negative_ttl 5 minutes 总结
# TAG: negative_ttl time-units
# Time-to-Live (TTL) for failed requests. Certain types of
# failures (such as "connection refused" and "404 Not Found") are
# negatively-cached for a configurable amount of time. The
# default is 5 minutes. Note that this is different from
# negative caching of DNS lookups.
#
#Default:
# negative_ttl 5 minutes
1)这是针对错误status代码的“否定缓存”机制,如403、404;
2)当不想缓存此类页面,可以设置为 negative_ttl 0 seconds ;
3)但是需要注意,当错误代码页面声明了可缓存标记(Expries:、Cache-Control:)时,不管 negative_ttl 设置如何,这些页面仍然会被缓存,而且缓存的时间是按缓存标记声明的时间来的,这是符合缓存协议的正常行为;
4)所以,总结来说,negative_ttl 5 minutes 仅仅是针对不带缓存声明的错误页面的 缓存机制。
我已经实际测试了:
用php模拟一个404的错误页面,带上 Expires:和 Cache-Control:缓存标记,另外同时随便访问一个不存在的页面(webserver返回404):
1)404.php ,即使squid配置了 negative_ttl 5 minutes ,对该页面的缓存时间 也是按 404.php 标记的 max-age 时间来缓存;(这是符合缓存协议的正常行为)
2)xxx.html(不存在)不带缓存标记,按 negative_ttl 5 minutes 设置的时间来缓存;
3)404.php ,即使squid配置了 negative_ttl 0 seconds ,对该页面的缓存时间 也是按 404.php 标记的 max-age 时间来缓存;(这是符合缓存协议的正常行为)
4)xxx.html(不存在)不带缓存标记,按 negative_ttl 0 seconds 设置,即不缓存。
想完全屏蔽对错误页面的缓存,需要使用squid-3.x,通过配置对HTTP STATUS缓存规则来实现:
squid 3.x 才支持如下配置:
acl badurl http_status 403-404 500-
http_access deny badurl
作者:sealinger
发布时间:November 28, 2011
分类:简单生活
1 Comment

作者:sealinger
发布时间:October 6, 2011
分类:简单生活
No Comments
尽管我不是果粉,但是我还是要说,乔帮主走好!
---------------------------------------------------------
美国媒体5日报道称,苹果公司前首席执行官史蒂夫·乔布斯已经去世,享年56岁。
董事会悼词全文:
We are deeply saddened to announce that Steve Jobs passed away today.
Steve’s brilliance, passion and energy were the source of countless innovations that enrich and improve all of our lives. The world is immeasurably better because of Steve.
His greatest love was for his wife, Laurene, and his family. Our hearts go out to them and to all who were touched by his extraordinary gifts.
译:
我们今天沉痛宣告史蒂夫·乔布斯逝世。
乔布斯才华出众,充满激情与活力,他是数不清的创新之源,这些创新丰富和改善了人们的生活。因为史蒂夫,世界变得更加美好的程度是不可估量的。
他伟大的爱留给了他的妻子劳伦和他的家庭,谨向他们,向所有被他超凡天赋触动的人们聊表心意。

[快讯]苹果宣布前CEO史蒂夫·乔布斯逝世
作者:sealinger
发布时间:August 26, 2011
分类:默认分类
No Comments
这个25年来最成功的CEO,以其非凡的远见和领导让苹果成为世界上最具价值的公司,全世界都对他的产品趋之若鹜,牛叉叉!~

[20110825快讯]乔布斯辞去苹果CEO职位,原COO蒂姆·库克继任,乔布斯已经当选为董事会主席。
作者:sealinger
发布时间:August 24, 2011
分类:混口饭吃
No Comments
宿主机环境需求
- VMware Workstation 7
- Windows 7 (64-bit) or Windows XP, Service Pack 3 (32-bit) operating system
在 VMware Workstation 7 上部署BIG-IP VE
1、网络配置建议
在 VMware Workstation 7 上部署 BIG-IP VE Trial 版本时,F5 官方建议配置如下:
1)使用 bridged(桥接)网卡走管理IP的流量,用 host-only 网卡走应用服务的流量;
2)在每一个Virtual Server上配置一个SNAT POOL(简单方法是启用Auto Map)。
2、虚拟机网络配置
配置三块虚拟网卡如下,一个Bridged,两个Host-only,其中规划:
- VMnet1(172.16.10.0/25)作为 external VLAN
- VMnet2(172.16.20.0/25)作为 internal VLAN

BIG-IP VE的虚拟机配置:

3、BIG-IP LTM网络配置
1)管理接口(Management Port)的IP配置
配置成和你宿主主机桥接的网卡同样网段的IP即可,使用 config 命令进行配置:

2)VLAN 和 Self IPs 配置
VLAN 配置:

Self IPs 配置,分配配置成和 VMnet1 和 VMnet2 相同网段的IP即可:

4、配置 POOL 和 Virtual Server
1)配置 POOL
说明:对于应用服务的流量,我们使用的是Host-only模式,故配置的POOL里的服务需是宿主主机本身上的服务,即 node 是宿主主机本身的虚拟网卡VMnet2的IP(172.16.20.1)。

2)配置 Virtual Server
说明:默认VMware Workstation 7分配所有的本地clients和servers在同一个虚拟的桥上(相当于连接是有状态的),造成潜在的网络问题;我们可以在BIG-IP中启用Auto Map来避免这个问题,这个特性使得BIG-IP LTM将Virtual Server接到的请求,自动转换客户端源地址为BIG-IP的接口地址,地址转换保证了server将回应回复到BIG-IP再返回给client。


3)测试效果
在宿主主机启动一个webserver,使用VMnet2的IP可访问:

使用BIG-IP LTM Virtual Server 的IP可访问:

- 1
- 2
- 3
- 4
- ...
- 14
- »