High Ping

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

High Ping

etcd
2020-10-09 03:36:03

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

stanchion
2020-10-10 07:20:54

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

etcd
2020-10-12 09:57:42

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?

ramonmelo
2020-10-13 11:47:14

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

Back to top