High Ping

my game always have high ping for some reason, even when changing the network i still receive a quite high ping 140-200, while my friend who were developing another game but used the same network as me had 10-20 ping, i checked the log for region checking and i connected it to asia which had 20-80ish ping, so doesnt that mean i should have ping around that?

Comments

  • When a client connects to a session, the first factor is where the server running the session is being hosted. If not using a best region filter then this could be anywhere. The second factor arises if your connection gets relayed, in which case your connection will have to go to that relay region and then back to the server host which can be significant in a worse case scenario. Ideally you connect directly to a low latency host and get a ~20 ping.

    https://doc.photonengine.com/en-US/bolt/current/connection-and-authentication/server-client-model

    https://doc.photonengine.com/en-us/bolt/current/connection-and-authentication/bolt-connection-process
  • hello stanchion, thanks for the reply but i finally found out that the reason i keep getting high ping is mostly because i get relayed to the photon cloud instead of direct connection.

    The NAT punchthrough keep failing if my server and my client have different network connection, but if they are in the same network connection the punch through will work, so does that mean punch through only work if server and client is in the same network connection?

    And i still have a 100ish ping when using relay connection, even though my region was selected to asia, and the log said that the connection to asia is ~20 ping, does the relay region have different ping with the ping we got from creating session?
  • Hello @etcd ,
    The NAT punchthrough keep failing if my server and my client have different network connection, but if they are in the same network connection the punch through will work, so does that mean punch through only work if server and client is in the same network connection?

    No, that only means that the network you are using is blocking the traffic between the peers. There is no way to guarantee the direct connection in all cases, as there are several aspects of the network you are using that may make it impossible to communicate, and that is also the reason we have the fallback to a relayed connect, so you always can play.
    In this article (link) you will find a description of how the NAT Punch works, and it's main points of failure.
    And i still have a 100ish ping when using relay connection, even though my region was selected to asia, and the log said that the connection to asia is ~20 ping, does the relay region have different ping with the ping we got from creating session?

    When using a relayed connection, you are connected to your game server through the Photon Cloud, so, the network ping you see is related to the connection that is retransmitted.
    If you have around ~20 ping with the Cloud, but your Server, for example, also have ~20 ping, you need to count 4 steps:

    1. Client -> Photon Cloud
    2. Photon Cloud -> Server
    3. Server -> Photon Cloud
    4. Photon Cloud -> Client (the same original client or other clients, would be similar)

    ---

    Also, if you are using the exact same network configuration on the client and server, so you should have a similar connection success as the other case you've mentioned. If that is not true, it should be something other than the network influencing the connectivity.

    Check what is the behavior using one of our samples, like the Getting Started Sample, and check if behaves the same.

    --
    Ramon Melo
    Photon Bolt Team