Search Unity

Relay server performance, NAT punch through

Discussion in 'Multiplayer' started by shadiradio, Dec 16, 2016.

  1. shadiradio

    shadiradio

    Joined:
    Jun 22, 2013
    Posts:
    83
    I was just wondering if there are plans to improve the relay server performance, or if automatic NAT punch through will be available soon? From my tests measuring the round trip time (Los Angeles, two instances of the game running on the same computer/network, cable modem 60 down / 4 up), these are my results:
    • US (us1-mm.unet.unity3d.com): 200 ms
    • EU (eu1-mm.unet.unity3d.com) 330 ms
    • ASIA (ap1-mm.unet.unity3d.com) 390 ms
    The performance is really bad in my game, and I imagine in any real time game this is a bad user experience. For a synchronous, turn-based game, obviously that's fine. It wouldn't be a problem if this was a fallback, but this is the only way players can easily connect to each other using Unet, without NAT. I also can't imagine this is acceptable to Unity either, since any game using this that goes live would represent Unity poorly. Is anyone else experiencing this latency? Thanks!
     
  2. rbuffalo

    rbuffalo

    Joined:
    Feb 5, 2016
    Posts:
    18
    Relay servers inherently come with a lot of latency. If you want to host all of the servers for your game using UNET I would recommend looking into PlayFab. They allow you to upload your own server build and use their matchmaking API to allow players to connect to games without any worries about port forwarding/firewall issues.
     
  3. shadiradio

    shadiradio

    Joined:
    Jun 22, 2013
    Posts:
    83
    Thanks for the PlayFab recommendation @rbuffalo! It's beyond the scope of what I can do before launch, but I'll keep it in mind for future reference. :)