LnBSD 发表于 2012-11-09 11:46

Traffic Server 穿透问题

经过一段时间的使用,感觉ats还是很棒的,但是发现ats的穿透率比squid高了很多,使用squid的时候没有这个问题。
被穿透元素的头信息如下

HTTP/1.1 200 OK
Server: ATS/3.2.0
Date: Thu, 08 Nov 2012 22:26:37 GMT
Content-Type: image/jpeg
Last-Modified: Mon, 18 Sep 2011 06:06:33 GMT
Expires: Thu, 31 Dec 2037 23:55:55 GMT
Cache-Control: max-age=315360000
Age: 335
Content-Length: 5952
Connection: keep-alive
Via: http/1.1(testcache)


ts的cache状态

% show:proxy-stats

Document Hit Rate -------- 92.711243 %   *
Ram cache Hit Rate ------- 0.000000 %    *
Bandwidth Saving --------- 81.534622 %   *
Cache Percent Free ------- 0.003912 %
Open Server Connections -- 43
Open Client Connections -- 17
Open Cache Connections --- 7
Client Throughput -------- 70.436035 MBit/Sec
Transaction Per Second --- 802.877930

* Value represents 10 second average.


下面这个图是今天凌晨到中午11点穿透元素的排名情况




附我的records.config 配置文件 ,另外 其他配置文件没有对cache方面做任何的附加配置

aaaaaa 发表于 2012-11-09 15:45

3.2社区版本? 社区版本里有个问题,不能存储body size=0的任何结果(其实这是RFC的要求),我们在TS-621上有相关的patch,或者参考我们公开的3.2代码:
https://gitorious.org/trafficserver/taobao/ branch 3.2

另一个是你的negative cache没有启用,如果你的这次穿透的请求里404 403啥的比较多的话,可以考虑启用这个:
   #############################
   # negative response caching #
   #############################
CONFIG proxy.config.http.negative_caching_enabled INT 0
CONFIG proxy.config.http.negative_caching_lifetime INT 1800

再有就是多副本情况,建议你用http_ui看看cache中存储的这些内容,是不是多副本不够多造成的问题。可以考虑提高:
   # The maximum number of alternates that are allowed for any given URL.
   # It is not possible to strictly enforce this if the variable
   #   'proxy.config.cache.vary_on_user_agent' is set to 1.
   # The default value for 'proxy.config.cache.vary_on_user_agent' is 0.
   # (0 disables the maximum number of alts check)
CONFIG proxy.config.cache.limits.http.max_alts INT 5

还有,如果你没有准确的expire时间的话,存储也可能成问题,建议看看调整:
   # required headers: three options:
   #   0 - No required headers to make document cachable
   #   1 - "Last-Modified:", "Expires:", or "Cache-Control: max-age" required
   #   2 - explicit lifetime required, "Expires:" or "Cache-Control: max-age"
CONFIG proxy.config.http.cache.required_headers INT 2


暂时想到这几个方向,从你贴出来的response看不懂为啥。用http_ui看看这些cache的内容,或许有些发现

LnBSD 发表于 2012-11-09 18:20

aaaaaa 发表于 2012-11-09 15:45 static/image/common/back.gif
3.2社区版本? 社区版本里有个问题,不能存储body size=0的任何结果(其实这是RFC的要求),我们在TS-621上 ...

非常感谢~ {:3_187:}

LnBSD 发表于 2012-11-09 19:02

另一个是你的negative cache没有启用,如果你的这次穿透的请求里404 403啥的比较多的话,可以考虑启用这个:
   #############################
   # negative response caching #
   #############################
CONFIG proxy.config.http.negative_caching_enabled INT 0
CONFIG proxy.config.http.negative_caching_lifetime INT 1800 aaaaaa

穿透的元素都是200,文件都存在。



再有就是多副本情况,建议你用http_ui看看cache中存储的这些内容,是不是多副本不够多造成的问题。可以考虑提高:
   # The maximum number of alternates that are allowed for any given URL.
   # It is not possible to strictly enforce this if the variable
   #   'proxy.config.cache.vary_on_user_agent' is set to 1.
   # The default value for 'proxy.config.cache.vary_on_user_agent' is 0.
   # (0 disables the maximum number of alts check)
CONFIG proxy.config.cache.limits.http.max_alts INT 5


我把 proxy.config.cache.limits.http.max_alts 设为 20后穿透少了很多,但是还是有一小部分的穿透,难道20还不够大么
有点不理解ats的多副本,按照我的理解如果是元素是可以压缩的,存两份就可以了:一份不压缩,一份压缩
多副本有什么意思呢

还有,如果你没有准确的expire时间的话,存储也可能成问题,建议看看调整:
   # required headers: three options:
   #   0 - No required headers to make document cachable
   #   1 - "Last-Modified:", "Expires:", or "Cache-Control: max-age" required
   #   2 - explicit lifetime required, "Expires:" or "Cache-Control: max-age"
CONFIG proxy.config.http.cache.required_headers INT 2


元素都是有明确过期时间的
   

aaaaaa 发表于 2012-11-09 21:58

20个副本都不够的情况也可能是存在的。TS在作副本match的时候,存在一个不是最match的可能,结果会一直往cache系统里写入。我建议你用http_ui把相关的副本dump出来,这个会是一个非常好的可以用来改进TS的match代码的例子,一定要搞出来这个:
http://people.apache.org/~zym/trafficserver/FAQ.html 有关于http_ui的说明

LnBSD 发表于 2012-11-12 14:25

回复 5# aaaaaa
抓了一个url的信息,您给看看 有没有问题http://test.aaaa.com/c/html/css/aaa-nav.css?2012-11-12
Doc
first key CA9D8FDE87E144BC3D400FA6CECA4063
key 2A9B8A5083DC3FABF301F39E3736B199
sync_serial 9457
write_serial 491002
header length 57048
fragment type 1
fragment table length 0
No of Alternates 20
Action   


Alternate 1
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
Accept: text/css,*/*;q=0.1
Referer: http://c.aaaa.com/forum_1_15.html
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: aaaTrackId=55899318; ip_ck=48CA7vj+j7QuNDcxOTI5LjEzMjkyOTUyMDA%3D; __gads=ID=eb3a808f173c7997:T=1329297824:S=ALNI_MY6s8SxdRpUvvbf1-KkuL1avsz5Kw; TurnAD88631=2; aaaTrackFirstTime=1345702047690; Hm_lvt_07d927b19bdaf5589e55729845538e23=1347859244270,1349852965375,1349854106214; Hm_lpvt_07d927b19bdaf5589e55729845538e23=1349854106214; __utma=250699996.58308722.1329296234.1347859249.1349854108.10; __utmc=250699996; __utmz=250699996.1349854108.10.8.utmcsr=passport.aaa.net|utmccn=(referral)|utmcmd=referral|utmcct=/login.php; BCSI-CS-3912722ED4A51AE2=2; aaaTrackReturnCnt=128; aaaTrackReturnTime=1352266448676; BCSI-CS-B8651B2385CC4621=2; BCSI-CS-D289AC54B9ABDC1E=2; lv=1352281619; vn=245
Accept-Encoding: gzip, deflate, identity
Cache-Control: max-stale=0
X-BlueCoat-Via: D67C9046C8FD9252
X-aaa-Forwarded-For: 192.193.132.13
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:28:57 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:28:57 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip



Size 7605
Key 7D570333C4CAC185C3BFD405E6DAFCBC
Request sent time Mon Nov 12 13:28:56 2012
Response received time Mon Nov 12 13:28:57 2012


Alternate 2
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Accept: */*
Referer: http://c.aaa.net/thread_1_15_3052161.html
Accept-Language: zh-cn
Accept-Encoding: gzip, default
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0)
X-aaa-Forwarded-For: 221.238.197.99
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:29:03 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:29:03 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key B0344363BC3BB0F0DCF51F68D28EFFC4
Request sent time Mon Nov 12 13:29:03 2012
Response received time Mon Nov 12 13:29:03 2012


Alternate 3
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
User-Agent: hl_spider/2.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Accept: */*
Accept-Encoding: deflate, gzip
Referer: http://c.aaa.net/forum_2_4___b_md.html
X-aaa-Forwarded-For: 221.194.131.42
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:29:42 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:29:42 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key 67791228C72E40B7D9EDAB7F7BB8441C
Request sent time Mon Nov 12 13:29:42 2012
Response received time Mon Nov 12 13:29:42 2012


Alternate 4
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Accept: */*
Referer: http://c.aaa.net/forum_1_15.html
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
X-aaa-Forwarded-For: 218.21.108.150
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:29:42 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:29:42 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key 9670AA0B42A91D4370279D1D30A0B5AF
Request sent time Mon Nov 12 13:29:42 2012
Response received time Mon Nov 12 13:29:42 2012


Alternate 5
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.11 (KHTML, like Gecko) Chrome/2.0.181.1 Safari/530.11
Referer: http://c.aaa.net/thread_1_15_6082480_2__.html
Accept: text/css,*/*;q=0.1
Accept-Encoding: gzip,deflate,bzip2,sdch
Cookie: aaaTrackId=126799751; ip_ck=5M+J7/n1j7QuMzg4ODMyLjEyNjg3MDQ1MTY%3D; lzstat_uv=4241960712761879630|1173260@1158771; __utma=250699996.40400643.1268704518.1318214296.1321330495.400; __utmv=250699996.c%26areaid%3D10%26topicid%3D15%26bbsid%3D0%26msgid%3D%26optTag%3D2%26nowpage%3D0%26uId%3D736ca4fa9ce63a2b1bfee6a9c72331a6; lv=1332824419; vn=374
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
X-aaa-Forwarded-For: 116.228.230.22
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:35:47 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:35:47 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip



Size 7605
Key 58ABD97884250146DFEAAF09E4228E00
Request sent time Mon Nov 12 13:35:47 2012
Response received time Mon Nov 12 13:35:48 2012


Alternate 6
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Accept: application/vnd.wap.xhtml+xml, text/vnd.wap.wml, application/xhtml+xml, text/html, image/png, image/jpeg, image/gif, */*;q=0.1
Accept-Charset: iso-8859-1,utf-8,utf-16,*;q=0.1
Accept-Encoding: gzip;q=1.0,identity;q=0.8,qzip;q=0.5
Referer: http://c.aaa.net/thread_1_346_7218301_1__TRUE.html
Q-UA: SQB29_GA/29756&SMTT_3/020100&SYM5&224014&Nokia5233&0&6333&V3
x-up-bear-type: GPRS/EDGE
User-Agent: MQQBrowser/2.9 (Nokia5233;SymbianOS/9.1 Series60/3.0)
X-aaa-Forwarded-For: 211.137.211.137
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:39:03 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:39:03 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip



Size 7605
Key 81C7A498A5E04194991A95FAB34DD8FB
Request sent time Mon Nov 12 13:39:03 2012
Response received time Mon Nov 12 13:39:03 2012


Alternate 7
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
User-Agent: Mozilla/5.0 (MeeGo; N9) AppleWebKit/536.6 (KHTML, like Gecko) NokiaBrowser/8.5 Mobile Safari/536.6
Accept: text/css,*/*;q=0.1
Accept-Language: en
Accept-Encoding: gzip, deflate, compress
DNT: 1
X-aaa-Forwarded-For: 216.24.193.145
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:39:13 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:39:13 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip



Size 7605
Key E6A1AB0844245ACD3753D4E007390BD0
Request sent time Mon Nov 12 13:39:13 2012
Response received time Mon Nov 12 13:39:13 2012


Alternate 8
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Accept: */*
Accept-Encoding: deflate, gzip, identity
Accept-Language: zh-cn
Cookie: __userId=547049877; sessionID=eecfcb4749877afff3906fc4d9e3e7b9; __P_NickName=%C4%A3%D7%D3; __P_JS_NickName=%25u6a21%25u5b50; __P_UserName=jamile; __P_UserId=547049877; __P_AuthCode=c5d24fa5ccadba41a455a5f84599bfc7; _xauthTK=%7B%22uid%22%3A%22547049877%22%2C%22uname%22%3A%22jamile%22%2C%22time%22%3A1352691404%7D; _xauthSG=c6e5cdf9b66afb8d2ca38466e570aa44
Referer: http://c.aaa.net/thread_1_15_7313129__.html
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
X-aaa-Forwarded-For: 203.116.251.234
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:39:30 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:39:30 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip



Size 7605
Key 49A27170EE2C1135A124B02AB48B4103
Request sent time Mon Nov 12 13:39:30 2012
Response received time Mon Nov 12 13:39:30 2012


Alternate 9
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Accept: */*
Referer: http://c.aaa.net/thread_1_15_7313317__.html
Accept-Language: zh-cn
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.2)
Accept-Encoding:
X-aaa-Forwarded-For: 114.80.126.83
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:40:28 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:40:28 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key 9DCE7F5A6C33FF18E00B00B272E61DE8
Request sent time Mon Nov 12 13:40:27 2012
Response received time Mon Nov 12 13:40:28 2012


Alternate 10
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Accept: */*
Referer: http://c.aaa.net/forum_1_15.html
Accept-Language: zh-cn
Accept-Encoding: xxxx, xxxxxxx
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
X-aaa-Forwarded-For: 60.55.47.16
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:42:20 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:42:20 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key C184E32F4C9C08C8F34B3B57E47BB74C
Request sent time Mon Nov 12 13:42:20 2012
Response received time Mon Nov 12 13:42:20 2012


Alternate 11
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11
Accept: text/css,*/*;q=0.1
Referer: http://c.aaa.net/forum_1_15.html
Accept-Encoding: gzip,deflate,gzip
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
Cookie: aaaTrackId=107038964; ip_ck=4saJ5//wj7QuNTE4MDU3LjEzNDM0NjM0MDI%3D; Hm_lvt_07d927b19bdaf5589e55729845538e23=1347517917673; __utma=250699996.2086490198.1347517918.1347517918.1347517918.1; __utmz=250699996.1347517918.1.1.utmcsr=plus.aaaa.com|utmccn=(referral)|utmcmd=referral|utmcct=/setuser.html; aaaTrackFirstTime=1351431786622; __userId=1889734; sessionID=9e88a1619e996ec103209b612e99b745; __P_NickName=%CE%E5%C1%EA%C9%D9%C4%EA; __P_JS_NickName=%25u4e94%25u9675%25u5c11%25u5e74; __P_UserName=fsha; __P_UserId=1889734; __P_AuthCode=8a8ffe5d4fba8be6879ac63f5faee9bc; _xauthTK=%7B%22uid%22%3A%221889734%22%2C%22uname%22%3A%22fsha%22%2C%22time%22%3A1352687754%7D; _xauthSG=611d27182ae17b82f800fe0afe8f809d; aaaTrackReturnCnt=40; aaaTrackReturnTime=1352689274365; lv=1352696715; vn=53; ddddPcdsxaaa=1
X-aaa-Forwarded-For: 58.41.104.79
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:46:26 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:46:26 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip

LnBSD 发表于 2012-11-12 14:26

本帖最后由 LnBSD 于 2012-11-12 14:26 编辑

接楼上



Size 7605
Key 616F734F28ED70B965A95479E828C30F
Request sent time Mon Nov 12 13:45:49 2012
Response received time Mon Nov 12 13:46:26 2012


Alternate 12
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
User-Agent: Opera/9.80 (Windows NT 5.1; U; zh-cn) Presto/2.5.24 Version/10.54
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Referer: http://c.aaa.net/lib/photo.php
X-aaa-Forwarded-For: 113.96.157.230
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:49:23 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:49:23 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip



Size 7605
Key 797EF863D9FC9FFE1334515F9F6EF454
Request sent time Mon Nov 12 13:49:23 2012
Response received time Mon Nov 12 13:49:23 2012


Alternate 13
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Accept: text/css
Referer: http://c.aaa.net/forum_1_15.html
Accept-Language: zh-CN
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Accept-Encoding: gzip, deflate, peerdist
DNT: 1
X-P2P-PeerDist: Version=1.1
X-P2P-PeerDistEx: MinContentInformation=1.0, MaxContentInformation=2.0
X-aaa-Forwarded-For: 101.84.61.69
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:50:19 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:50:19 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip



Size 7605
Key D5E7ACC2EC7C27DC93A77298AAE97908
Request sent time Mon Nov 12 13:50:19 2012
Response received time Mon Nov 12 13:50:20 2012


Alternate 14
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
Accept: text/css,*/*;q=0.1
Referer: http://c.aaa.net/thread_1_15_4280275_1__.html
Accept-Encoding: gzip,default,sdch
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
X-aaa-Forwarded-For: 122.225.36.204
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:56:08 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:56:08 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key 08EAF585F333ACF97988D9D93DF69D72
Request sent time Mon Nov 12 13:55:26 2012
Response received time Mon Nov 12 13:56:08 2012


Alternate 15
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Accept: */*
Referer: http://c.aaa.net/thread_1_15_7313070__.html
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: identity
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
Cache-Control: max-age=259200
X-aaa-Forwarded-For: 101.95.5.90
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 05:56:28 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 05:56:28 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key 54787B09EE258503F2D441989C7BE36D
Request sent time Mon Nov 12 13:56:08 2012
Response received time Mon Nov 12 13:56:28 2012


Alternate 16
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Accept: text/css
Referer: http://aaaa.com/thread_10_15_4106141___.html
Accept-Language: zh-CN
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Accept-Encoding: none
X-Original-To: 222.73.174.163
X-aaa-Forwarded-For: 202.104.231.143
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 06:06:28 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 06:06:28 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key CA98CF7FCB6D7130A77F991E22466F2D
Request sent time Mon Nov 12 14:06:28 2012
Response received time Mon Nov 12 14:06:29 2012


Alternate 17
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Referer: http://c.aaa.net/thread_1_15_6881635.html
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Accept: text/css
Accept-Language: zh-CN
X-aaa-Forwarded-For: 211.100.224.72
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 06:06:29 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 06:06:29 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key 9129484097BA418D9D8B6C43FEA0ECDD
Request sent time Mon Nov 12 14:06:29 2012
Response received time Mon Nov 12 14:06:30 2012


Alternate 18
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
User-Agent: Mozilla/4.0 (compatible; Lotus-Notes/6.0; Windows-NT)
Accept-Language: zh-CN
Accept-Language: zh-CN
Accept: text/html
Accept: text/x-html
Accept: application/html
Accept: application/x-html
Accept: text/plain
Accept: image/gif
Accept: image/jpeg
Accept: multipart/*
Accept: application/x-x509-user-cert
Accept: application/x-x509-ca-cert
Accept: */*
Cache-Control: max-stale=0, no-cache
Pragma: no-cache
X-BlueCoat-Via: 083a1f168d54b40b
X-aaa-Forwarded-For: 159.245.48.2
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 06:09:47 GMT
Content-Type: text/css
Content-Length: 36685
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 06:09:47 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes



Size 36685
Key A649484676ADBDA1B9CC89B36E7897B7
Request sent time Mon Nov 12 14:09:46 2012
Response received time Mon Nov 12 14:09:47 2012


Alternate 19
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 AirView1.0
Accept: text/css,*/*;q=0.1
Referer: http://c.aaa.net/thread_1_15_7313355_1.html
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
Cookie: __userId=546610785; sessionID=ea6722a3c7ee77a8b77a2cbe172d9aae; __P_NickName=%B7%EF%BB%CB%CD%E8; __P_JS_NickName=%25u51e4%25u51f0%25u4e38; __P_UserName=sonicphoenix; __P_UserId=546610785; __P_AuthCode=77e11188e9ce8516ae78425d3396d00a; _xauthTK=%7B%22uid%22%3A%22546610785%22%2C%22uname%22%3A%22sonicphoenix%22%2C%22time%22%3A1352686259%7D; _xauthSG=879a0ff028cb8931a523f7d18f2315d8; aaaTrackId=75513142; aaaTrackFirstTime=1352686332887; aaaTrackReturnTime=1352686332887; ip_ck=58SC7/r/j7QuMDMzODA4LjEzNTI2ODYzMjM%3D; lv=1352686333; vn=1; plus_secret=0ae3466f916c7d97ede6fe6b07a9e9d2
X-aaa-Forwarded-For: 180.173.8.63
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 06:09:47 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 06:09:47 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip



Size 7605
Key 91C653CD647FFBCC12735CE25ACFE182
Request sent time Mon Nov 12 14:09:47 2012
Response received time Mon Nov 12 14:09:48 2012


Alternate 20
Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
X-Real-IP: 10.15.232.10
X-Forwarded-For: 10.15.232.10, 127.0.0.1
Host: test.aaaa.com
Referer: http://c.aaa.net/forum_1_15.html
Accept-Encoding: gzip
Accept-Language: zh-CN
User-Agent: Mozilla/5.0 (Linux; U; Android 2.3.3; zh-cn; HTC Incredible S Build/GRI40) UC AppleWebKit/534.31 (KHTML, like Gecko) Mobile Safari/534.31
Cookie: aaaTrackId=65177241; ip_ck=7sGE5v7yj7QuOTY1MTQ1LjEzMjUyOTY4MjM%3D; __gads=ID=379bc7db5914281f:T=1326377611:S=ALNI_MZ3ki1MfKutArlp0DpZGI_LFkc9Xw; Hm_lvt_07d927b19bdaf5589e55729845538e23=1329553052921; __utma=250699996.2095397326.1323129782.1328622160.1329553053.21; aaaTrackFirstTime=1350886992270; aaaTrackReturnCnt=39; aaaTrackReturnTime=1352379677326; lv=1352379677; vn=31
Accept: text/css,*/*;q=0.1
X-aaa-Forwarded-For: 114.90.15.117
Client-ip: 127.0.0.1




Response Header HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Mon, 12 Nov 2012 06:10:04 GMT
Content-Type: text/css
Last-Modified: Thu, 17 May 2012 01:32:16 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 10 Nov 2022 06:10:04 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip



Size 7605
Key 2A9B8A5083DC3FABF301F39E3736B199
Request sent time Mon Nov 12 14:10:03 2012
Response received time Mon Nov 12 14:10:04 2012

LnBSD 发表于 2012-11-12 15:40

本帖最后由 LnBSD 于 2012-11-13 09:48 编辑

我觉得问题可能在客户端的 header

Accept-Encoding:

这个太多值了,造成大量的副本存储 grep"^Accept-Encoding" x|sort -n|uniq
Accept-Encoding:
Accept-Encoding: deflate, gzip
Accept-Encoding: deflate, gzip, identity
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Accept-Encoding: gzip
Accept-Encoding: gzip, deflate
Accept-Encoding: gzip,deflate,bzip2,sdch
Accept-Encoding: gzip, deflate, compress
Accept-Encoding: gzip,deflate,gzip
Accept-Encoding: gzip, deflate, identity
Accept-Encoding: gzip, deflate, peerdist
Accept-Encoding: gzip,deflate,sdch
Accept-Encoding: gzip;q=1.0,identity;q=0.8,qzip;q=0.5
Accept-Encoding: identity
Accept-Encoding: none
Accept-Encoding: xxxx, xxxxxxx
Accept-Encoding: xzip, default
Accept-Encoding: xzip,default,sdch
# grep"^Accept-Encoding" x|sort -n|uniq |wc -l
18类似squid的这个问题 http://windtear.net/2008/07/squid_patch_accept-encoding_multi_cache.html


把 proxy.config.http.normalize_ae_gzip 设为1 就可以解决 Accept-Encoding 无规律头信息的问题了
如果 ats 内置的 Accept-Encoding: gzip 能自定义就更好了,毕竟 标准ie的用户要
多一些

LnBSD 发表于 2012-11-13 11:36

回复 5# aaaaaa

做了proxy.config.http.normalize_ae_gzip 设为1 调整以后,穿透明显减少,效果很不错


   

aaaaaa 发表于 2012-11-13 22:50

TS的多副本match是让我吐血的一点之一。这个地方需要动些手脚。

proxy.config.http.normalize_ae_gzip有效果也还可以啊。再看看后面其他穿透的还有问题吗
页: [1] 2
查看完整版本: Traffic Server 穿透问题