MyCloud & PhotonCloud
Options
Ilyas
✭
Hello!
Your PhotonEngine is awesome! In compare to UNet. Thank you very much! And big thanks for PhotonCloud! It works good, but I have problem with latency.
I live and work in Khabarovsk (Russia). Khabarovsk is near China. But PhotonCloud gives best region for me is EU (Amsterdam). So, ping is 170-180 ms. I develop snake-like online game, and this latency for me is not acceptable.
I deployed a server and installed PhotonServer. So, ping is 8-10 ms. This latency is ok!
But there are many (not so many :-( ) people play in USA and Europe. And I want that these people could use PhotonCloud (if the latency PhotonCloud would be better than MyCloud).
What is the best way to realize this algorithm?
P.S.: Sorry for my bad English!
Your PhotonEngine is awesome! In compare to UNet. Thank you very much! And big thanks for PhotonCloud! It works good, but I have problem with latency.
I live and work in Khabarovsk (Russia). Khabarovsk is near China. But PhotonCloud gives best region for me is EU (Amsterdam). So, ping is 170-180 ms. I develop snake-like online game, and this latency for me is not acceptable.
I deployed a server and installed PhotonServer. So, ping is 8-10 ms. This latency is ok!
But there are many (not so many :-( ) people play in USA and Europe. And I want that these people could use PhotonCloud (if the latency PhotonCloud would be better than MyCloud).
What is the best way to realize this algorithm?
P.S.: Sorry for my bad English!
0
Best Answers
-
Hi @Ilyas,
I see what you are trying to achieve: a hybrid solution that combines Photon Cloud and your self hosted server(s). It is interesting.
I think you can have the following connection flow:
1. Connect to Photon Cloud's name server
2. Call OpGetRegions
3. Ping each region from the result of 2 and ping your own self hosted Photon master servers
4. Choose best master server connection and connect to it (does not matter if it's Cloud or self hosted)
For 3. you need to hardcode the IPs (or FQDNs) if any of your self hosted servers and ping them separately. I don't know if you can integrate your servers directly in the Photon ping coroutine (make region tokens and add them to the enum and have one token per IP) I need to check this.
5 -
your solution is perfectly fine5
Answers
-
Hi, there
here is list of currently supported regions
https://doc.photonengine.com/en-us/voice/current/reference/regions
you may check ping for them and see what is best for you0 -
Hi!
Thanks, but this answer is not usefull for me. I know about supported regions.
I use PhotonNetwork.ConnectUsingSettings (gameVersion); (PhotonServerSettings.Hosting = BestRegion). So, I get region with best ping. But this ping is too big.
My solution is:
1) Client pings my servers and stores results.
2) Client connects to Photon Master Server.
3) When OnConnectedToMaster be invoked, Client pings by PhotonNetwork.GetPing ().
4) Client compares ping result with stored results and then makes a decision:
5.a) Client joins or creates room at Photon Game Server.
5.b) Client leaves Photon Cloud and connects to MyCloud.
I'm not sure that this solution is the best. I will be grateful for any help.0 -
Hi @Ilyas,
I see what you are trying to achieve: a hybrid solution that combines Photon Cloud and your self hosted server(s). It is interesting.
I think you can have the following connection flow:
1. Connect to Photon Cloud's name server
2. Call OpGetRegions
3. Ping each region from the result of 2 and ping your own self hosted Photon master servers
4. Choose best master server connection and connect to it (does not matter if it's Cloud or self hosted)
For 3. you need to hardcode the IPs (or FQDNs) if any of your self hosted servers and ping them separately. I don't know if you can integrate your servers directly in the Photon ping coroutine (make region tokens and add them to the enum and have one token per IP) I need to check this.
5 -
your solution is perfectly fine5
-
Big thanks to JohnTube and chvetsov!0