人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當(dāng)前位置:蘿卜系統(tǒng)下載站 > 技術(shù)開發(fā)教程 > 詳細(xì)頁(yè)面

可緩存的CMS系統(tǒng)設(shè)計(jì) [2]

可緩存的CMS系統(tǒng)設(shè)計(jì) [2]

更新時(shí)間:2022-07-26 文章作者:未知 信息來(lái)源:網(wǎng)絡(luò) 閱讀次數(shù):


注意:HTTP_X_FORWARDED_FOR如果經(jīng)過了多個(gè)中間代理服務(wù)器,有何能是逗號(hào)分割的多個(gè)地址,
比如:200.28.7.155,200.10.225.77 unknown,219.101.137.3
因此在很多舊的數(shù)據(jù)庫(kù)設(shè)計(jì)中(比如BBS)往往用來(lái)記錄客戶端地址的字段被設(shè)置成20個(gè)字節(jié)就顯得過小了。
經(jīng)常見到類似以下的錯(cuò)誤信息:Microsoft JET Database Engine 錯(cuò)誤 '80040e57'
字段太小而不能接受所要添加的數(shù)據(jù)的數(shù)量。試著插入或粘貼較少的數(shù)據(jù)。
/inc/char.asp,行236 原因就是在設(shè)計(jì)客戶端訪問地址時(shí),相關(guān)用戶IP字段大小最好要設(shè)計(jì)到50個(gè)字節(jié)以上,當(dāng)然經(jīng)過3層以上代理的幾率也非常小。
如何檢查目前站點(diǎn)頁(yè)面的可緩存性(Cacheablility)呢?可以參考以下2個(gè)站點(diǎn)上的工具:
http://www.ircache.net/cgi-bin/cacheability.py

附:SQUID性能測(cè)試試驗(yàn)
phpMan.php是一個(gè)基于php的man page server,每個(gè)man
page需要調(diào)用后臺(tái)的man命令和很多頁(yè)面格式化工具,系統(tǒng)負(fù)載比較高,提供了Cache
Friendly的URL,以下是針對(duì)同樣的頁(yè)面的性能測(cè)試資料:
測(cè)試環(huán)境:Redhat 8 on Cyrix 266 / 192M Mem
測(cè)試程序:使用apache的ab(apache benchmark):
測(cè)試條件:請(qǐng)求50次,并發(fā)50個(gè)連接
測(cè)試項(xiàng)目:直接通過apache 1.3 (80端口) vs squid 2.5(8000端口:加速80端口) 測(cè)試1:無(wú)CACHE的80端口動(dòng)態(tài)輸出:
ab -n 100 -c 10 http://www.chedong.com:81/phpMan.php/man/kill/1
This is ApacheBench, Version 1.3d <$Revision: 1.2 gt; apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright (c) 1998-2001 The Apache Group, http://www.apache.org/Benchmarking localhost (be patient).....done
Server Software:
Apache/1.3.23
Server Hostname: localhost
Server
Port:
80Document Path:
/phpMan.php/man/kill/1
Document Length: 4655 bytesConcurrency Level: 5
Time taken for tests: 63.164 seconds
Complete requests: 50
Failed requests: 0
Broken pipe errors: 0
Total transferred: 245900 bytes
HTML transferred: 232750 bytes
Requests per second: 0.79 [#/sec] (mean)
Time per request: 6316.40 [ms]
(mean)
Time per request: 1263.28 [ms]
(mean, across all concurrent requests)
Transfer rate:
3.89 [Kbytes/sec] receivedConnnection Times (ms)min mean[+/-sd] median max
Connect: 0
29 106.1 0 553
Processing: 2942 6016
1845.4 6227 10796Waiting:
2941 5999 1850.7 6226 10795Total:
2942 6045 1825.9 6227 10796Percentage of the requests served within a certain time (ms)
50% 6227
66% 7069
75% 7190
80% 7474
90% 8195
95% 8898
98% 9721
99% 10796
100% 10796 (last request)測(cè)試2:SQUID緩存輸出
/home/apache/bin/ab -n50 -c5
"http://localhost:8000/phpMan.php/man/kill/1"
This is ApacheBench, Version 1.3d <$Revision: 1.2 gt; apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright (c) 1998-2001 The Apache Group, http://www.apache.org/Benchmarking localhost (be patient).....done
Server Software:
Apache/1.3.23
Server Hostname: localhost
Server
Port:
8000Document Path:
/phpMan.php/man/kill/1
Document Length: 4655 bytesConcurrency Level: 5
Time taken for tests: 4.265 seconds
Complete requests: 50
Failed requests: 0
Broken pipe errors: 0
Total transferred: 248043 bytes
HTML transferred: 232750 bytes
Requests per second: 11.72 [#/sec] (mean)
Time per request: 426.50 [ms] (mean)
Time per request: 85.30 [ms] (mean,
across all concurrent requests)
Transfer rate:
58.16 [Kbytes/sec] receivedConnnection Times (ms)min mean[+/-sd] median max
Connect:
0 1
9.5 0 68
Processing:
7 83 537.4
7 3808Waiting:
5 81 529.1
6 3748Total:
7 84 547.0
7 3876Percentage of the requests served within a certain time (ms)
50% 7
66% 7
75% 7
80% 7
90% 7
95% 7
98% 8
99% 3876
100% 3876 (last request)結(jié)論:No Cache / Cache = 6045 / 84 = 70
結(jié)論:對(duì)于可能被緩存請(qǐng)求的頁(yè)面,服務(wù)器速度可以有2個(gè)數(shù)量級(jí)的提高,因?yàn)镾QUID是把緩存頁(yè)面放在內(nèi)存里的(因此幾乎沒有硬盤I/O操作)。小節(jié):大訪問量的網(wǎng)站應(yīng)盡可能將動(dòng)態(tài)網(wǎng)頁(yè)生成靜態(tài)頁(yè)面作為緩存發(fā)布,甚至對(duì)于搜索引擎這樣的動(dòng)態(tài)應(yīng)用來(lái)說,緩存機(jī)制也是非常非常重要的。
在動(dòng)態(tài)頁(yè)面中利用HTTP Header定義緩存更新策略。
利用緩存服務(wù)器獲得額外的配置和安全性
日志非常重要:SQUID日志缺省不支持COMBINED日志,但對(duì)于需要REFERER日志的這個(gè)補(bǔ)丁非常重要:http://www.squid-cache.org/mail-archive/squid-dev/200301/0164.html 參考資料:
HTTP代理緩存
http://vancouver-webpages.com/proxy.html
可緩存的頁(yè)面設(shè)計(jì)
http://linux.oreillynet.com/pub/a/linux/2002/02/28/cachefriendly.html
運(yùn)用ASP.NET的輸出緩沖來(lái)存儲(chǔ)動(dòng)態(tài)頁(yè)面 - 開發(fā)者 - ZDNet China
http://www.zdnet.com.cn/developer/tech/story/0,2000081602,39110239-2,00.htm
相關(guān)RFC文檔:RFC
2616:section
13 (Caching)
section
14.9 (Cache-Control header)
section
14.21 (Expires header)
section
14.32 (Pragma: no-cache) is important if you are interacting with
HTTP/1.0 caches
section
14.29 (Last-Modified) is the most common validation method
section
3.11 (Entity Tags) covers the extra validation method 可緩存性檢查
http://www.web-caching.com/cacheability.html
緩存設(shè)計(jì)要素
http://vancouver-webpages.com/CacheNow/detail.htmlZOPE上的幾篇使用APACHE MOD_PROXY MOD_GZIP加速的文檔
http://www.zope.org/Members/anser/apache_zserver/
http://www.zope.org/Members/softsign/ZServer_and_Apache_mod_gzip
http://www.zope.org/Members/rbeer/caching

溫馨提示:喜歡本站的話,請(qǐng)收藏一下本站!

本類教程下載

系統(tǒng)下載排行

網(wǎng)站地圖xml | 網(wǎng)站地圖html
主站蜘蛛池模板: 如皋市| 蓝山县| 拜城县| 龙州县| 贵南县| 罗甸县| 盘山县| 南宁市| 体育| 石台县| 鹿邑县| 龙口市| 四平市| 喀喇| 湄潭县| 鄂州市| 江山市| 陵水| 东兴市| 宁波市| 娄烦县| 双牌县| 习水县| 卓资县| 博爱县| 岚皋县| 兰溪市| 巫溪县| 中宁县| 长海县| 阳东县| 延安市| 新源县| 任丘市| 阿拉善左旗| 韶关市| 泸溪县| 衡阳市| 克东县| 深泽县| 宕昌县|