免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 33888 | 回复: 16

[proxy] Traffic Server 穿透问题 [复制链接]

论坛徽章:
0
发表于 2012-11-09 11:46 |显示全部楼层
经过一段时间的使用,感觉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点穿透元素的排名情况


2012-11-09_114220.jpg

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

records.config.rar (7.31 KB, 下载次数: 79)

论坛徽章:
0
发表于 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的内容,或许有些发现

论坛徽章:
0
发表于 2012-11-09 18:20 |显示全部楼层
aaaaaa 发表于 2012-11-09 15:45
3.2社区版本? 社区版本里有个问题,不能存储body size=0的任何结果(其实这是RFC的要求),我们在TS-621上 ...


非常感谢~ {:3_187:}

论坛徽章:
0
发表于 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


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

论坛徽章:
0
发表于 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的说明

论坛徽章:
0
发表于 2012-11-12 14:25 |显示全部楼层
回复 5# aaaaaa
抓了一个url的信息,您给看看 有没有问题
  1. http://test.aaaa.com/c/html/css/aaa-nav.css?2012-11-12
  2. Doc
  3. first key CA9D8FDE87E144BC3D400FA6CECA4063
  4. key 2A9B8A5083DC3FABF301F39E3736B199
  5. sync_serial 9457
  6. write_serial 491002
  7. header length 57048
  8. fragment type 1
  9. fragment table length 0
  10. No of Alternates 20
  11. Action   


  12. Alternate 1
  13. Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
  14. X-Real-IP: 10.15.232.10
  15. X-Forwarded-For: 10.15.232.10, 127.0.0.1
  16. Host: test.aaaa.com
  17. User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
  18. Accept: text/css,*/*;q=0.1
  19. Referer: http://c.aaaa.com/forum_1_15.html
  20. Accept-Language: en-US,en;q=0.8
  21. Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
  22. 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
  23. Accept-Encoding: gzip, deflate, identity
  24. Cache-Control: max-stale=0
  25. X-BlueCoat-Via: D67C9046C8FD9252
  26. X-aaa-Forwarded-For: 192.193.132.13
  27. Client-ip: 127.0.0.1




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



  38. Size 7605
  39. Key 7D570333C4CAC185C3BFD405E6DAFCBC
  40. Request sent time Mon Nov 12 13:28:56 2012  
  41. Response received time Mon Nov 12 13:28:57 2012  


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




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



  65. Size 36685
  66. Key B0344363BC3BB0F0DCF51F68D28EFFC4
  67. Request sent time Mon Nov 12 13:29:03 2012  
  68. Response received time Mon Nov 12 13:29:03 2012  


  69. Alternate 3
  70. Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
  71. X-Real-IP: 10.15.232.10
  72. X-Forwarded-For: 10.15.232.10, 127.0.0.1
  73. Host: test.aaaa.com
  74. 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)
  75. Accept: */*
  76. Accept-Encoding: deflate, gzip
  77. Referer: http://c.aaa.net/forum_2_4___b_md.html
  78. X-aaa-Forwarded-For: 221.194.131.42
  79. Client-ip: 127.0.0.1




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



  91. Size 36685
  92. Key 67791228C72E40B7D9EDAB7F7BB8441C
  93. Request sent time Mon Nov 12 13:29:42 2012  
  94. Response received time Mon Nov 12 13:29:42 2012  


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




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



  118. Size 36685
  119. Key 9670AA0B42A91D4370279D1D30A0B5AF
  120. Request sent time Mon Nov 12 13:29:42 2012  
  121. Response received time Mon Nov 12 13:29:42 2012  


  122. Alternate 5
  123. Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
  124. X-Real-IP: 10.15.232.10
  125. X-Forwarded-For: 10.15.232.10, 127.0.0.1
  126. Host: test.aaaa.com
  127. 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
  128. Referer: http://c.aaa.net/thread_1_15_6082480_2__.html
  129. Accept: text/css,*/*;q=0.1
  130. Accept-Encoding: gzip,deflate,bzip2,sdch
  131. 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
  132. Accept-Language: zh-CN,zh;q=0.8
  133. Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
  134. X-aaa-Forwarded-For: 116.228.230.22
  135. Client-ip: 127.0.0.1




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



  146. Size 7605
  147. Key 58ABD97884250146DFEAAF09E4228E00
  148. Request sent time Mon Nov 12 13:35:47 2012  
  149. Response received time Mon Nov 12 13:35:48 2012  


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




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



  174. Size 7605
  175. Key 81C7A498A5E04194991A95FAB34DD8FB
  176. Request sent time Mon Nov 12 13:39:03 2012  
  177. Response received time Mon Nov 12 13:39:03 2012  


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




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



  200. Size 7605
  201. Key E6A1AB0844245ACD3753D4E007390BD0
  202. Request sent time Mon Nov 12 13:39:13 2012  
  203. Response received time Mon Nov 12 13:39:13 2012  


  204. Alternate 8
  205. Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
  206. X-Real-IP: 10.15.232.10
  207. X-Forwarded-For: 10.15.232.10, 127.0.0.1
  208. Host: test.aaaa.com
  209. Accept: */*
  210. Accept-Encoding: deflate, gzip, identity
  211. Accept-Language: zh-cn
  212. 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
  213. Referer: http://c.aaa.net/thread_1_15_7313129__.html
  214. 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)
  215. X-aaa-Forwarded-For: 203.116.251.234
  216. Client-ip: 127.0.0.1




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



  227. Size 7605
  228. Key 49A27170EE2C1135A124B02AB48B4103
  229. Request sent time Mon Nov 12 13:39:30 2012  
  230. Response received time Mon Nov 12 13:39:30 2012  


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




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



  254. Size 36685
  255. Key 9DCE7F5A6C33FF18E00B00B272E61DE8
  256. Request sent time Mon Nov 12 13:40:27 2012  
  257. Response received time Mon Nov 12 13:40:28 2012  


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




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



  281. Size 36685
  282. Key C184E32F4C9C08C8F34B3B57E47BB74C
  283. Request sent time Mon Nov 12 13:42:20 2012  
  284. Response received time Mon Nov 12 13:42:20 2012  


  285. Alternate 11
  286. Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
  287. X-Real-IP: 10.15.232.10
  288. X-Forwarded-For: 10.15.232.10, 127.0.0.1
  289. Host: test.aaaa.com
  290. Cache-Control: max-age=0
  291. User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11
  292. Accept: text/css,*/*;q=0.1
  293. Referer: http://c.aaa.net/forum_1_15.html
  294. Accept-Encoding: gzip,deflate,gzip
  295. Accept-Language: zh-CN,zh;q=0.8
  296. Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
  297. 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
  298. X-aaa-Forwarded-For: 58.41.104.79
  299. Client-ip: 127.0.0.1




  300. Response Header HTTP/1.1 200 OK
  301. Server: nginx/0.6.35
  302. Date: Mon, 12 Nov 2012 05:46:26 GMT
  303. Content-Type: text/css
  304. Last-Modified: Thu, 17 May 2012 01:32:16 GMT
  305. Connection: keep-alive
  306. Vary: Accept-Encoding
  307. Expires: Thu, 10 Nov 2022 05:46:26 GMT
  308. Cache-Control: max-age=315360000
  309. Content-Encoding: gzip
复制代码

论坛徽章:
0
发表于 2012-11-12 14:26 |显示全部楼层
本帖最后由 LnBSD 于 2012-11-12 14:26 编辑

接楼上




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


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




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



  28. Size 7605
  29. Key 797EF863D9FC9FFE1334515F9F6EF454
  30. Request sent time Mon Nov 12 13:49:23 2012  
  31. Response received time Mon Nov 12 13:49:23 2012  


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




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



  57. Size 7605
  58. Key D5E7ACC2EC7C27DC93A77298AAE97908
  59. Request sent time Mon Nov 12 13:50:19 2012  
  60. Response received time Mon Nov 12 13:50:20 2012  


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




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



  85. Size 36685
  86. Key 08EAF585F333ACF97988D9D93DF69D72
  87. Request sent time Mon Nov 12 13:55:26 2012  
  88. Response received time Mon Nov 12 13:56:08 2012  


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




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



  114. Size 36685
  115. Key 54787B09EE258503F2D441989C7BE36D
  116. Request sent time Mon Nov 12 13:56:08 2012  
  117. Response received time Mon Nov 12 13:56:28 2012  


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




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



  142. Size 36685
  143. Key CA98CF7FCB6D7130A77F991E22466F2D
  144. Request sent time Mon Nov 12 14:06:28 2012  
  145. Response received time Mon Nov 12 14:06:29 2012  


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




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



  168. Size 36685
  169. Key 9129484097BA418D9D8B6C43FEA0ECDD
  170. Request sent time Mon Nov 12 14:06:29 2012  
  171. Response received time Mon Nov 12 14:06:30 2012  


  172. Alternate 18
  173. Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
  174. X-Real-IP: 10.15.232.10
  175. X-Forwarded-For: 10.15.232.10, 127.0.0.1
  176. Host: test.aaaa.com
  177. User-Agent: Mozilla/4.0 (compatible; Lotus-Notes/6.0; Windows-NT)
  178. Accept-Language: zh-CN
  179. Accept-Language: zh-CN
  180. Accept: text/html
  181. Accept: text/x-html
  182. Accept: application/html
  183. Accept: application/x-html
  184. Accept: text/plain
  185. Accept: image/gif
  186. Accept: image/jpeg
  187. Accept: multipart/*
  188. Accept: application/x-x509-user-cert
  189. Accept: application/x-x509-ca-cert
  190. Accept: */*
  191. Cache-Control: max-stale=0, no-cache
  192. Pragma: no-cache
  193. X-BlueCoat-Via: 083a1f168d54b40b
  194. X-aaa-Forwarded-For: 159.245.48.2
  195. Client-ip: 127.0.0.1




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



  207. Size 36685
  208. Key A649484676ADBDA1B9CC89B36E7897B7
  209. Request sent time Mon Nov 12 14:09:46 2012  
  210. Response received time Mon Nov 12 14:09:47 2012  


  211. Alternate 19
  212. Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
  213. X-Real-IP: 10.15.232.10
  214. X-Forwarded-For: 10.15.232.10, 127.0.0.1
  215. Host: test.aaaa.com
  216. Cache-Control: max-age=0
  217. 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
  218. Accept: text/css,*/*;q=0.1
  219. Referer: http://c.aaa.net/thread_1_15_7313355_1.html
  220. Accept-Encoding: gzip,deflate,sdch
  221. Accept-Language: zh-CN,zh;q=0.8
  222. Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
  223. 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
  224. X-aaa-Forwarded-For: 180.173.8.63
  225. Client-ip: 127.0.0.1




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



  236. Size 7605
  237. Key 91C653CD647FFBCC12735CE25ACFE182
  238. Request sent time Mon Nov 12 14:09:47 2012  
  239. Response received time Mon Nov 12 14:09:48 2012  


  240. Alternate 20
  241. Request Header GET http://10.15.233.199/c/html/css/aaa-nav.css?2012-11-12 HTTP/1.1
  242. X-Real-IP: 10.15.232.10
  243. X-Forwarded-For: 10.15.232.10, 127.0.0.1
  244. Host: test.aaaa.com
  245. Referer: http://c.aaa.net/forum_1_15.html
  246. Accept-Encoding: gzip
  247. Accept-Language: zh-CN
  248. 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
  249. 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
  250. Accept: text/css,*/*;q=0.1
  251. X-aaa-Forwarded-For: 114.90.15.117
  252. Client-ip: 127.0.0.1




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



  263. Size 7605
  264. Key 2A9B8A5083DC3FABF301F39E3736B199
  265. Request sent time Mon Nov 12 14:10:03 2012  
  266. Response received time Mon Nov 12 14:10:04 2012  
复制代码

论坛徽章:
0
发表于 2012-11-12 15:40 |显示全部楼层
本帖最后由 LnBSD 于 2012-11-13 09:48 编辑

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

Accept-Encoding:

这个太多值了,造成大量的副本存储
  1. grep  "^Accept-Encoding" x|sort -n|uniq
  2. Accept-Encoding:
  3. Accept-Encoding: deflate, gzip
  4. Accept-Encoding: deflate, gzip, identity
  5. Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
  6. Accept-Encoding: gzip
  7. Accept-Encoding: gzip, deflate
  8. Accept-Encoding: gzip,deflate,bzip2,sdch
  9. Accept-Encoding: gzip, deflate, compress
  10. Accept-Encoding: gzip,deflate,gzip
  11. Accept-Encoding: gzip, deflate, identity
  12. Accept-Encoding: gzip, deflate, peerdist
  13. Accept-Encoding: gzip,deflate,sdch
  14. Accept-Encoding: gzip;q=1.0,identity;q=0.8,qzip;q=0.5
  15. Accept-Encoding: identity
  16. Accept-Encoding: none
  17. Accept-Encoding: xxxx, xxxxxxx
  18. Accept-Encoding: xzip, default
  19. Accept-Encoding: xzip,default,sdch
  20. [root@pch-dl160g5-cache3 ~]# grep  "^Accept-Encoding" x|sort -n|uniq |wc -l
  21. 18
复制代码
类似squid的这个问题 http://windtear.net/2008/07/squi ... ng_multi_cache.html


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

论坛徽章:
0
发表于 2012-11-13 11:36 |显示全部楼层
回复 5# aaaaaa

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


   

论坛徽章:
0
发表于 2012-11-13 22:50 |显示全部楼层
TS的多副本match是让我吐血的一点之一。这个地方需要动些手脚。

proxy.config.http.normalize_ae_gzip有效果也还可以啊。再看看后面其他穿透的还有问题吗
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP