MozTW 討論區

各項 Mozilla 相關軟體與技術討論
現在的時間是 2025-06-24, 01:01

所有顯示的時間為 UTC + 8 小時





發表新文章 回覆主題  [ 14 篇文章 ] 
發表人 內容
文章發表於 : 2009-02-04, 21:27 
離線
頭像

註冊時間: 2006-03-28, 00:34
文章: 9
代碼:
Network.http.max-persistent-connections-per- server

這個參數是Firefox並發連接數限制參數。我多年一直有一個疑問,Firefox並發連接數限制是針對網址還是針對服務器IP?官方網站說的也不清不楚。
引言回覆:
測試方法

在一個apache服務器上,配置一個虛擬主機x.tt.cn,並在該虛擬主機下配置ServerAlias *.tt.cn,重啟apache讓配置生效。在該虛擬主機的文檔目錄下放置一個圖片t.jpg,並編輯一個t.html,在其中引用20個圖片,圖片的 URL為http://x01.tt.cn/t.jpg類推到http : //x20.tt.cn/t.jpg。

在客戶端上,編輯/etc/hosts (Windows是$WINDOWS\system32\drivers\etc\hosts),加入x.tt.cn,x01.tt.cn直到x20.tt.cn,都對應這個服務器的IP地址。

在此客戶端上訪問http://x.tt.cn/t.html並檢查並發連接數。


並發連接數是否會超過此参数的限制?
如果是的話,證明此此参数是用來限制域名的。
但這個參數後面跟的是server而不是site,如果有人能提供確切的資料就好了,當然如果能提供更深入的資料那就感激不盡了


最後由 cuthead 於 2009-02-05, 18:47 編輯,總共編輯了 2 次。

回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 00:05 
離線
頭像

註冊時間: 2006-03-28, 00:34
文章: 9
这咋还没人回复呢,是不是大家认为我比较菜所以不屑于回答?其实我也是一个Linux资深用户,刚刚用Windows只是临时的。大家看我帖子底下就全明白了


回頂端
Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.0.5) Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 01:17 
離線
[網站管理員]

註冊時間: 2005-01-02, 05:49
文章: 3220
cuthead 寫:
这咋还没人回复呢,是不是大家认为我比较菜所以不屑于回答?其实我也是一个Linux资深用户,刚刚用Windows只是临时的。大家看我帖子底下就全明白了


三小時內就要人回應,是否太急了呢。

我想你的文章太深了,又是簡體字,有興趣又能回答的人應該不多,再等個一會吧。

(在那之前還請你先把首篇重新排版一下,方便大家閱讀,比如說有些字跟超連結黏在一起,然後因為有長英數字的關係,段落感覺也很不明顯,用點空行隔開,或是用個代號稱呼那一長串英數字會好點;然後有必要的話,使用 BBcode 的 quote 或 code 語法來加強說明引用文或程式碼。)

_________________
【Firefox 有問題請先看這裡】
回覆文章的建議
萬用自我檢測除錯大法 for Firefox
完全備份大法 for Firefox
重建 Firefox 的設定
乾淨升級 Firefox
(本帳號停用中)


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 12:12 
離線

註冊時間: 2005-12-15, 22:30
文章: 61
MozTW 放個繁簡轉換吧! :D


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.9) Gecko/2008052906 Firefox/3.0
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 14:37 
離線

註冊時間: 2004-06-17, 22:54
文章: 180
有新同文堂,繁簡不會是問題的。我想是樓主的問題太深了。能夠回答的人很少。我都看不懂問題 :oops:


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 15:31 
離線
頭像

註冊時間: 2003-07-17, 22:16
文章: 941
不知道是不是這個意思
fx可以限制每個server的連接數
但判斷server的依據 是IP、網址還是域名?

http://kb.mozillazine.org/Firefox_:_FAQ ... ig_Entries
引言回覆:
network. http. max-connections
Determines the maximum number of simultaneous HTTP connections. Default value is 24. Valid values are between 1 and 65535 inclusive.

network. http. max-connections-per-server

Determines the maximum number of simultaneous HTTP connections that can be established per host. If a proxy server is configured, then the server is the proxy server. Default value is 8. Valid values are between 1 and 255 inclusive.

network. http. max-persistent-connections-per-proxy

If network.http.keep-alive is true, and if a proxy server is configured, then a new connection will only be attempted if the number of active persistent connections to the server is less than this preference. Default value is 4. Valid values are between 1 and 255 inclusive.

network. http. max-persistent-connections-per-server

If network.http.keep-alive is true, and if a proxy server is not configured, then a new connection will only be attempted if the number of active persistent connections to the server is less than this preference. Default value is 2. Valid values are between 1 and 255 inclusive.

樓主要的限制連線數應該不是network. http. max-persistent-connections-per-server
因為這個是keep-alive用的(持續連線不中斷的限制連接數)比較特別的用途

而是這個吧?network. http. max-connections-per-server
這個應該是連線(下載?)完就中斷 所以很難用到預設的上限24個

看它的敘述限制判斷的依據似乎是host的IP


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2) Gecko/20090131 Minefield/3.1b2 (.NET CLR 3.5.30729) (tete009 SSE PGO
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 16:34 
離線
頭像

註冊時間: 2003-10-27, 02:07
文章: 380
來自: Taipei, Taiwan
orange 寫:
不知道是不是這個意思
fx可以限制每個server的連接數
但判斷server的依據 是IP、網址還是域名?

http://kb.mozillazine.org/Firefox_:_FAQ ... ig_Entries
引言回覆:
network. http. max-connections
Determines the maximum number of simultaneous HTTP connections. Default value is 24. Valid values are between 1 and 65535 inclusive.

network. http. max-connections-per-server

Determines the maximum number of simultaneous HTTP connections that can be established per host. If a proxy server is configured, then the server is the proxy server. Default value is 8. Valid values are between 1 and 255 inclusive.

network. http. max-persistent-connections-per-proxy

If network.http.keep-alive is true, and if a proxy server is configured, then a new connection will only be attempted if the number of active persistent connections to the server is less than this preference. Default value is 4. Valid values are between 1 and 255 inclusive.

network. http. max-persistent-connections-per-server

If network.http.keep-alive is true, and if a proxy server is not configured, then a new connection will only be attempted if the number of active persistent connections to the server is less than this preference. Default value is 2. Valid values are between 1 and 255 inclusive.

樓主要的限制連線數應該不是network. http. max-persistent-connections-per-server
因為這個是keep-alive用的(持續連線不中斷的限制連接數)比較特別的用途

而是這個吧?network. http. max-connections-per-server
這個應該是連線(下載?)完就中斷 所以很難用到預設的上限24個

看它的敘述限制判斷的依據似乎是host的IP


總連線上限是這個: network.http.max-connections
每一Server是這個: network.http.max-connections-per-server
Keep-Alive是這個: network.http.max-persistent-connections-per-server
Proxy Keep-Alive是這個: network.http.max-persistent-connections-per-proxy


cuthead 寫:
這咋還沒人回覆呢,是不是大家認為我比較菜所以不屑於回答?其實我也是一個Linux資深用戶,剛剛用Windows只是臨時的。大家看我帖子底下就全明白了


判斷的都是IP不是domain name, source code裡有阿, 另外如果是在Linux下還會受到ulimit的限制歐
這裡不會有人覺得別人菜就不屑回答, 但是請注意禮貌, 畢竟不是所有人都24H常駐在網路上
我也有玩Ubuntu和Fedora, 歡迎交流歐

P.S: 推薦一個Linux的新聞站 http://lwn.net/

_________________
Meetings: Because none of us is as dumb as all of us.

- Firefox embedded化商業顧問中
- Linux embedded化商業顧問中
- Linux 系統顧問中
- 系統整合的雜七雜八顧問中
- Android開發中: 正在跟ARM的EGLIBC纏鬥中 .....
- Windows Mobile開發中: 就讓WM走入歷史吧 !


回頂端
Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-TW; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 16:43 
離線
[MozTW 版主群]
頭像

註冊時間: 2008-10-10, 11:27
文章: 982
抱歉,插話一下,Firefox 裡有一個 pipelining 選項,那應該還在實驗階段吧?現在還有沒支援 pipelining 的網站嗎?

_________________
圖檔


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.9.1b3pre) Gecko/20090204 Shiretoko/3.1b3pre
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 17:37 
離線
頭像

註冊時間: 2003-10-27, 02:07
文章: 380
來自: Taipei, Taiwan
adam 寫:
抱歉,插話一下,Firefox 裡有一個 pipelining 選項,那應該還在實驗階段吧?現在還有沒支援 pipelining 的網站嗎?


network.http.pipelining = true 是HTTP 1.1的正式標準也是Firefox預設值

目前所有新的HTTP 1.1 standard 以上的 server 都支援, 只是看它們要不要開
另外, 好像 IIS 特定版本在這方面的實做好像沒有完全照標準做

_________________
Meetings: Because none of us is as dumb as all of us.

- Firefox embedded化商業顧問中
- Linux embedded化商業顧問中
- Linux 系統顧問中
- 系統整合的雜七雜八顧問中
- Android開發中: 正在跟ARM的EGLIBC纏鬥中 .....
- Windows Mobile開發中: 就讓WM走入歷史吧 !


回頂端
Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-TW; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 18:49 
離線
頭像

註冊時間: 2006-03-28, 00:34
文章: 9
wini 寫:
cuthead 寫:
这咋还没人回复呢,是不是大家认为我比较菜所以不屑于回答?其实我也是一个Linux资深用户,刚刚用Windows只是临时的。大家看我帖子底下就全明白了


三小時內就要人回應,是否太急了呢。

我想你的文章太深了,又是簡體字,有興趣又能回答的人應該不多,再等個一會吧。

(在那之前還請你先把首篇重新排版一下,方便大家閱讀,比如說有些字跟超連結黏在一起,然後因為有長英數字的關係,段落感覺也很不明顯,用點空行隔開,或是用個代號稱呼那一長串英數字會好點;然後有必要的話,使用 BBcode 的 quote 或 code 語法來加強說明引用文或程式碼。)

不好意思,当时着急发帖所以没注意字里行间。已使用Google Translate翻译好,并整理好版面。另外其实我回复是开玩笑,我并不是很着急,谢谢你的回复。


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 18:57 
離線
頭像

註冊時間: 2006-03-28, 00:34
文章: 9
Dark Shenada 寫:
orange 寫:
不知道是不是這個意思
fx可以限制每個server的連接數
但判斷server的依據 是IP、網址還是域名?

http://kb.mozillazine.org/Firefox_:_FAQ ... ig_Entries
引言回覆:
network. http. max-connections
Determines the maximum number of simultaneous HTTP connections. Default value is 24. Valid values are between 1 and 65535 inclusive.

network. http. max-connections-per-server

Determines the maximum number of simultaneous HTTP connections that can be established per host. If a proxy server is configured, then the server is the proxy server. Default value is 8. Valid values are between 1 and 255 inclusive.

network. http. max-persistent-connections-per-proxy

If network.http.keep-alive is true, and if a proxy server is configured, then a new connection will only be attempted if the number of active persistent connections to the server is less than this preference. Default value is 4. Valid values are between 1 and 255 inclusive.

network. http. max-persistent-connections-per-server

If network.http.keep-alive is true, and if a proxy server is not configured, then a new connection will only be attempted if the number of active persistent connections to the server is less than this preference. Default value is 2. Valid values are between 1 and 255 inclusive.

樓主要的限制連線數應該不是network. http. max-persistent-connections-per-server
因為這個是keep-alive用的(持續連線不中斷的限制連接數)比較特別的用途

而是這個吧?network. http. max-connections-per-server
這個應該是連線(下載?)完就中斷 所以很難用到預設的上限24個

看它的敘述限制判斷的依據似乎是host的IP


總連線上限是這個: network.http.max-connections
每一Server是這個: network.http.max-connections-per-server
Keep-Alive是這個: network.http.max-persistent-connections-per-server
Proxy Keep-Alive是這個: network.http.max-persistent-connections-per-proxy


cuthead 寫:
這咋還沒人回覆呢,是不是大家認為我比較菜所以不屑於回答?其實我也是一個Linux資深用戶,剛剛用Windows只是臨時的。大家看我帖子底下就全明白了


判斷的都是IP不是domain name, source code裡有阿, 另外如果是在Linux下還會受到ulimit的限制歐
這裡不會有人覺得別人菜就不屑回答, 但是請注意禮貌, 畢竟不是所有人都24H常駐在網路上
我也有玩Ubuntu和Fedora, 歡迎交流歐

P.S: 推薦一個Linux的新聞站 http://lwn.net/

高手,感謝Dark Shenada。看您頭像就知道您不簡單,您的大作我一定會仔細閱讀的。我閱讀英語有輕微障礙,經常需要使用翻譯單詞的bookmarklet,所以 lwn.net這個網站我貌似Delicious過,不過確實沒仔細看。其實我是一個Linux菜鳥,經常被Linux某些難題難住。你也知道在大陸人人都很喜歡裝,我把這壞毛病帶到這裡了。 (也有開玩笑的意思)。當時發帖比較著急所以沒注意字裡行間的問題。 大陸一個人發帖說Firefox是根據網址來限制連接數。我當時很氣憤這人睜眼說瞎話。


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-05, 22:28 
離線

註冊時間: 2009-02-05, 21:48
文章: 2
首先說聲抱歉,把戰火延燒到這裡。我就是在 http://linux.solidot.org/article.pl?sid=09/01/16/066258 和樓主爭論的人,並且之前我們有很多技術上的討論、爭論,很明顯他在技術基礎上很薄弱,卻很喜歡對其他人進行人身攻擊和貶低。本來技術討論抑或爭論是件好事,可以分享知識,也可以在找論據中學到新的知識。然而在我指出樓主話中的技術錯誤后,他說出這樣的話

引言回覆:
如果我没错你诬蔑我错的话,我要你的人头落地,你敢跟我打这个赌吗?你还有脸说废话,normalsb也犯了一个明显的错误却不自知。我不知道你们这些扯淡流的话是自己胡编出来还是跟哪个更扯淡的大虾鹦鹉学舌而来,但我的话在网上都可以找到根据。我说浏览器连接同一个服务器默认最大连接数不超过10,我这句话就撂这里了,谁敢用论据反驳?


注意其中他故意把另外一個用戶的 id normanzb 寫成 normalsb,知道大陸論壇常用語的會瞭解 sb 是罵人的話。這且按下不表。

我之後回覆了一個帖子,描述了一個可以重複的簡單測試,可以證明他是錯誤的。估計他個人沒法或者沒能力重複這個測試--這在linux資深用家中相當少見--也沒法反駁我,要求我給他英文的參考文章的鏈接,因為相關的資料比較多,我告訴他怎么用 google 搜到。

之後他不死心,又跑到這裡來發帖找論據。找到可以支持他的論據后,跑回去在另外一個 無關帖子 里這樣回覆我

引言回覆:
摆脱你怎么又写出这么多垃圾信息啊?谁问你了?以后你想写垃圾信息麻烦请在地址栏输入 http://tieba.baidu.com/


引言回覆:
另外你那个连接数问题,我特意发到台湾论坛上去了,台湾人说了我是正确的 [moztw.org]。建议你以后说话最好带上良心。哥们我这次放过你,但不代表我认可你令人恶心的行为。你如果不是一个程序员就不要指望我以程序员态度对你。


雖然我認為和他繼續下去很浪費時間,但以其以後在別的帖子上浪費時間,不如這次乾脆點,讓他輸得無話可說。當然我這想法天真了點。

Dark Shenada 寫:
orange 寫:
不知道是不是這個意思
fx可以限制每個server的連接數
但判斷server的依據 是IP、網址還是域名?

http://kb.mozillazine.org/Firefox_:_FAQ ... ig_Entries
引言回覆:
network. http. max-connections
Determines the maximum number of simultaneous HTTP connections. Default value is 24. Valid values are between 1 and 65535 inclusive.

network. http. max-connections-per-server

Determines the maximum number of simultaneous HTTP connections that can be established per host. If a proxy server is configured, then the server is the proxy server. Default value is 8. Valid values are between 1 and 255 inclusive.

network. http. max-persistent-connections-per-proxy

If network.http.keep-alive is true, and if a proxy server is configured, then a new connection will only be attempted if the number of active persistent connections to the server is less than this preference. Default value is 4. Valid values are between 1 and 255 inclusive.

network. http. max-persistent-connections-per-server

If network.http.keep-alive is true, and if a proxy server is not configured, then a new connection will only be attempted if the number of active persistent connections to the server is less than this preference. Default value is 2. Valid values are between 1 and 255 inclusive.

樓主要的限制連線數應該不是network. http. max-persistent-connections-per-server
因為這個是keep-alive用的(持續連線不中斷的限制連接數)比較特別的用途

而是這個吧?network. http. max-connections-per-server
這個應該是連線(下載?)完就中斷 所以很難用到預設的上限24個

看它的敘述限制判斷的依據似乎是host的IP


總連線上限是這個: network.http.max-connections
每一Server是這個: network.http.max-connections-per-server
Keep-Alive是這個: network.http.max-persistent-connections-per-server
Proxy Keep-Alive是這個: network.http.max-persistent-connections-per-proxy


cuthead 寫:
這咋還沒人回覆呢,是不是大家認為我比較菜所以不屑於回答?其實我也是一個Linux資深用戶,剛剛用Windows只是臨時的。大家看我帖子底下就全明白了


判斷的都是IP不是domain name, source code裡有阿, 另外如果是在Linux下還會受到ulimit的限制歐
這裡不會有人覺得別人菜就不屑回答, 但是請注意禮貌, 畢竟不是所有人都24H常駐在網路上
我也有玩Ubuntu和Fedora, 歡迎交流歐

P.S: 推薦一個Linux的新聞站 http://lwn.net/


source code 分析見 http://tieba.baidu.com/f?kz=535393925,我就不貼在這裡了。鏈接過去是簡體網站,見諒,但閱讀是沒有問題的。

其實,max-connections-per-server 的說明裡面是有提到

引言回覆:
Determines the maximum number of simultaneous HTTP connections that can be established per host.


HTTP/1.0 時代,一個 host 對應一個 ip;之後 HTTP/1.1 引入 Host: header,多個 host 可以對應同一 ip。當下的瀏覽器、伺服器在 HTTP/1.0 上也實做了 Host: header。

若果這戰火影響到各位,我致以萬分之歉意。


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-06, 03:19 
離線
頭像

註冊時間: 2003-10-27, 02:07
文章: 380
來自: Taipei, Taiwan
Hmm, 果然應該把code給看完的, 當時犯了個"想當然爾"的錯誤, 以為GetAsciiHost會提前作DNS解析, 果然不該先預設立場來看code的, 剛剛把xulrunner也抓回來一起看, 結果發現只是真的很單純的用來處理字串編碼而已, 很抱歉給了錯誤的資訊(雖然目前我還不能100%確定一定是單純的by host name而已, 不過畢竟我沒有先看完code就說得很肯定的樣子)

另, 有趣的問題是, 既然Firefox是拿URI來做hash, 那不是就違背了限制client連線以降低server負擔的本意了嗎 !?, 另外, 如果某站台使用了DNS來做流量分散, 一host name對多IP的情況, 那不就降低了效率, 又多host name對應一IP時, 不就會造成限制連線數以保護server的機制無用, 而且在nsStandardURL裡有用到IDN, 所以我認為應該一定有其他的code在處理上述的情況

我會在這幾天等demo做完後, 花點時間來仔細看code(雖然我不太歡C++的code, 尤其是用了一堆繼承和虛擬函式的寫法的時候, 一點也不優美, 也不好trace), 總而言之, 還請lark兄多多包含指教了, 如有什麼心得也希望能不吝分享, 我會把http://tieba.baidu.com/f?kz=535393925給bookmark起來以trace這個問題, 如果您願意的話, 希望能把http://tieba.baidu.com/f?kz=535393925中您的文章在MozTW這裡並開新串並轉載以用於討論

祝 順頌
Dark Shenada 2009/02/06 03:18

_________________
Meetings: Because none of us is as dumb as all of us.

- Firefox embedded化商業顧問中
- Linux embedded化商業顧問中
- Linux 系統顧問中
- 系統整合的雜七雜八顧問中
- Android開發中: 正在跟ARM的EGLIBC纏鬥中 .....
- Windows Mobile開發中: 就讓WM走入歷史吧 !


回頂端
Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-TW; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2009-02-06, 15:18 
離線

註冊時間: 2009-02-05, 21:48
文章: 2
Dark Shenada 寫:
Hmm, 果然應該把code給看完的, 當時犯了個"想當然爾"的錯誤, 以為GetAsciiHost會提前作DNS解析, 果然不該先預設立場來看code的, 剛剛把xulrunner也抓回來一起看, 結果發現只是真的很單純的用來處理字串編碼而已, 很抱歉給了錯誤的資訊(雖然目前我還不能100%確定一定是單純的by host name而已, 不過畢竟我沒有先看完code就說得很肯定的樣子)

另, 有趣的問題是, 既然Firefox是拿URI來做hash, 那不是就違背了限制client連線以降低server負擔的本意了嗎 !?, 另外, 如果某站台使用了DNS來做流量分散, 一host name對多IP的情況, 那不就降低了效率, 又多host name對應一IP時, 不就會造成限制連線數以保護server的機制無用, 而且在nsStandardURL裡有用到IDN, 所以我認為應該一定有其他的code在處理上述的情況

我會在這幾天等demo做完後, 花點時間來仔細看code(雖然我不太歡C++的code, 尤其是用了一堆繼承和虛擬函式的寫法的時候, 一點也不優美, 也不好trace), 總而言之, 還請lark兄多多包含指教了, 如有什麼心得也希望能不吝分享, 我會把http://tieba.baidu.com/f?kz=535393925給bookmark起來以trace這個問題, 如果您願意的話, 希望能把http://tieba.baidu.com/f?kz=535393925中您的文章在MozTW這裡並開新串並轉載以用於討論

祝 順頌
Dark Shenada 2009/02/06 03:18


須知每伺服器連線數的限制是繼承于用撥號網路的時代。每伺服器連線數限制有兩層意思

1. 撥號網路的典型頻寬是 9.6kbps 和 33.6kbps,後來才有 56k,多連線非但無法提高速度,反而會降低速度,造成每個連線的時間都會變長;
2. 更長的連線時間意味著伺服器需要同時承擔更多的連線,而舊時的伺服器硬體能力和現在是無法比的;並且伺服器軟體上,延自 NCSA httpd 的多行程構架的幷發能力也是有限的;

現今無論是頻寬還是伺服器能力來講,這兩個問題都不存在,幷發連線限制就顯得不合時宜了(并非說沒有用)。Web 2.0 應用的特性之一就是快速、时间短的連線(不考虑keepalive),只要速度上去,幷發會下降,象 lighttpd,nginx 這樣的伺服器軟體,其連線能力是很強的。

瀏覽器不瞭解伺服器的情況,但伺服器自己是瞭解的,所以用單 IP 多 host 是可行的。當然,更常用的方式是多個伺服器多個 host,把每個伺服器的任務簡單化。

引言回覆:
另外, 如果某站台使用了DNS來做流量分散, 一host name對多IP的情況, 那不就降低了效率


其實不會降低效率,只是保持效率(從瀏覽器角度看),你可以把這種情況視為一個具有更大連線能力的單伺服器。


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
 個人資料  
引用回覆  
顯示文章 :  排序  
發表新文章 回覆主題  [ 14 篇文章 ] 

所有顯示的時間為 UTC + 8 小時


誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 35 位訪客


不能 在這個版面發表主題
不能 在這個版面回覆主題
不能 在這個版面編輯您的文章
不能 在這個版面刪除您的文章
不能 在這個版面上傳附加檔案

搜尋:
前往 :  
Powered by phpBB® Forum Software © phpBB Group
正體中文語系由 竹貓星球 維護製作
© moztw.org, Mozilla Foundation
MozTW,Mozilla 台灣社群