Search Unity

UNet Relay Server - Teribble Latency

Discussion in 'UNet' started by Skeledurr, Feb 21, 2017.

  1. Skeledurr

    Skeledurr

    Joined:
    Jan 5, 2015
    Posts:
    23
    I am very concerned with the latency of the relay servers. Connecting to a game in the same country via the relay server is giving me 390ms average. I am also attempting to connect with direct connection / Nat punch through. When connected directly the latency is great, but when direct connection fails users may as well not bother playing if the relay servers are going to be this slow.

    I have read other threads of people discussing this issue from different continents. Is this something that will be improved? Is it acknowledged by Unity? It seems to be totally pointless using the relay servers if you're not doing a turn based game.

    I am looking at Photon Thunder for an alternative but I haven't been able to test their speeds yet. If anyone can comment on the comparison of speeds between the two it would be appreciated!
     
  2. White8eard

    White8eard

    Joined:
    Aug 4, 2014
    Posts:
    61
    hey der, i am also experiencing huge lagg since pass few days, my game was working good before that , now its just very laggy and and client side delay is very huge
     
  3. donnysobonny

    donnysobonny

    Joined:
    Jan 24, 2013
    Posts:
    220
    I too have suffered the same issues as you with the latency of unity's relay servers. You'll likely find more limitations as you play around with them. I came to the conclusion pretty early on that unity's relay servers really wont work well for anything more than a basic indie game, or as a testing environment.

    I ended up ditching the use of unity's own relay servers entirely, and opted for setting up my own infrastructure in a cloud service. I use google cloud, and it's fairly simple to set up each server so that they can communicate with each other internally over the network (ultimately making them usable as relay servers). I also built a simple framework ontop of unet's llapi (although I had to use some of the hlapi elements to make websockets work) that implements some basic server-to-server concepts to be able to deal with the relay server concept efficiently. I don't really use this feature all that much (I haven't built anything yet that requires it), but that's how I would recommend doing it yourself.

    As for photon, I have a fair bit of experience in using their photon server SDKs, as I used to use a simple framework that I built on top of that. I prefer now the integrated-ness of unet, as it allows me to run an authoritative server as a unity application. I've not used photon thunder but it does look interesting. I would say that performance and support for photon products is far better than unet, but I find it hard to justify the pricing... but for someone that is looking for a solution that simply works out-of-the-box, photon products will always perform/support better than unet.
     
    Skeledurr likes this.
  4. Skeledurr

    Skeledurr

    Joined:
    Jan 5, 2015
    Posts:
    23
    Thanks for the reply @donnysobonny

    I ended up investigating Photon Thunder and found it to be amazing in comparison to Unity's relay servers.

    I'm based in Sydney, Australia. These are the results I got:

    Unity - 390ms Singapore server (closest server)

    Photon Thunder - 50ms Melbourne server (closest server)

    Photon Thunder - 200ms Singapore server
    Photon Thunder - 275ms Chennai server
    Photon Thunder - 300ms Tokyo server
    Photon Thunder - 360ms South Korea server
    Photon Thunder - 420ms US West server


    It's a bit of a no-brainer, I know Photon Thunder is still in early access but it's definitely worth waiting for.
     
    Anisoropos likes this.
  5. White8eard

    White8eard

    Joined:
    Aug 4, 2014
    Posts:
    61
    aww thanks for sharing the info, its actually a good upgrade in terms of service
     
  6. donnysobonny

    donnysobonny

    Joined:
    Jan 24, 2013
    Posts:
    220
    I figured that might be the case! Ultimately, you get what you pay for, and unet is essentially free.

    I'm glad to see that you were able to find a solution though. Good luck with your game!
     
  7. corei5unity

    corei5unity

    Joined:
    Mar 27, 2014
    Posts:
    15
    Hi how did you host your game on photon thunder i am thinking on doing so but i have experience in pun but i am looking for thunder.

    @Skeledurr unet is based on standalone server so can we write our server and just host it on photon thunder cloud or it will work like pun no server stuff only api.