歡迎您光臨本站 註冊首頁

【轉】sina,sohu等門戶級網站架構設計(ZT)

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

【轉】sina,sohu等門戶級網站架構設計(ZT)

sina,sohu等門戶級網站架構設計(轉發)

門戶級網站架構設計
1、 新浪

新浪採用了ChinaCache做的CDN系統,ChinaCache在全國分佈了四十多個點,同時採用基於動態dns分配的全球伺服器負載均衡技術。

從新浪的站點結構可以看出:

> www.sina.com.cn

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: libra.sina.com.cn

Addresses:61.135.152.71, 61.135.152.72, 61.135.152.73, 61.135.152.7461.135.152.75, 61.135.152.76, 61.135.153.181, 61.135.153.182,61.135.53.183, 61.135.153.184, 61.135.152.65, 61.135.152.66,61.135.152.67, 61.135.12.68, 61.135.152.69, 61.135.152.70

Aliases: www.sina.com.cn, jupiter.sina.com.cn

在北京地區ChinaCache將www.sina.com.cn的網址解析到libra.sina.com.cn,然後libra.sina.com.cn做了dns負載均衡,將libra.sina.com.cn解析到61.135.152.71等16個ip上,這16個ip分佈在北京的多台前台緩存伺服器上,使用squid做前台緩存。如果是在其它地區訪問www.sina.com.cn可能解析到本地相應的伺服器,例如pavo.sina.com.cn,然後pavo又對應了很多做了squid的ip。這樣就實現了在不同地區訪問自動轉到最近的伺服器訪問,達到加快訪問速度的效果。

我們再看一個新浪其它頻道是指到哪裡的:

> news.sina.com.cn

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: libra.sina.com.cn

Addresses:61.135.152.65, 61.135.152.66, 61.135.152.67, 61.135.152.6861.135.152.69, 61.135.152.70, 61.135.152.71, 61.135.152.72,61.135.152.73 61.135.153.178, 61.135.153.179, 61.135.153.180,61.135.153.181, 61.135.153.182 61.135.153.183, 61.135.153.184

Aliases: news.sina.com.cn, jupiter.sina.com.cn

可以看出,各個頻道的前台緩存集群與www.sina.com.cn的前台緩存集群是相同的。

2、 搜狐

Sohu與新浪的原理差不多,下面是nslookup的結果:

> www.sohu.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: pagegrp1.sohu.com

Addresses:61.135.132.172, 61.135.132.173, 61.135.132.176, 61.135.133.10961.135.145.47, 61.135.150.65, 61.135.150.67, 61.135.150.69,61.135.150.74 61.135.150.75, 61.135.150.113, 61.135.150.145,61.135.131.73, 61.135.131.91 61.135.131.180, 61.135.131.182,61.135.131.183, 61.135.132.65, 61.135.

132.80

Aliases: www.sohu.com

只不過libra.sina.com.cn換成了pagegrp1.sohu.com

我們再來看一下sohu的頻道:

> news.sohu.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: pagegrp1.sohu.com

Addresses:61.135.145.47, 61.135.150.65, 61.135.150.67, 61.135.150.6961.135.150.74, 61.135.150.75, 61.135.150.113, 61.135.150.145,61.135.131.73 61.135.131.91, 61.135.131.180, 61.135.131.182,61.135.131.183, 61.135.132.65 61.135.132.80, 61.135.132.172,61.135.132.173, 61.135.132.176, 61.135.133.109

Aliases: news.sohu.com

同新浪相同,用的是同樣的伺服器群,這可能是因為他們用的都是ChinaCache的服務吧,不過sohu的名字起的有點土,pagegrp1,沒有libra,pavo好聽,這名字聽起來有點像法語,比較浪漫。

3、 網易

網易似乎沒用ChinaCache的服務,下面是nslookup結果:

> www.163.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: www.163.com

Addresses:202.106.168.103, 202.106.168.104, 202.106.168.109, 202.106.168.121202.108.36.153, 202.108.36.155, 202.108.36.156, 202.108.36.167,202.108.36.172 202.108.36.196

直接在www.163.com 這個域名上做了dns負載均衡。這樣的話就要求伺服器必須放的非常靠近主節點,才能保證各地的用戶訪問的速度。

但163不同的頻道是放在不同的緩存集群上的,這與sina,sohu有些不同,等於sina,sohu是按照地區劃分伺服器集群,而網易按照頻道劃分伺服器集群。

> 163.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: 163.com

Addresses: 202.108.36.205, 202.108.36.206, 202.108.36.207, 202.108.36.201 202.108.36.202, 202.108.36.203, 202.108.36.204

顯然,這和www.163.com不是一個集群,我們再來試一個:

> sports.163.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: channel.cache.163.com

Addresses: 202.108.36.136, 202.108.36.208, 202.108.36.209, 202.108.36.210 202.108.36.211, 202.108.36.212, 202.108.36.213

Aliases: sports.163.com

可以看出,和上面的集群也是不同的。

4、 百度

百度的前台伺服器就不是很多了:

> www.baidu.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: www.baidu.com

Addresses: 202.108.250.249, 202.108.249.134



> baidu.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: baidu.com

Address: 202.108.250.228



> mp3.baidu.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: mp3.baidu.com

Address: 202.108.249.131

只有www.baidu.com做了兩台伺服器的集群,頻道都用了一台伺服器做前台



5、 一搜

> yisou.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: yisou.com

Addresses:202.165.102.114, 202.43.217.14, 202.43.217.15, 202.43.217.16202.43.217.17, 202.165.102.111, 202.165.102.112, 202.165.102.113



> www.yisou.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: www.yisou.com

Addresses:202.43.217.17, 202.165.102.111, 202.165.102.112, 202.165.102.113202.165.102.114, 202.43.217.14, 202.43.217.15, 202.43.217.16



> mp3.yisou.com

Server: UnKnown

Address: 192.168.1.254



Non-authoritative answer:

Name: www.yisou.com

Addresses:202.165.102.113, 202.165.102.114, 202.43.217.14, 202.43.217.15202.43.217.16, 202.43.217.17, 202.165.102.111, 22.165.102.112

Aliases: mp3.yisou.com

前台做了8台伺服器的緩存集群,www.yisou.com和 yisou.com以及mp3.yisou.com是用的同一個集群。



通過前面的分析我們可以得到一個結論:sina和sohu使用了CDN與GSBL與dns負載均衡技術,每個地區一組前台伺服器群,網易,百度使用了dns負載均衡技術,每個頻道一組前台伺服器,一搜使用了dns負載技術,所有頻道共用一組前台伺服器集群。


CDN的效果
       廣州訪問一搜:
               Tracing route to www.yisou.com over a maximum of 30 hops:   
        1     6 ms     6 ms     6 ms  此處隱去
        2    <1 ms    <1 ms    <1 ms  61.177.103.49   
        3    <1 ms    <1 ms    <1 ms  61.177.103.181   
        4    <1 ms    <1 ms    <1 ms  61.177.101.133   
        5    <1 ms    <1 ms    <1 ms  61.177.101.17   
        6     3 ms     3 ms     3 ms  202.97.27.153   
        7     3 ms     3 ms     3 ms  202.97.27.22   
        8     3 ms     3 ms     3 ms  202.97.27.33    
        9    10 ms    10 ms    10 ms  202.97.39.109  
        10    34 ms    34 ms    33 ms  202.97.34.45  
        11   126 ms   127 ms   126 ms  202.97.57.214  
        12   307 ms   310 ms   310 ms  219.142.8.230  
        13   132 ms   132 ms   132 ms  po2.bas1.cnb.yahoo.com   
        14   166 ms   165 ms   165 ms  m29.search.cnb.yahoo.com   
        Trace complete.
              廣州訪問網易:
              Tracing route to www.163.com over a maximum of 30 hops:   
       1     6 ms     5 ms     5 ms  此處隱去
       2    <1 ms    <1 ms    <1 ms  61.177.103.49   
       3    <1 ms    <1 ms    <1 ms  61.177.103.181   
       4    <1 ms    <1 ms    <1 ms  61.177.101.133   
       5    <1 ms    <1 ms    <1 ms  61.177.101.17   
       6     3 ms     3 ms     3 ms  202.97.27.153   
       7     3 ms     3 ms     3 ms  202.97.41.226   
       8   106 ms   106 ms   106 ms  202.97.35.73   
       9   106 ms   106 ms   106 ms  202.97.36.38  
       10   266 ms   267 ms   265 ms  219.158.28.117  
       11   240 ms   240 ms   240 ms  202.96.12.42  
       12   239 ms   241 ms   240 ms  202.106.192.174   
       13   241 ms   240 ms   240 ms  210.74.176.150  
       14   240 ms   240 ms   241 ms  202.108.36.196  
       Trace complete.
              廣州訪問新浪:
              Tracing route to taurus.sina.com.cn over a maximum of 30 hops:   
       1     6 ms     5 ms     5 ms  此處隱去 
       2    <1 ms    <1 ms    <1 ms  61.177.103.49   
       3    <1 ms    <1 ms    <1 ms  61.177.103.181   
       4    <1 ms    <1 ms    <1 ms  61.177.102.5   
       5    <1 ms    <1 ms    <1 ms  61.177.101.5   
       6    <1 ms    <1 ms    <1 ms  202.97.27.117   
       7     8 ms     8 ms     8 ms  202.97.39.9   
       8     8 ms     8 ms     8 ms  202.109.0.141   
       9     8 ms    15 ms     9 ms  202.109.0.38  
       10    16 ms    15 ms    21 ms  202.109.0.174  
       11     9 ms     9 ms     9 ms  202.96.208.218  
       12    23 ms    22 ms    21 ms  61.172.201.222  
       Trace complete.
              可以看出,做了CDN按地域劃分緩存集群的新浪訪問速度明顯要比按頻道劃分緩存集群的網易和yisou要快的多,但CDN的成本也是非常高的。


http://bbs.linuxtone.org/thread-87-1-1.html
《解決方案》

回復 #1 7717060 的帖子

謝謝lz的分享;
據我所知,目前大家的方法無外乎兩種形式,第一種是自已分地域建IDC,採用智能DNS進行用戶分流;第二種就是購買CDN服務,第一種比較靈活、擴展性好,但成本高;有些公司將這兩種形式結合。
《解決方案》

明白了點 !!
《解決方案》

這篇文章基本沒啥參考價值,沒幾個說對的,完全在誤導
《解決方案》

:mrgreen: 原帖由 南非蜘蛛 於 2008-10-19 09:27 發表 http://bbs3.chinaunix.net/images/common/back.gif
這篇文章基本沒啥參考價值,沒幾個說對的,完全在誤導


老大肯定知道sian sohu的不少機密 能給大家也說說嗎 :mrgreen: :mrgreen: :mrgreen:
《解決方案》

好帖啊
《解決方案》

這篇文章就是作者憑自己的主觀臆斷在猜測,可惜猜測的結果與實際情況相差巨大,沒有任何參考價值。
《解決方案》

原帖由 rewinx 於 2008-11-20 18:07 發表 http://bbs3.chinaunix.net/images/common/back.gif
這篇文章就是作者憑自己的主觀臆斷在猜測,可惜猜測的結果與實際情況相差巨大,沒有任何參考價值。
我轉的這是!:mrgreen:
《解決方案》

一句話:有錢才是萬能的:mrgreen:
《解決方案》

為什麼大牛們不說說呢....

[火星人 ] 【轉】sina,sohu等門戶級網站架構設計(ZT)已經有935次圍觀

http://coctec.com/docs/service/show-post-2762.html