High Latency issues on Photon Cloud

MoonstormMoonstorm
edited September 2013 in Photon Unity Networking (PUN)
Hey guys!

I recently started experimenting with Photon Cloud using the PUN package on Unity3d's asset store. I have to say, this is the simplest, easiest way to get stuff started!

However, I went ahead and got up a really simple demo game going where you simply press a button and have a bullet shoot out. You can find the demo here if you wish to check it out:
https://dl.dropboxusercontent.com/u/344 ... onWeb.html

The issue I'm seeing is the ping time is ~100ms, connecting from San Francisco to the US server. I figured it might be a west coast thing -- so I had my friend in New York City try out the same game together. He was also seeing ping times as high as 120ms. In fact, with latency being that high, it's impossible to make a responsive "authoritative" game (by having a master client verify game states). Ping times from one client to another and then back again goes all the way to ~400ms!

I am deeply considering the potential of launching the game using PhotonCloud (at least until I can divert more resources to an on-premise solution), but I am deeply concerned by the latency I am already experiencing.

Why is the latency so high?

Comments

  • Any response from someone with some authority would be greatly appreciated.
  • Hi.

    Could you check, please, to which Cloud region you are connecting?
    The default region is app.exitgamescloud.com, which is matching app-eu.exitgamescloud.com.
    For clients inside the US app-us.exitgamescloud.com should give you better latencies.

    PS:
    100ms+100ms is 200ms, so how do you end up with 400ms?
  • Hi there--

    I'm connecting to the US server. As for your ping time question, if you use one of your clients as an authoritative client, then you have to do the following:

    Original Peer -- ~60ms --> "Dedicated server" -- ~60 ms -> Authoritative Client -- ~60ms --> "Dedicated Server" -- ~60 ms --> Original Peer = 240 ms. I was accidentally double counting on ping earlier. That being said however, the game client itself is measuring the time it takes for an auth RPC to be received using its own internal system timer and i'm seeing round trip times between 220ms to all the way up to 340ms with a 109 ms ping to the dedicated server.

    I was excited to use Photon due to the "low latecy, super fast" claim but these numbers are honestly way too high to making those bold claims.
  • Which values do you get from PhotonNetwork.GetPing()? Best, worst and average?
    This is what is really interesting as it's only network and server lag.

    Some of the lag might actually be internal lag. Means: in the machines, not by the network.
    PUN itself might add some delay, cause we only send messages out every 100ms, which would be +100ms for your measured lag in worst case. This could easily be changed though and it should only apply to RPCs (we call send after calling Serialize).
    We also have a slight delay in the server to aggregate some messages instead of sending everything in a separate package. This should only be a few ms.
Sign In or Register to comment.