阿里巴巴为全球领先的B2B电子商务公司,连续七年被美国权威财经杂志《福布斯》评为全球最佳B2B网站。在国内的互联网公司中,按市值来比较腾讯第一,腾讯位列全球互联网公司市值第三位,第一是Google,第二是Amazon,第三是腾讯,腾讯市值约300亿美元,已经将ebay、雅虎等互联网公司甩在身后,阿里巴巴集团现在只是一家B2B公司上市了,未来淘宝上市只是迟早的问题,而且淘宝也是相当的有前途,前途不可限量,还有支付宝将来估计也会上市,因此阿里巴巴集团各个公司的总市值将来有可能会超过腾讯,不过腾讯也是相当牛的,不可小视,腾讯同时在IM、搜索引擎(搜搜)、电子商务(C2C拍拍网+B2C也就是QQ会员官方店+QQ返利+财付通)、门户、网游、移动互联网、互联网增值服务等等各方面全面发力,我本人比较喜欢腾讯的产品,QQ客户端、QQ邮箱、QQ空间、QQ校友、QQLive直播、TT浏览器、超级旋风、QQ影音(我觉得QQ影音是我使用过的最好的影音播放器)、搜搜音乐等等等都是我经常使用的产品,可惜我不喜欢玩游戏,不然QQ游戏平台及腾讯公司开发的游戏也许会是我的选择,我觉得玩游戏比较浪费时间,也确实不太愿意玩,还是把有限的时间放到学习上来吧,活到老,学到老。
同时我也比较喜欢阿里巴巴公司,只不过由于在电子商务方面的需求很小,平时网购很少,因此使用阿里巴巴集团及其子公司的产品及服务很少,不过也一直在关注中,比如我从阿里巴巴集团及其子公司的各个博客(比如DBA博客、UED博客、QA Team博客、Architecture Team博客、BI团队博客、DW团队博客等等很多)中了解到很多关于阿里巴巴的情况,学习了很多技术及业务上面的知识,订阅了很多阿里巴巴及其子公司员工的博客(比如阿里巴巴的Sky.Jian、支付宝的冯大辉、淘宝的陈吉平,NinGoo,岳旭强,BlueDavy、支付宝的首席架构师程立、淘宝网的首席架构师王文彬等等等),可以说受益匪浅、收获颇丰,我心存感恩。同时在国际上可能Alibaba比腾讯公司名声更大更响亮更有影响力,马云可能有无数的粉丝,马云在国际上的影响力更大,他身上有太多值得大家学习的地方。
话题有点儿扯远了,本来这篇文章是说网站架构的,想到这些话题一下收不住,回到正题吧。
1.整体架构分析
下面是我访问阿里巴巴国际站首页时通过Firebug捕捉到的Response Headers及Request Headers,通过这些信息可以大致了解一下阿里巴巴国际站的架构。
Web服务器采用的是Apache,Apache安装了两个模块AliCookie及AliBeacon,从名称上面可以看出来,应该是阿里巴巴自己开发的模块;mod_jk主要用于Apache与后端应用服务器JBOSS/TOMCAT的整合,具体怎么配置,可以看http://hi.baidu.com/charlielogic/blog/item/97cd96f84b802908d8f9fd39.html及http://dev.csdn.net/article/49/49312.shtm,配置不是太难,这些配置在几年前我也曾经配置过。为什么不直接用JBOSS/TOMCAT,而要在它们前端加上Apache,众所周知,Apache处理静态页面的能力比较强,静态页面由Apache来处理,动态页面由Apache转发,例如jsp、servlet、.do等JAVA相关的程序则由后端的JBOSS/TOMCAT来处理,各司其职。
后端的应用服务器应该是JBOSS+TOMCAT,主要用来处理JAVA程序。
jboss只是一个ejb容器,而tomcat, jetty是servlet容器,整合才能实现j2ee常见的规范。jboss3.0有段时间提供包含了jetty的整合包,现在的整合包包含的是tomcat。参考JBoss一定要和Tomcat整合在一起使用才能达到J2EE服务器的功能吗?Via
页面的字符串采用的是UTF-8,用UTF-8比较好,能正确显示多种语言文字。
参考为什么要用UTF-8编码。
页面采用了gzip压缩输出,这样可以节约带宽,提高数据传输效率。
同时有几个以ali开头的cookie(ali_apache_sid,ali_apache_track,ali_apache_tracktmp),猜测名称记录的是apache的有关信息,某个用户第一次访问www.alibaba.com时,服务器端给用户分配某台apache,下次此用户再次访问时,如果cookie没有失效,则仍然访问此台服务器。
Response Headers
Date Sat, 24 Oct 2009 16:08:42 GMT
Server Apache/2.0.59 (Unix) mod_AliCookie(for apache2.x)/1.1 aliBeacon/1.0 mod_jk/1.2.25
Set-Cookie ali_apache_sid=127.0.0.1.32466000522580.5|1256402322; path=/; domain=.alibaba.com JSESSIONID=52C881C7D7D831857540532B5AC9E98E; Path=/ intl_acs_temp=tsb4GnfJa897QpEff3JvNYQm81LiF5Qvvd9b1aS4CdiN+CKa5/vHNWXk/LrWGXryJFZ/4DD+dVg=; Domain=.alibaba.com; Path=/ ali_apache_track=; Domain=alibaba.com; Expires=Tue, 25-Dec-2012 01:55:21 GMT; Path=/ ali_apache_tracktmp=; Domain=alibaba.com; Path=/
X-Powered-By Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5
Content-Language en-US
Vary Accept-Encoding,User-Agent
Content-Encoding gzip
Content-Type text/html;charset=UTF-8
Transfer-Encoding chunked
Request Headers
Host www.alibaba.com
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729)
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language zh-cn,zh;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset gb2312,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Cookie ali_apache_id=58.68.138.247.47745956751223.4; ali_beacon_id=58.68.138.249.1251956759436.2; BX=139vjbd59um0t&b=3&s=34; alicnwb=firstv%3D1%7C; lstat_bc_1281914=16589239702204005369; lstat_bc_1236271=18336268771553501507; intl_acs_forever=LQ3GfOKFwW52fCHEAyAjxam7wn4/Dg+GpRYLunboeGmDtZaSVsRZ0eWY8DKq+6q7QVs09GwE8vuB4DLl2Nl/POLyzY84vUnu; ali_apache_track=
阿里巴巴和淘宝都是用了一套公司内部框架,名为webx,IOC容器用了spring
web层用了velocity,web层不依赖与业务层,通过一种command模式进行解耦,支持远程调用
dal层采用ibatis进行了dao和sql代码的分离,这里并未采用当前比较流行的hibernate
biz层采用了一种service的模式,比如EmailService,VelocityService,DSAService等等,可以自由的插拔与组装。
阿里旺旺是用C写的一套,在JAVA上同样可以配置一个Service进行通讯
Via
2.阿里巴巴网站的域名服务器
一共有4台域名服务器,域名服务器用的域名是alibabaonline.com
C:/Users/caihuafeng>nslookup -qt=ns alibaba.com
服务器: ns.crcbj.com
Address: 61.233.9.9
非权威应答:
alibaba.com nameserver = nshz.alibabaonline.com
alibaba.com nameserver = ns8.alibabaonline.com
alibaba.com nameserver = nsp.alibabaonline.com
alibaba.com nameserver = nsp2.alibabaonline.com
ns8.alibabaonline.com internet address = 60.190.232.99
nshz.alibabaonline.com internet address = 60.12.6.10
nsp.alibabaonline.com internet address = 128.242.107.229
nsp2.alibabaonline.com internet address = 128.242.107.228
3.阿里巴巴网站的邮件服务器
一共有3台邮件服务器
C:/Users/caihuafeng>nslookup -qt=mx alibaba.com
服务器: ns.crcbj.com
Address: 61.233.9.9
非权威应答:
alibaba.com MX preference = 10, mail exchanger = mx.alibaba.com
alibaba.com MX preference = 20, mail exchanger = mx1.alibaba.com
alibaba.com MX preference = 20, mail exchanger = mx2.alibaba.com
alibaba.com nameserver = ns8.alibabaonline.com
alibaba.com nameserver = nshz.alibabaonline.com
alibaba.com nameserver = nsp.alibabaonline.com
alibaba.com nameserver = nsp2.alibabaonline.com
nsp2.alibabaonline.com internet address = 128.242.107.228
nsp.alibabaonline.com internet address = 128.242.107.229
ns8.alibabaonline.com internet address = 60.190.232.99
nshz.alibabaonline.com internet address = 60.12.6.10
C:/Users/caihuafeng>ping mx.alibaba.com
正在 Ping mx.alibaba.com [119.38.209.106] 具有 32 字节的数据:
来自 119.38.209.106 的回复: 字节=32 时间=613ms TTL=235
来自 119.38.209.106 的回复: 字节=32 时间=404ms TTL=235
来自 119.38.209.106 的回复: 字节=32 时间=307ms TTL=235
来自 119.38.209.106 的回复: 字节=32 时间=630ms TTL=235
119.38.209.106 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 307ms,最长 = 630ms,平均 = 488ms
用nmap扫描mx.alibaba.com的结果如下,服务器打开了25端口,用于SMTP服务,确认是邮件服务器
Starting Nmap 5.00 ( http://nmap.org ) at 2009-10-25 01:15 中国标准时间
NSE: Loaded 30 scripts for scanning.
Initiating Ping Scan at 01:15
Scanning 119.38.209.106 [8 ports]
Completed Ping Scan at 01:15, 1.99s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 01:15
Completed Parallel DNS resolution of 1 host. at 01:15, 0.17s elapsed
Initiating SYN Stealth Scan at 01:15
Scanning mx.hk.alibaba.com (119.38.209.106) [1000 ports]
Discovered open port 25/tcp on 119.38.209.106
SYN Stealth Scan Timing: About 18.50% done; ETC: 01:18 (0:02:17 remaining)
Completed SYN Stealth Scan at 01:17, 77.72s elapsed (1000 total ports)
Initiating Service scan at 01:17
Scanning 1 service on mx.hk.alibaba.com (119.38.209.106)
Completed Service scan at 01:17, 1.36s elapsed (1 service on 1 host)
Initiating OS detection (try #1) against mx.hk.alibaba.com (119.38.209.106)
Retrying OS detection (try #2) against mx.hk.alibaba.com (119.38.209.106)
4.Alibaba中文站
我抓取了两次Alibaba中文站的http header,发现Cookie中的值ali_apache_id及ali_apache_sid前面ip地址部分是相同的,squid缓存服务器有变化,第一次是X-Cache: HIT from static2206,第二次是X-Cache: HIT from static2201,Apache的前端采用了squid,用squid来缓存静态页面几乎是互联网公司不二的选择。
C:/Windows/system32>curl -I china.alibaba.com
HTTP/1.1 200 OK
Date: Sun, 25 Oct 2009 07:13:08 GMT
Server: Apache/2.0.61 (Unix) aliBeacon/1.0
Last-Modified: Fri, 23 Oct 2009 08:57:39 GMT
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Length: 208128
Content-Type: text/html; charset=GB2312
X-Cache: HIT from static2206
Via: 1.0 static2206:3128 (squid/2.6.STABLE16)
Set-Cookie: ali_apache_id=222.35.170.205.06550454788056.7; path=/; domain=.alibaba.com; expires=Wed, 30-Nov-2084 01:01:01 GMT
Set-Cookie: ali_apache_sid=222.35.170.205.06550454788056.7|1256456588; path=/; domain=.alibaba.com
Content-Language: cn
C:/Windows/system32>curl -I china.alibaba.com
HTTP/1.1 200 OK
Date: Sun, 25 Oct 2009 07:15:12 GMT
Server: Apache/2.0.61 (Unix) aliBeacon/1.0
Last-Modified: Fri, 23 Oct 2009 08:57:36 GMT
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Length: 208129
Content-Type: text/html; charset=GB2312
X-Cache: HIT from static2201
Via: 1.0 static2201:3128 (squid/2.6.STABLE16)
Set-Cookie: ali_apache_id=222.35.170.205.63220054912431.1; path=/; domain=.alibaba.com; expires=Wed, 30-Nov-2084 01:01:01 GMT
Set-Cookie: ali_apache_sid=222.35.170.205.63220054912431.1|1256456712; path=/; domain=.alibaba.com
Content-Language: cn
5.跟踪域名www.alibaba.com的解析过程
同时我也比较喜欢阿里巴巴公司,只不过由于在电子商务方面的需求很小,平时网购很少,因此使用阿里巴巴集团及其子公司的产品及服务很少,不过也一直在关注中,比如我从阿里巴巴集团及其子公司的各个博客(比如DBA博客、UED博客、QA Team博客、Architecture Team博客、BI团队博客、DW团队博客等等很多)中了解到很多关于阿里巴巴的情况,学习了很多技术及业务上面的知识,订阅了很多阿里巴巴及其子公司员工的博客(比如阿里巴巴的Sky.Jian、支付宝的冯大辉、淘宝的陈吉平,NinGoo,岳旭强,BlueDavy、支付宝的首席架构师程立、淘宝网的首席架构师王文彬等等等),可以说受益匪浅、收获颇丰,我心存感恩。同时在国际上可能Alibaba比腾讯公司名声更大更响亮更有影响力,马云可能有无数的粉丝,马云在国际上的影响力更大,他身上有太多值得大家学习的地方。
话题有点儿扯远了,本来这篇文章是说网站架构的,想到这些话题一下收不住,回到正题吧。
1.整体架构分析
下面是我访问阿里巴巴国际站首页时通过Firebug捕捉到的Response Headers及Request Headers,通过这些信息可以大致了解一下阿里巴巴国际站的架构。
Web服务器采用的是Apache,Apache安装了两个模块AliCookie及AliBeacon,从名称上面可以看出来,应该是阿里巴巴自己开发的模块;mod_jk主要用于Apache与后端应用服务器JBOSS/TOMCAT的整合,具体怎么配置,可以看http://hi.baidu.com/charlielogic/blog/item/97cd96f84b802908d8f9fd39.html及http://dev.csdn.net/article/49/49312.shtm,配置不是太难,这些配置在几年前我也曾经配置过。为什么不直接用JBOSS/TOMCAT,而要在它们前端加上Apache,众所周知,Apache处理静态页面的能力比较强,静态页面由Apache来处理,动态页面由Apache转发,例如jsp、servlet、.do等JAVA相关的程序则由后端的JBOSS/TOMCAT来处理,各司其职。
后端的应用服务器应该是JBOSS+TOMCAT,主要用来处理JAVA程序。
jboss只是一个ejb容器,而tomcat, jetty是servlet容器,整合才能实现j2ee常见的规范。jboss3.0有段时间提供包含了jetty的整合包,现在的整合包包含的是tomcat。参考JBoss一定要和Tomcat整合在一起使用才能达到J2EE服务器的功能吗?Via
页面的字符串采用的是UTF-8,用UTF-8比较好,能正确显示多种语言文字。
参考为什么要用UTF-8编码。
页面采用了gzip压缩输出,这样可以节约带宽,提高数据传输效率。
同时有几个以ali开头的cookie(ali_apache_sid,ali_apache_track,ali_apache_tracktmp),猜测名称记录的是apache的有关信息,某个用户第一次访问www.alibaba.com时,服务器端给用户分配某台apache,下次此用户再次访问时,如果cookie没有失效,则仍然访问此台服务器。
Response Headers
Date Sat, 24 Oct 2009 16:08:42 GMT
Server Apache/2.0.59 (Unix) mod_AliCookie(for apache2.x)/1.1 aliBeacon/1.0 mod_jk/1.2.25
Set-Cookie ali_apache_sid=127.0.0.1.32466000522580.5|1256402322; path=/; domain=.alibaba.com JSESSIONID=52C881C7D7D831857540532B5AC9E98E; Path=/ intl_acs_temp=tsb4GnfJa897QpEff3JvNYQm81LiF5Qvvd9b1aS4CdiN+CKa5/vHNWXk/LrWGXryJFZ/4DD+dVg=; Domain=.alibaba.com; Path=/ ali_apache_track=; Domain=alibaba.com; Expires=Tue, 25-Dec-2012 01:55:21 GMT; Path=/ ali_apache_tracktmp=; Domain=alibaba.com; Path=/
X-Powered-By Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5
Content-Language en-US
Vary Accept-Encoding,User-Agent
Content-Encoding gzip
Content-Type text/html;charset=UTF-8
Transfer-Encoding chunked
Request Headers
Host www.alibaba.com
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729)
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language zh-cn,zh;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset gb2312,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Cookie ali_apache_id=58.68.138.247.47745956751223.4; ali_beacon_id=58.68.138.249.1251956759436.2; BX=139vjbd59um0t&b=3&s=34; alicnwb=firstv%3D1%7C; lstat_bc_1281914=16589239702204005369; lstat_bc_1236271=18336268771553501507; intl_acs_forever=LQ3GfOKFwW52fCHEAyAjxam7wn4/Dg+GpRYLunboeGmDtZaSVsRZ0eWY8DKq+6q7QVs09GwE8vuB4DLl2Nl/POLyzY84vUnu; ali_apache_track=
阿里巴巴和淘宝都是用了一套公司内部框架,名为webx,IOC容器用了spring
web层用了velocity,web层不依赖与业务层,通过一种command模式进行解耦,支持远程调用
dal层采用ibatis进行了dao和sql代码的分离,这里并未采用当前比较流行的hibernate
biz层采用了一种service的模式,比如EmailService,VelocityService,DSAService等等,可以自由的插拔与组装。
阿里旺旺是用C写的一套,在JAVA上同样可以配置一个Service进行通讯
Via
2.阿里巴巴网站的域名服务器
一共有4台域名服务器,域名服务器用的域名是alibabaonline.com
C:/Users/caihuafeng>nslookup -qt=ns alibaba.com
服务器: ns.crcbj.com
Address: 61.233.9.9
非权威应答:
alibaba.com nameserver = nshz.alibabaonline.com
alibaba.com nameserver = ns8.alibabaonline.com
alibaba.com nameserver = nsp.alibabaonline.com
alibaba.com nameserver = nsp2.alibabaonline.com
ns8.alibabaonline.com internet address = 60.190.232.99
nshz.alibabaonline.com internet address = 60.12.6.10
nsp.alibabaonline.com internet address = 128.242.107.229
nsp2.alibabaonline.com internet address = 128.242.107.228
3.阿里巴巴网站的邮件服务器
一共有3台邮件服务器
C:/Users/caihuafeng>nslookup -qt=mx alibaba.com
服务器: ns.crcbj.com
Address: 61.233.9.9
非权威应答:
alibaba.com MX preference = 10, mail exchanger = mx.alibaba.com
alibaba.com MX preference = 20, mail exchanger = mx1.alibaba.com
alibaba.com MX preference = 20, mail exchanger = mx2.alibaba.com
alibaba.com nameserver = ns8.alibabaonline.com
alibaba.com nameserver = nshz.alibabaonline.com
alibaba.com nameserver = nsp.alibabaonline.com
alibaba.com nameserver = nsp2.alibabaonline.com
nsp2.alibabaonline.com internet address = 128.242.107.228
nsp.alibabaonline.com internet address = 128.242.107.229
ns8.alibabaonline.com internet address = 60.190.232.99
nshz.alibabaonline.com internet address = 60.12.6.10
C:/Users/caihuafeng>ping mx.alibaba.com
正在 Ping mx.alibaba.com [119.38.209.106] 具有 32 字节的数据:
来自 119.38.209.106 的回复: 字节=32 时间=613ms TTL=235
来自 119.38.209.106 的回复: 字节=32 时间=404ms TTL=235
来自 119.38.209.106 的回复: 字节=32 时间=307ms TTL=235
来自 119.38.209.106 的回复: 字节=32 时间=630ms TTL=235
119.38.209.106 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 307ms,最长 = 630ms,平均 = 488ms
用nmap扫描mx.alibaba.com的结果如下,服务器打开了25端口,用于SMTP服务,确认是邮件服务器
Starting Nmap 5.00 ( http://nmap.org ) at 2009-10-25 01:15 中国标准时间
NSE: Loaded 30 scripts for scanning.
Initiating Ping Scan at 01:15
Scanning 119.38.209.106 [8 ports]
Completed Ping Scan at 01:15, 1.99s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 01:15
Completed Parallel DNS resolution of 1 host. at 01:15, 0.17s elapsed
Initiating SYN Stealth Scan at 01:15
Scanning mx.hk.alibaba.com (119.38.209.106) [1000 ports]
Discovered open port 25/tcp on 119.38.209.106
SYN Stealth Scan Timing: About 18.50% done; ETC: 01:18 (0:02:17 remaining)
Completed SYN Stealth Scan at 01:17, 77.72s elapsed (1000 total ports)
Initiating Service scan at 01:17
Scanning 1 service on mx.hk.alibaba.com (119.38.209.106)
Completed Service scan at 01:17, 1.36s elapsed (1 service on 1 host)
Initiating OS detection (try #1) against mx.hk.alibaba.com (119.38.209.106)
Retrying OS detection (try #2) against mx.hk.alibaba.com (119.38.209.106)
4.Alibaba中文站
我抓取了两次Alibaba中文站的http header,发现Cookie中的值ali_apache_id及ali_apache_sid前面ip地址部分是相同的,squid缓存服务器有变化,第一次是X-Cache: HIT from static2206,第二次是X-Cache: HIT from static2201,Apache的前端采用了squid,用squid来缓存静态页面几乎是互联网公司不二的选择。
C:/Windows/system32>curl -I china.alibaba.com
HTTP/1.1 200 OK
Date: Sun, 25 Oct 2009 07:13:08 GMT
Server: Apache/2.0.61 (Unix) aliBeacon/1.0
Last-Modified: Fri, 23 Oct 2009 08:57:39 GMT
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Length: 208128
Content-Type: text/html; charset=GB2312
X-Cache: HIT from static2206
Via: 1.0 static2206:3128 (squid/2.6.STABLE16)
Set-Cookie: ali_apache_id=222.35.170.205.06550454788056.7; path=/; domain=.alibaba.com; expires=Wed, 30-Nov-2084 01:01:01 GMT
Set-Cookie: ali_apache_sid=222.35.170.205.06550454788056.7|1256456588; path=/; domain=.alibaba.com
Content-Language: cn
C:/Windows/system32>curl -I china.alibaba.com
HTTP/1.1 200 OK
Date: Sun, 25 Oct 2009 07:15:12 GMT
Server: Apache/2.0.61 (Unix) aliBeacon/1.0
Last-Modified: Fri, 23 Oct 2009 08:57:36 GMT
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Length: 208129
Content-Type: text/html; charset=GB2312
X-Cache: HIT from static2201
Via: 1.0 static2201:3128 (squid/2.6.STABLE16)
Set-Cookie: ali_apache_id=222.35.170.205.63220054912431.1; path=/; domain=.alibaba.com; expires=Wed, 30-Nov-2084 01:01:01 GMT
Set-Cookie: ali_apache_sid=222.35.170.205.63220054912431.1|1256456712; path=/; domain=.alibaba.com
Content-Language: cn
5.跟踪域名www.alibaba.com的解析过程
从下面的结果可以看出,阿里巴巴的域名服务器是放在杭州电信的。
[root@CentOS_Test_Server ~]# dig www.alibaba.com +trace | nali
; <<>> DiG 9.3.4-P1 <<>> www.alibaba.com +trace
;; global options: printcmd
. 65107 IN NS L.ROOT-SERVERS.NET.
. 65107 IN NS I.ROOT-SERVERS.NET.
. 65107 IN NS K.ROOT-SERVERS.NET.
. 65107 IN NS F.ROOT-SERVERS.NET.
. 65107 IN NS D.ROOT-SERVERS.NET.
. 65107 IN NS G.ROOT-SERVERS.NET.
. 65107 IN NS E.ROOT-SERVERS.NET.
. 65107 IN NS B.ROOT-SERVERS.NET.
. 65107 IN NS J.ROOT-SERVERS.NET.
. 65107 IN NS C.ROOT-SERVERS.NET.
. 65107 IN NS A.ROOT-SERVERS.NET.
. 65107 IN NS H.ROOT-SERVERS.NET.
. 65107 IN NS M.ROOT-SERVERS.NET.
;; Received 432 bytes from 61.233.9.9[北京市 铁通]#53(61.233.9.9[北京市 铁通]) in 145 ms
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS e.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
com. 172800 IN NS m.gtld-servers.net.
;; Received 496 bytes from 199.7.83.42[美国/加拿大]#53(L.ROOT-SERVERS.NET) in 267 ms
alibaba.com. 172800 IN NS ns8.alibabaonline.com.
alibaba.com. 172800 IN NS nshz.alibabaonline.com.
alibaba.com. 172800 IN NS nsp.alibabaonline.com.
alibaba.com. 172800 IN NS nsp2.alibabaonline.com.
;; Received 185 bytes from 192.5.6.30[]#53(a.gtld-servers.net) in 340 ms
www.alibaba.com. 600 IN A 121.0.20.1[浙江省杭州市 阿里巴巴]
alibaba.com. 172800 IN NS nsp.alibabaonline.com.
alibaba.com. 172800 IN NS ns8.alibabaonline.com.
alibaba.com. 172800 IN NS nshz.alibabaonline.com.
alibaba.com. 172800 IN NS nsp2.alibabaonline.com.
;; Received 201 bytes from 60.190.232.99[浙江省杭州市 电信]#53(ns8.alibabaonline.com) in 113 ms
[root@CentOS_Test_Server ~]# dig www.alibaba.com +trace | nali
; <<>> DiG 9.3.4-P1 <<>> www.alibaba.com +trace
;; global options: printcmd
. 65107 IN NS L.ROOT-SERVERS.NET.
. 65107 IN NS I.ROOT-SERVERS.NET.
. 65107 IN NS K.ROOT-SERVERS.NET.
. 65107 IN NS F.ROOT-SERVERS.NET.
. 65107 IN NS D.ROOT-SERVERS.NET.
. 65107 IN NS G.ROOT-SERVERS.NET.
. 65107 IN NS E.ROOT-SERVERS.NET.
. 65107 IN NS B.ROOT-SERVERS.NET.
. 65107 IN NS J.ROOT-SERVERS.NET.
. 65107 IN NS C.ROOT-SERVERS.NET.
. 65107 IN NS A.ROOT-SERVERS.NET.
. 65107 IN NS H.ROOT-SERVERS.NET.
. 65107 IN NS M.ROOT-SERVERS.NET.
;; Received 432 bytes from 61.233.9.9[北京市 铁通]#53(61.233.9.9[北京市 铁通]) in 145 ms
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS e.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
com. 172800 IN NS m.gtld-servers.net.
;; Received 496 bytes from 199.7.83.42[美国/加拿大]#53(L.ROOT-SERVERS.NET) in 267 ms
alibaba.com. 172800 IN NS ns8.alibabaonline.com.
alibaba.com. 172800 IN NS nshz.alibabaonline.com.
alibaba.com. 172800 IN NS nsp.alibabaonline.com.
alibaba.com. 172800 IN NS nsp2.alibabaonline.com.
;; Received 185 bytes from 192.5.6.30[]#53(a.gtld-servers.net) in 340 ms
www.alibaba.com. 600 IN A 121.0.20.1[浙江省杭州市 阿里巴巴]
alibaba.com. 172800 IN NS nsp.alibabaonline.com.
alibaba.com. 172800 IN NS ns8.alibabaonline.com.
alibaba.com. 172800 IN NS nshz.alibabaonline.com.
alibaba.com. 172800 IN NS nsp2.alibabaonline.com.
;; Received 201 bytes from 60.190.232.99[浙江省杭州市 电信]#53(ns8.alibabaonline.com) in 113 ms