交通大学计算机中心陈昌盛Emailcschenccnctuedutw.ppt
《交通大学计算机中心陈昌盛Emailcschenccnctuedutw.ppt》由会员分享,可在线阅读,更多相关《交通大学计算机中心陈昌盛Emailcschenccnctuedutw.ppt(73页珍藏版)》请在三一文库上搜索。
1、交 通 大 學 計 算 機 中 心 陳 昌 盛 E-mail: cschencc.nctu.edu.tw WWW Proxy/Cache 系統的 建置與管理 TANet Web-proxy Tutorial Course, 88.05.14 1 wWWW Proxy/Caching 系統簡介 (p3-p23) w Squid 2.x 的建置與設定 (p23-p44) w其他相關的系統管理課題 (p45-p53) w附錄 (p54-) 課程大綱 2 相關網站 http:/www.auth.gr/Squid/ ( squid home page) http:/cache.is.co.za (squ
2、id.conf 設定檔) http:/ ( FAQ) http:/proxy.nctu.edu.tw RFC 1016, 2186, 2187 Mailing List squid-users- http:/proxy.nctu.edu.tw/mailing 相關的資訊來源 3 WWW Proxy 系統簡介 Web Proxy/Caching 介紹 TANet 骨幹頻寬分割使用 ( 24M bps) 163.28.0.0 server 專用 channel ( 16M bps ) 關於 Squid 4 Web Caching - 基礎篇 什麼是 web caching ? 什麼是 browse
3、r caching 什麼是 proxy caching ? Transparent Proxy http accelerator vs proxy/caching accelerator : 加快 remote 取 local 資料 caching : 加快 local 取 remote 資料 Redirector 改寫 URL, 管制連線對象 5 Web caching server 運作基本觀念 Web caching 的基本運作原理 hit: 文件檔在 cache 中 miss: 文件檔不在 cache 中 refresh_hit, refresh_miss positive cachi
4、ng vs negative caching 6 Web caching 相關protocol 的運作 TCP connection 的使用時機 browsers/cache 到另一個 web server 或 cache 取回資料 UDP connection 的使用時機 某一 cache server 用以, 查詢其他的 neighbor cache , 有無一筆該站想要的資訊 ICP query ( index 資料) 7 Proxy/caching server HD cache PC client Internet Fig. 1 Proxy/caching server 運作示意圖
5、TANetTANet 區域網路使用者區域網路使用者 163.28.xxx.yyy TANet Gateway X 1a 2a 1b 2b 3b 4b 8 電子期刊等專用 Proxy server PC client Internet Fig. 2 電子期刊專用 Proxy server 運作圖 限制使用對象限制使用對象 ( (必須註冊必須註冊) ) 163.28.xxx.yyy TANet Gateway No Cache allowed 9 HD cache Internet Fig. 3 Transparent Proxy/caching 運作示意圖 TANet Gateway Proxy
6、 PC client 1 2 3 4 5 6 7b 7a Router/Layer4 SW 10 httpd accelerator HD cache Local www server Internet Fig. 4 www accelerator server 運作圖 Redirector on 163.28.xxx.yyy TANet Gateway 1a 1b 2a 2c 2b 1c Port 80 Inside firewall 11 Proxy Cache Metric (參考數字) From IRCACHE project Hit ratio (25% - 30%) byte hi
7、t ratio ( 20%, 通常低於前一項) http:/ NCTU Proxy network Hit ratio ( 30%-35%) byte hit ratio ( 60%-70%) http:/proxy.nctu.edu.tw/ http:/www.edu.tw/moecc/index.htm ( 選文宣刊物) 12 Fig.5 Proxy.NCTU.edu.tw 的使用情況 (1998/11/27) (T) (P) (C) 13 全球 Proxy Cache 網路架構 美國 NLANR 的 IRCACHE 網路 http:/ 其他各地, 可以從上面網頁連上 臺灣地區 proxy
8、 cache 網路 http:/cache.sinica.edu.tw/cache/index.html 14 Fig.6 IRCACHE 的架構, from http:/ 15 Proxy-NCTU Internet MOE Proxy-N Fig. 7 TANet 骨幹的 Proxy Network ( 163.28.0.0 ) TANet gateway 16 Squid Cache Hierarchy Parent/child cache parent 靠近網路骨幹 , child 在較偏遠端 parent 替 child 解決 cache miss siblings ( 同一層 原意
9、, 兄弟姐妹) siblings 相互支援 ( loading 分攤 ) 有一套固定的運作方式 (下一頁) 17 Squid Cache Resolution Algorithm Send ICP queries to all appropriate siblings Wait for all replies to arrive with a configurable timeout (the default is two seconds). Begin fetching the object upon receipt of the first HIT reply, or Fetch the
10、object from the first parent which replied with MISS (subject to weighting values), or Fetch the object from the source 18 Proxy server HD cache Internet Fig. 8 Proxy/caching 與 DNS server 搭配 運作圖 163.28.xxx.yyy TANet Gateway DNS server PC client 1 2 3a 3b45 6a 6b 19 What is Squid ? (1) Squid 從美國的 Har
11、vest 計劃而來(ARPA 支援). Squid 是一個高效能的 proxy caching server 系 統軟體 supporting FTP, gopher, and HTTP data objects Squid handles all requests in a single, non- blocking, I/O-driven process. 20 What is Squid ? (2) Squid supports SSL, extensive access controls, and full request logging. 使用 ICP 通信協定 ( Internet
12、 Cache Protocol) squid caches 可以安排成階層式 (hierarchy) 或 網狀(mesh)的網路 . 21 What is Squid ? (3) Squid keeps meta data and especially hot objects cached in RAM caches DNS lookups, supports non- blocking DNS lookups, and implements negative caching of failed requests. 22 Proxy 系統的建置與管理 Proxy server 選定與安裝 Ca
13、che hierarchy ( neighbor sites ) Access control Gateway program ( Gopher, Ftp, ) Cache administration s_uniqid=2Em4/MoNZkfAd4vndA 1998/11/30 08:14:01| urlParse: URI has whitespace: http:/ ial/modx/news.gif?p_uniqid=1cKL7P4NYBCC9vptmA; s_uniqid=2Em4/MoNZkfAd4vndA 1998/11/30 08:14:10| clientSendMoreDa
14、ta: Deferring http:/ rtBanner/nph-graphic/14345.2 1998/11/30 08:14:10| clientKeepaliveNextRequest: FD 107 Sending next 1998/11/30 08:14:14| urlParse: URI has whitespace: http:/ ial/modx/news.gif?p_uniqid=1cKL7P4NYBCC9vptmA; s_uniqid=2Em4/MoNZkfAd4vndA 1998/11/30 08:19:52| urlParse: URI has whitespac
15、e: http:/ on/tw/graphics/tw_wfx_box_sm.jpg WIDTH= 1998/11/30 08:19:53| urlParse: URI has whitespace: http:/ on/tw/graphics/tw_pca_box_sm.jpg WIDTH= 1998/11/30 08:23:28| Detected DEAD Sibling: proxy.edu.tw/3128/3130 1998/11/30 08:23:30| Detected REVIVED Sibling: proxy.edu.tw/3128/3130 53 附錄 Transpare
16、nt Proxy 的設定 HTTP Accelerator 設定範例 http:/proxy.nctu.edu.tw 如何使用交通大學 Proxy 服務 Proxy.nctu.edu.tw 使用量分佈統計 Cache Manager 的 Sample 54 Transparent Proxy (Squid 設定) 讓 transparent proxy 運作的三道程序 將 packets 導到 proxy/cache host 透過 router, layer4 switch 讓你的 cache host 接受這些經過重導的 packet, 並轉送到機器上的 proxy/cache 程式 ip
17、fwdadm(Linux), ipnat/ip-filter(FreeBSD & Others) 設定 squid 認下這一些 packet, 並找出目的地 address 55 Squid 當 HTTP Accelerator 的範例 範例 1 http_port 80 httpd_accel_host localhost httpd_accel_port 81 httpd_accel_with_proxy on 這一行的作用, 同時當 proxy, accelerator 範例 2: http_port 80 httpd_accel_host httpd_accel_port 80 56
18、 如何使用交通大學 Proxy 服務 - http:/proxy.nctu.edu.tw Proxy 相關資訊 使用須知 一般使用者設定方法 ( user 端配合設定 ) 其它區網中心與上游的 Proxy (acl 與 cache 設定) 新竹地區各單位 Proxy (acl 與 cache 設定) 57 選擇適合的 Auto Proxy Configuration 由於網路架構的不同,以及為了 reliability 的考量,交通大學校內 與校外單位所使用的設定檔並不相同,我們同時提供數份相同的 Auto Proxy 設定檔,請選擇正確的設定檔。 外校單位(清華、中央、工研院等) http:
19、/nctu.edu.tw/proxy.pac http:/proxy.nctu.edu.tw/proxy.pac http:/proxy2.nctu.edu.tw/proxy.pac 交通大學校內 http:/nctu.edu.tw/nctu.pac http:/proxy.nctu.edu.tw/nctu.pac http:/proxy2.nctu.edu.tw/nctu.pac 58 如何設定 Auto Proxy Configuration MSIE 4.x 檢視 - Internet 選項 - 連線 - 自動組態 - 組態 然後在 URL 的地方填入 Auto Proxy URL, 並
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 交通大学 计算机中心 昌盛 Emailcschenccnctuedutw
链接地址:https://www.31doc.com/p-2042580.html