Advertisement

Does server's location affect players' ping?

Started by April 29, 2016 03:58 PM
10 comments, last by Aldacron 8 years, 6 months ago

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?

Game I'm making - GANGFORT, Google Play, iTunes

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.

Advertisement

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.

Game I'm making - GANGFORT, Google Play, iTunes

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

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)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

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 :-)
enum Bool { True, False, FileNotFound };
Advertisement
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.
enum Bool { True, False, FileNotFound };

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).

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 ...
enum Bool { True, False, FileNotFound };

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:

This topic is closed to new replies.

Advertisement