亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
樓主: aaaaaa
打印 上一主題 下一主題

[proxy] Apache Traffic Server 3.2.0 正式版,附srpm包 [復(fù)制鏈接]

論壇徽章:
0
241 [報(bào)告]
發(fā)表于 2012-03-27 15:30 |只看該作者
ATS能夠?qū)Αrl,referer, agent 進(jìn)行匹配過濾嗎?

論壇徽章:
0
242 [報(bào)告]
發(fā)表于 2012-03-27 21:59 |只看該作者
有基于referer的ACL機(jī)制,參考remap.config的說明。
有基于url的正則表達(dá)式的cache控制,參考cache.config的說明

其他個(gè)性需求,就需要你自己寫幾個(gè)插件啥的啦。你可以參考源代碼里的example/ 和 plugins目錄下的一些插件,配合參考線上SDK文檔(很老啦,最近的變化有點(diǎn)大,僅供參考)作一個(gè)你需要的插件是很簡(jiǎn)單的,Apache Traffic Server強(qiáng)大的插件開發(fā)擴(kuò)展性,很有Apache的風(fēng)格。

FYI

論壇徽章:
0
243 [報(bào)告]
發(fā)表于 2012-04-09 23:28 |只看該作者
Traffic Server 3.0.4

做一個(gè)簡(jiǎn)單的Cache測(cè)試。后臺(tái)服務(wù)器返回頭

Cache-Control        public, max-age=60
Content-Length        73
Content-Type        text/html;charset=UTF-8
Server        Jetty(7.4.1.v20110513)

原意是想讓AST緩存60秒

AST返回
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Cache-Control: public, max-age=60
Content-Length: 73
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 15:05:17 GMT
Age: 2

然后用一個(gè)線程循環(huán)不停地訪問該URL,結(jié)果發(fā)現(xiàn)沒有到60秒AST就會(huì)開始訪問后臺(tái)服務(wù)器。

猜測(cè)并作了一下測(cè)試,大概每訪問300次就認(rèn)為緩存失效而重新訪問后臺(tái)服務(wù)器。(只是猜測(cè),300次也不是特別準(zhǔn)確)

希望高手解惑

論壇徽章:
0
244 [報(bào)告]
發(fā)表于 2012-04-09 23:48 |只看該作者
補(bǔ)充一下,應(yīng)該不是300次。我把訪問次數(shù)和時(shí)間在后臺(tái)服務(wù)器打印出來,結(jié)果如下:
(說明:c1--cn是測(cè)試HTTP訪問次數(shù),n代表第n次http測(cè)試訪問)

c1 Mon Apr 09 23:40:33 CST 2012
c219 Mon Apr 09 23:40:38 CST 2012
c426 Mon Apr 09 23:40:42 CST 2012
c528 Mon Apr 09 23:40:44 CST 2012
c969 Mon Apr 09 23:40:54 CST 2012
c1251 Mon Apr 09 23:41:00 CST 2012
c1288 Mon Apr 09 23:41:01 CST 2012
c1380 Mon Apr 09 23:41:03 CST 2012
c1769 Mon Apr 09 23:41:10 CST 2012
c2116 Mon Apr 09 23:41:17 CST 2012
c2546 Mon Apr 09 23:41:26 CST 2012
c3074 Mon Apr 09 23:41:38 CST 2012
c3210 Mon Apr 09 23:41:40 CST 2012
c3304 Mon Apr 09 23:41:42 CST 2012
c3472 Mon Apr 09 23:41:46 CST 2012
c3530 Mon Apr 09 23:41:48 CST 2012
c3594 Mon Apr 09 23:41:49 CST 2012
c3967 Mon Apr 09 23:41:57 CST 2012
c4060 Mon Apr 09 23:41:59 CST 2012
c4517 Mon Apr 09 23:42:16 CST 2012
c4801 Mon Apr 09 23:42:22 CST 2012
c4891 Mon Apr 09 23:42:24 CST 2012
c5104 Mon Apr 09 23:42:28 CST 2012
c5379 Mon Apr 09 23:42:33 CST 2012
c5717 Mon Apr 09 23:42:40 CST 2012
c6053 Mon Apr 09 23:42:47 CST 2012
c6484 Mon Apr 09 23:42:56 CST 2012
c6637 Mon Apr 09 23:42:58 CST 2012
c6716 Mon Apr 09 23:43:00 CST 2012
c7134 Mon Apr 09 23:43:06 CST 2012
c7743 Mon Apr 09 23:43:16 CST 2012
c7770 Mon Apr 09 23:43:16 CST 2012
c7843 Mon Apr 09 23:43:17 CST 2012
c8083 Mon Apr 09 23:43:21 CST 2012
c8361 Mon Apr 09 23:43:27 CST 2012
c8651 Mon Apr 09 23:43:31 CST 2012
c8826 Mon Apr 09 23:43:34 CST 2012
c9047 Mon Apr 09 23:43:38 CST 2012
c9431 Mon Apr 09 23:43:43 CST 2012
c9610 Mon Apr 09 23:43:46 CST 2012
c10101 Mon Apr 09 23:43:54 CST 2012
c10326 Mon Apr 09 23:43:57 CST 2012
c10642 Mon Apr 09 23:44:03 CST 2012
c10647 Mon Apr 09 23:44:04 CST 2012
c10757 Mon Apr 09 23:44:22 CST 2012
c10981 Mon Apr 09 23:44:44 CST 2012
c11028 Mon Apr 09 23:44:44 CST 2012
c11597 Mon Apr 09 23:44:53 CST 2012
c11693 Mon Apr 09 23:44:55 CST 2012
c11885 Mon Apr 09 23:44:58 CST 2012
c12059 Mon Apr 09 23:45:01 CST 2012
c12236 Mon Apr 09 23:45:05 CST 2012
c12756 Mon Apr 09 23:45:15 CST 2012
c12882 Mon Apr 09 23:45:17 CST 2012
c13197 Mon Apr 09 23:45:24 CST 2012
c13459 Mon Apr 09 23:45:29 CST 2012
c13984 Mon Apr 09 23:45:40 CST 2012
c14057 Mon Apr 09 23:45:42 CST 2012
c14309 Mon Apr 09 23:45:47 CST 2012

論壇徽章:
0
245 [報(bào)告]
發(fā)表于 2012-04-10 00:05 |只看該作者
我覺得你說的很詭異。TS時(shí)間不敢保證精確到ms一下,但是也不至于差多少s的。你能不能打印出每個(gè)response的Age值,把跳變的2個(gè)數(shù)值貼出來我們看看?

最好測(cè)試長(zhǎng)一下。每次跳變的前后值作成一行數(shù)據(jù),如果可以,也記錄Date,我們看看多次測(cè)量后的一些差值情況。


thanks

論壇徽章:
0
246 [報(bào)告]
發(fā)表于 2012-04-10 00:43 |只看該作者
本帖最后由 henhaoqi 于 2012-04-10 00:57 編輯

回復(fù) 246# aaaaaa

我用jmeter壓的,剛剛發(fā)現(xiàn)如果設(shè)置max-age為600,基本是對(duì)的,到了10分鐘有時(shí)超一點(diǎn),最多的超20秒(10分鐘后20秒)后訪問服務(wù)器

設(shè)置為120、180。。。360都非常不準(zhǔn),360的時(shí)候是這樣的

c274 Tue Apr 10 00:19:03 CST 2012
c6233 Tue Apr 10 00:21:09 CST 2012
c12524 Tue Apr 10 00:23:10 CST 2012
c19459 Tue Apr 10 00:25:13 CST 2012

是不是還有個(gè)什么算法和訪問次數(shù)有關(guān)啊?或者有個(gè)什么閥值配置有問題?

如果設(shè)置max-age為60,直接使用瀏覽器訪問時(shí)是好的,但是壓測(cè)時(shí)就有問題。

按照您的要求,我把取樣器的結(jié)果打出來了,先給您看看max-age=60時(shí)后臺(tái)服務(wù)器的訪問間隔
c1 Tue Apr 10 00:35:12 CST 2012
c46 Tue Apr 10 00:35:13 CST 2012
c487 Tue Apr 10 00:35:22 CST 2012
c511 Tue Apr 10 00:35:23 CST 2012
c565 Tue Apr 10 00:35:24 CST 2012
c655 Tue Apr 10 00:35:26 CST 2012

然后看看測(cè)試日志中c45(c46重新訪問服務(wù)器了)的響應(yīng):
<httpSample lt="6" ts="1333989313050" lb="HTTP Request HTTPClient" rc="200" dt="text" by="146">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:42 GMT
json2jsonp: true
Content-Length: 146
Age: 1
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c45</java.net.URL>
</httpSample>


再看c46的響應(yīng)
<httpSample lt="31" ts="1333989313057" lb="HTTP Request HTTPClient" rc="200" dt="text" by="146">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:43 GMT
json2jsonp: true
Content-Length: 146
Age: 0
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c46</java.net.URL>
</httpSample>

Age已經(jīng)是0了

再看看c486(c487重新訪問了)
<httpSample lt="27" ts="1333989322409" lb="HTTP Request HTTPClient" rc="200" dt="text" by="147">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:43 GMT
json2jsonp: true
Content-Length: 147
Age: 9
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c486</java.net.URL>
</httpSample>

c487的age就是0了
<httpSample lt="12" ts="1333989322437" lb="HTTP Request HTTPClient" rc="200" dt="text" by="147">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:52 GMT
json2jsonp: true
Content-Length: 147
Age: 0
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c487</java.net.URL>
</httpSample>


c510(c511后重新訪問)
<httpSample lt="6" ts="1333989322876" lb="HTTP Request HTTPClient" rc="200" dt="text" by="147">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:52 GMT
json2jsonp: true
Content-Length: 147
Age: 1
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c510</java.net.URL>
</httpSample>

c511的:
<httpSample lt="23" ts="1333989322883" lb="HTTP Request HTTPClient" rc="200" dt="text" by="147">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:53 GMT
json2jsonp: true
Content-Length: 147
Age: 0
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c511</java.net.URL>
</httpSample>


c564(c565重新訪問),age是1:
<httpSample lt="27" ts="1333989324115" lb="HTTP Request HTTPClient" rc="200" dt="text" by="147">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:53 GMT
json2jsonp: true
Content-Length: 147
Age: 1
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c564</java.net.URL>
</httpSample>

c565的:
<httpSample lt="12" ts="1333989324142" lb="HTTP Request HTTPClient" rc="200" dt="text" by="147">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:54 GMT
json2jsonp: true
Content-Length: 147
Age: 0
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c565</java.net.URL>
</httpSample>

c654(c655重新訪問):
<httpSample lt="21" ts="1333989325969" lb="HTTP Request HTTPClient" rc="200" dt="text" by="147">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:54 GMT
json2jsonp: true
Content-Length: 147
Age: 2
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c654</java.net.URL>
</httpSample>

c655的:

<httpSample lt="25" ts="1333989325990" lb="HTTP Request HTTPClient" rc="200" dt="text" by="147">
  <responseHeader class="java.lang.String">HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60
Server: ATS/3.0.4
Date: Mon, 09 Apr 2012 16:33:56 GMT
json2jsonp: true
Content-Length: 147
Age: 0
Connection: keep-alive
</responseHeader>
  <java.net.URL>http://json.proxy.ast.com:8080/json?cb=c655</java.net.URL>
</httpSample>

ts就是timestamp(毫秒)。

哦,對(duì)了,我是使用了regex_remap把querystring去掉了的,所以所有的URL最后到后臺(tái)服務(wù)器都轉(zhuǎn)成了http://json.proxy.ast.com:8080/json。即使是不用regex_remap,我也測(cè)試過,一樣的結(jié)果。

是很詭異啊

論壇徽章:
0
247 [報(bào)告]
發(fā)表于 2012-04-10 01:33 |只看該作者
設(shè)置max-age=480時(shí),基本緩存時(shí)間為一半,4分鐘

c1 Tue Apr 10 01:00:45 CST 2012
c22326 Tue Apr 10 01:04:51 CST 2012
c45338 Tue Apr 10 01:08:59 CST 2012
c65989 Tue Apr 10 01:13:00 CST 2012

是不是哪個(gè)參數(shù)將其除以2了然后再加上了個(gè)隨機(jī)數(shù)(可能為負(fù)數(shù))的調(diào)整?

前面說錯(cuò)了,重新測(cè)試了一下設(shè)置max-age=600時(shí),大約是360秒:

c1 Tue Apr 10 01:14:37 CST 2012
c35717 Tue Apr 10 01:20:38 CST 2012
c67308 Tue Apr 10 01:26:54 CST 2012
c103029 Tue Apr 10 01:32:55 CST 2012

論壇徽章:
0
248 [報(bào)告]
發(fā)表于 2012-04-11 00:28 |只看該作者
hmm,我需要找個(gè)時(shí)間寫測(cè)試用例來復(fù)現(xiàn)你的問題。這兩天有點(diǎn)忙

論壇徽章:
0
249 [報(bào)告]
發(fā)表于 2012-04-11 01:28 |只看該作者
回復(fù) 249# aaaaaa


好的,等您消息,多謝。

論壇徽章:
0
250 [報(bào)告]
發(fā)表于 2012-04-11 09:58 |只看該作者
順便說一下:
Apache Traffic Server 3.0.4穩(wěn)定版已經(jīng)進(jìn)了FC15 FC16以及EPEL6的repo,使用Fedora和RHEL的用戶都可以直接yum install啦,希望能夠給大家以便利!
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP