Sign in to follow this  
zgintasz

Does server's location affect players' ping?

Recommended Posts

Hi guys,

 

some players of my real-time multiplayer game are complaining of a high ping(they get kicked for it). Server is currently in Europe. E.g. for one player in Korea, it is too high, even though he says he is on WiFi.

Should I put a server on each continent? Would it fix their ping and how big would a different be?

Share this post


Link to post
Share on other sites

Sure, since the ping is the time for a round-trip between server and client :)

Over these distances the physical distance (speed of light in fibers) actually matters. Also with a bigger geographically distance you also very likely have more routers in between your server and the client where each router may add a tiny bit of latency due to packet processing.

 

For the best experience of your players having a server closer to them will matter. But as always that depends on your budget etc. 

Share this post


Link to post
Share on other sites

How big is that tiny bit of latency? Currently it is > 100 for some(e.g. that korean had ~200), so some of them cannot play. I want it at least < 60.

Edited by Gintas Z.

Share this post


Link to post
Share on other sites

According to Wikipedia:

"From this information, a simple rule of thumb is that a signal using optical fiber for communication will travel at around 200,000 kilometers per second."

Looking at google the distance from UK to South Korea and back is around 17700 kilometers. But I guess that the fibers won't be laid in a perfect line from the UK to there so let's assume 20000km for a rough estimate.

This would say that you have at least 1/10th of a second latency (100ms) due to speed of light in fibers and that's just true if you have really only 20000k of fiber between your server and your player. So getting to <60ms from Europe to South Korea is basically not possible due to the physics involved.

And then routing can still bite you. A test trace from my location (Germany) to korea.net reveals that I'm being routed via San Jose which means that at the San Jose hop I'm already at 350ms latency.

 

This serverfault post talks about US connections but still contains interesting numbers:

http://serverfault.com/questions/137348/how-much-network-latency-is-typical-for-east-west-coast-usa

Share this post


Link to post
Share on other sites

How big is that tiny bit of latency? Currently it is > 100 for some(e.g. that korean had ~200), so some of them cannot play. I want it at least < 60.


the speed of light is roughly 300.000 km/s , the distance between germany and south korea is 8570km which means light would need ~56ms to travel back and forth between client and server if it could do so in a straight line without interruptions (i.e, if the earth was flat and you used lasers instead of cables)

Share this post


Link to post
Share on other sites

the speed of light is roughly 300.000 km/s


The speed of electricity in copper is actually more like 150,000 km/s.
(Plus the latency of routers, which is often not insignificant.)

A lot of current backbone infrastructure does in fact use lasers, because it uses fiber optics.
The speed of lasers in fiber optics is more like 200,000 km/s.

This concludes our approximate-trivia-Friday event :-)

Share this post


Link to post
Share on other sites
To answer the original question:

Yes, if you're hosting a highly latency-sensitive game worldwide, you should prepare for at least five server zones. In typical order of introduction for a US-based product:
- North America. (Pros put one one each coast)
- Europe
- East Asia
- Australia
- South America

If you're based somewhere else, you'll typically use the same list, except put your own home zone at the top of the list :-)

For example, Brazil is a highly-online market, that currently doesn't monetize very well, but a "hit" in that country can be very profitable.
Their data center infrastructure is not as mature, though. You might want to look to places like Uruguay or Argentina, if you decide to do something for that continent.

East Asia could be many countries such as South Korea, Japan, Philippines, could even India -- depending on your specific requirements and market contacts.
Don't attempt to go into China unless you have a native partner that you trust, and that preferably is connected in the government half of the country.

Share this post


Link to post
Share on other sites

As an Australian, I get approx 50ms to the local backbone, 100ms to New Zealand, 150ms to South East Asia, 200ms to west coast USA, 250ms to east coast USA, 300ms to Europe and 400ms to Russia. There's also been issues in the past where customers on certain ISPs would get 400ms to South East Asia, as their traffic was being routed via California to save money...

 

So yeah, local servers are important... unless your game can cope with 500ms pings (I'm guessing that should be enough to cover almost any broadband user anywhere in the world).

Share this post


Link to post
Share on other sites
Satellite "broadband" is still in use in some parts of the US, with 1600 ms downstream ping, and 56kbps modem upstream and a few hundred ms ping (depending on packet size.)
It is becoming less common, but the US is a large country and some areas are quite sparsely populated. Satellite internet is better than no internet in those locations ... Edited by hplus0603

Share this post


Link to post
Share on other sites

I want it at least < 60.

 
That'd be a hard standard to set your customers to. Your game should, as much as possible, try to account for and accommodate higher ping times. Ping time doesn't limit the amount of packets you can send a second. For example, even if you have a 100 ms ping, you can still send 20 packets a second - they just arrive 100 ms after sending each one. You don't need to wait for a response to a packet before sending the next one.
 
The 200 pingtime is pushing it, but you should try to support 120 ms in your server's code if you can, in addition to considering more server locations (if that makes sense economically with the number of players in that region).
 
Since I live in rural Missouri, my ping time to servers even in the USA, it stupidly high. I get 250 ping times (roundtrip, I hope) when trying to connect to some game servers located on the west coast.
 
Pinging www.google.com (who has servers everywhere) gives me an average 128 ms round trip (i.e. 64 ms one-way), with a high of 170 ms tossed in.
A second ping gives better results (112ms round trip, with a high of 115 ms).
 
Also, how are you measuring the ping-time? Your server clock and their computer clock might be significantly off, giving you bad measurements if you assume they are in-sync.
 

Satellite "broadband" is still in use in some parts of the US, with 1600 ms downstream ping, and 56kbps modem upstream and a few hundred ms ping (depending on packet size.)
It is becoming less common, but the US is a large country and some areas are quite sparsely populated. Satellite internet is better than no internet in those locations ...


I was scared of that when I moved to the country (actually shopped around the 56kpbs satalite services looking for best prices), but luckily I'm just barely within range of getting line-of-sight radio-waves beamed to me from the watertower in-town, so I get 3mbps up and down. The line-of-sight was two feet above the tree tops. Any lower, and I'd be suffering a fate similar to the international space station.

If they grow much higher, I'll probably have to take a chainsaw to some tree-tops.  :lol:

Edited by Servant of the Lord

Share this post


Link to post
Share on other sites

I've got family in California, in the Santa Cruz mountains just outside silicon valley to the south of San Jose/Campbell. For that location satellite internet is the only option available to them. 

 

Beautiful area, very close to big cities but feels like small-town life. Terrible internet service.

Share this post


Link to post
Share on other sites

I live in Seoul, Korea and totally love the availability of high speed internet here. The government subsidized its development starting in the late 90s and it has really paid off. Gigabit internet nearly everywhere these days. If you play any local online game, your ping times are as low as they can go. Download massive files from anywhere in the world in a blink. But play online games on European servers and you've got some serious latency. I play Elder Scrolls Online fairly frequently. With their North American server I get between 180 - 220 ms pings. With their European server it's consistently 300+. If you want to keep global players at 60ms pings, establishing regional servers is the only option.

Share this post


Link to post
Share on other sites

But play online games on European servers and you've got some serious latency. I play Elder Scrolls Online fairly frequently. With their North American server I get between 180 - 220 ms pings. With their European server it's consistently 300+. If you want to keep global players at 60ms pings, establishing regional servers is the only option.

That is unluckily unavoidable. The above considerations about the speed of light and distance are right in theory, but in practicw they can only serve as a lower bound (that is, what is theoretically possiböe according to physics).

Reality looks somewhat different insofar as you have two major land lines which go east approximarely in a kinda straight way, but they go through the KGB first. And then you have the southern route with 3 (or 4, depending on whether or not someone sabotages them this week) submarine cables through the gulf of Oman and then via India... which is wayyyyyyyyy longer, nowhere near a straight line. So obviously, oberall latency isn't great, and the route is somewhat perma-congested, so peak latencies can really stink.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this