开发者

Redirect users to nearest and fastest web server using Javascript and AJAX?

开发者 https://www.devze.com 2023-01-08 20:23 出处:网络
How can I redirect users to the mirror-site that is nearest and fastest for them using Javascript and possible AJAX?

How can I redirect users to the mirror-site that is nearest and fastest for them using Javascript and possible AJAX?

Is there a way using Javascript to make a HTTP request to each of the servers (mirror sites), then redirect to the one which is closest and/or fastest for the end-user? I would prefer using Javascript to perform the redirect, rather than for example geo-aware DNS redirects.

I have several HTTP severs for a online web game freeciv.net distributed around the world hosted on Amazon EC2, and would like to 开发者_运维百科redirect end-users to the server which will be fastest for them.


Unless you have a separate log on server, a person has already connected to one of your game servers. Redirecting him or her to another game server will just extend the time it takes to connect, and detract from the user experience.

What most multi-server games do is present a list of game servers, and let the person choose. Letting the person choose almost always enhances the user experience.

0

精彩评论

暂无评论...
验证码 换一张
取 消