|
|
发表于 2007-5-30 19:14:00
|
显示全部楼层
Re: Re: 潘多拉的盒子---无缝服务器(1)
bigbook2000: Re: 潘多拉的盒子---无缝服务器(1)
大家认为服务器之间交换数据降低了性能,其实这是要看情况的,其主要的瓶颈不在于服务器的交换,而在于服务器与客户端的交换,举个例子,玩家往地上扔个东西,玩家扔东西从客户段传输到服务器需要0.3秒钟,然后从服务器传回客户段需要0.3秒钟,如果是单台服务器,服务器处理时间是0.1秒,总计是0.7 秒,如果是2个服务器,角色服务期和地图服务器是分开的,角色服务器处理是0.05秒,地图服务器处理也是0.05秒,服务器中间网络交换(1000M局域网)是0.1秒,数据同步是0.1秒,总计是0.9秒,大家可以看到分布式服务器对性能影响很有限,但每台服务器的处理能力却成倍增加(功能单一了,不仅仅是数量上的增加那么简单)
[k1l2y3m4匿名@localhost ~]# ping gameres.com
PING gameres.com (218.85.139.55) 56(84) bytes of data.
64 bytes from 218.85.139.55: icmp_seq=1 ttl=120 time=30.3 ms
64 bytes from 218.85.139.55: icmp_seq=2 ttl=120 time=29.3 ms
64 bytes from 218.85.139.55: icmp_seq=3 ttl=120 time=30.9 ms
64 bytes from 218.85.139.55: icmp_seq=4 ttl=120 time=29.1 ms
64 bytes from 218.85.139.55: icmp_seq=5 ttl=120 time=28.4 ms
64 bytes from 218.85.139.55: icmp_seq=6 ttl=120 time=28.7 ms
64 bytes from 218.85.139.55: icmp_seq=7 ttl=120 time=29.0 ms
64 bytes from 218.85.139.55: icmp_seq=8 ttl=120 time=28.2 ms
64 bytes from 218.85.139.55: icmp_seq=9 ttl=120 time=28.8 ms
64 bytes from 218.85.139.55: icmp_seq=10 ttl=120 time=31.9 ms
64 bytes from 218.85.139.55: icmp_seq=11 ttl=120 time=28.9 ms
64 bytes from 218.85.139.55: icmp_seq=12 ttl=120 time=28.7 ms
--- gameres.com ping statistics ---
12 packets transmitted, 12 received, 0% packet loss, time 11030ms
rtt min/avg/max/mdev = 28.253/29.394/31.948/1.083 ms
我ping gameres反应为0.03秒,请问为什么
“玩家扔东西从客户段传输到服务器需要0.3秒钟,然后从服务器传回客户段需要0.3秒钟” |
|