Hi Everyone,
I’d like to clear up some of the misconceptions I see here and provide insight into our planning with respect to internet play.
First off there’s a misconception that Relay facilitated internet play is inherently slow. The best response i have for “is NAT faster than Relay server routed packets” is maybe. I’ll try to explain.
Internet routing is a strange and contentious beast, and it’s unfortunately not safe to assume a more local geography will have a more direct connection. Here’s a wiki page explaining the most common issue with this assumption: Tier 2 network - Wikipedia
The catch is surprisingly major networks are tier 2, like Comcast for instance. So if you’re in Boston and you’re communicating with someone else in Boston that’s not on your LAN (and particularly not on your same ISP) it’s actually quite possible your packets will be routed out of your locality to then come back to your friend that’s in the same city. For instance on Comcast i personally see a lot of traffic to local Boston destinations routed though New York City.
All this really means is you cant design a system assuming NAT punch through is faster, you’d really have to test both routes and go with the optimal one. The catch is even if both routes are available NAT is not always the quickest choice.
You can think of this less like having a long internet route though Relay and a short one though NAT; what you really have is two different routes through two different sets of networks and either one could be more desirable performance wise. Additionally because of things like retransmits and the quality of networks between you and your destination one route may be preferable despite having more hops or higher average latency.
For us that means other factors like stability also became really important in our initial technology decision to solve routing packets between multiple clients behind NATs. The reliability of a relay service will be near 100%; the reliability of a NAT solution will be a lot less than that given all the different implementations of punch throughs possible with various routers and at the end of the day many real world routers wont have a way to do NAT punch through.
We’ve seen numbers in the range of 30%-70% of NAT punch throughs work. That means if it’s the only tech your game is based on, between 30%-70% of all internet games will fail and most players wont understand why.
Also, we do have several datacenter locations world wide we’re going live in to try to optimize locality as best we can. Currently we have datacenters in the US, Europe, Singapore, with China announced as a future location. The fact is geography is important, but it’s just a bit more complicated using that as a predictor of the best routing choices.
At the end of the day we had to decide on the right tech to target for the first version of Unity Multiplayer, and the most stable and error free approach is Relay server.
Additionally we do support local discovery directly. This allows you to send broadcast packets on your LAN to have your game auto discovered. This doesn’t use Relay or Matchmaker.
Lastly, we are continuing to develop this technology. Going forward we’re adding features. I don’t have anything specific to announce now but everything is on the table, it’s a question of development time and priority. Our goal is to provide you with the tools you need to make a successful multiplayer game, and do it in a way that allows you to focus on what’s important: Creating the game itself.
TL;DR: NAT is a great option for internet play, but it can be unreliable. It works best as a fallback to something like Relay server, however to make that work we needed to make a Relay server first.
I hope this helps clear up some of our intentions with respect to the Unity Multiplayer service.