Regions

Photon Cloud provides you with global connectivity to allow low latency gaming all around the world.

The initial connection of clients goes to a Photon Nameserver, which provides the list of available regions. Typically, clients connect with "Best Region" selection enabled, which will detect the region with the lowest ping and connect to it (see below).

Each region is completely separate from the others and consists of a Master Server (for matchmaking) and Game Servers (hosting rooms).

Photon Cloud Regions' Connect Flows
Connect to Photon Cloud regions

The full list of available regions is below. In the Dashboard, you can define which regions should be available for the clients.

Best Region Selection

PUN is relying on the Realtime API layer to pick the Best Region. Aside from automatically saving the results in the player preferences, the workflow is the same as in the Realtime API, described below.

Best Region selection is done by default when you use PhotonNetwork.ConnectUsingSettings().

Photon Realtime can detect the Best Region to connect to and enables you to stick to that region.

To do so, the clients always fetch the list of available regions from the Nameserver on connect. This is used to check if the selected region is available.

After pinging the servers, the results are summarized in a string which should be saved on the device for later use. The summary string includes the current best region, its ping and the current region list.

Without results from a previous session, all regions will be pinged, which takes a moment longer. If an previous result is available, the client will check if the region is still available, if the ping is still acceptable (less than 1.5x slower) and if the region list changed. If either applies, all regions are pinged and a new result gets picked.

Using Best Region works well with the server-side Region Filter in the Dashboard. It enables you to change the regions available to players on demand.

To access the list if regions or to override previous results, please refer to the API Reference for regions.

Available Regions

Photon Cloud has servers in several regions, distributed across multiple hosting centers over the world.

Each Photon Cloud region is identified by a "region token". To pass the region token with the "Connect" method of your client, call PhotonNetwork.ConnectToRegionMaster(regionCode, gameVersion).

List of available regions and tokens:

RegionHosted inToken
AsiaSingaporeasia
AustraliaMelbourneau
Canada, EastMontrealcae
Chinese Mainland (See Instructions)Shanghaicn
EuropeAmsterdameu
IndiaChennaiin
JapanTokyojp
RussiaMoscowru
Russia, EastKhabarovskrue
South AmericaSao Paulosa
South KoreaSeoulkr
USA, EastWashingtonus
USA, WestSan Joséusw

Dashboard Regions Filtering

You can filter the list of available Photon Cloud regions per application on the fly directly from the dashboard.

Photon Cloud: Regions Whitelist
Filter Photon Cloud Regions

Go to the dashboard and then click "Manage" for a chosen application and then click "Edit". You will find an input field where you can enter the list of whitelisted regions as follows:

  • the allowed list should be a string of region tokens seprated by semicolon. e.g. "eu;us".
  • region tokens are case insensitive and are defined here.
  • undefined or unrecognized region tokens will be ignored from the list.
  • empty ("") or malformed string (e.g. ";;;") means empty list.
  • empty list means all available regions are allowed.

Once you confirm and save, the operation GetRegions will return only the filtered list of regions. Thus clients should select from that list but it's fully possible clients connect to any available region explicitly. Take into consideration that dashboard updates propagation can take up to 10 minutes.

Using The Chinese Mainland Region

First, you need to request access to the Chinese Mainland region for your Photon app. Send us an email so we could unlock it for your AppID.
Second, you cannot subscribe to paid plans to be used in Chinese Mainland Region via our website. Please reach out to us by email.

The Photon NameServer has to be local to China, as the firewall might block the traffic otherwise. The Chinese Photon NameSever is "ns-cn.exitgames.com".

Connecting with clients from outside of China mainland will most likely not produce good results. Also, connecting from the Photon servers to servers outside of China mainland (e.g. for Custom Authentication, WebHooks, WebRPCs) might not be reliable.

Important: in the current phase, changes you make to your app via your dashboard are not automatically reflected in app caches for China. Let us know by e-mail, if you have an update request there.

Also for legal reasons, you need a separate build for China and we recommend to use a separate AppId with it. For example, use a compile condition (of your choice) to change the AppId and the Photon NameServer depending on the build.

Follow the instructions corresponding to your client SDK to make a special build for the Chinese market.

  1. Set the AppId to the application that has China region unlocked. If you want to use same project and have different builds you can do something like this:
        void Awake()
    {
    // TODO: replace compile condition with your own
    #if CHINA
        PhotonNetwork.PhotonServerSettings.AppID = "ChinaPUNAppId"; // TODO: replace with your own AppId
    #else
        PhotonNetwork.PhotonServerSettings.AppID = "nonChinaPUNAppId"; // TODO: replace with your own AppId
    #endif
    }
  2. Open the "NetworkingPeer.cs" file and set the NameServerHost to "ns-cn.exitgames.com":
  3. Update CloudRegionCode and CloudRegionFlag enums to add new "CN" (or "cn") region token as follows:
  4. Use PhotonNetwork.ConnectToRegion(CloudRegionCode.cn, gameVersion) to connect to Chinese Mainland region.

 To Document Top