Master Server and Game Server using same port

Hello Photon Team,

First of all your service is amazing, thank you for making networking so easy. As the title says if it's possible to use the same port for Game and Master server, I have tried to use 443 on our Photon server but I couldn't proceed as it's reverting back to default port 5506 / 5505. One of our clients is Government and their network configuration only allows us to connect using 443 hence the reason why we trying the approach.



  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @jba,

    Thank you for choosing Photon!

    Are you connecting to Photon Cloud or your own self-hosted Photon Server?
    If you are using Photon Cloud you need to reach out to us as the only option is via Photon Industries.
    If you are using self-hosted Photon Server maybe there is way to choose which application via configuration: OverrideApplicaiton vs. DefaultApplication settings when using the same port? maybe @chvetsov can confirm?
  • Thanks for the quick reply, we are connecting to our self-hosted photon server. That would be great if we can override it. Will wait for the confirmation :)
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited April 2021
    Of course the best option as we are doing in the cloud is to host each server type/application on a separate machine (name server, master server and game server).
  • Hi @jba.

    It is not technically possible to connect to multiple different server applications on the same server over the same port.
    The reason for this is that there is no way for the OS to tell which application a client wants to talk to aside from the port number.
    So you have two options:
    a) run both applications on the same physical machine, but use different ports for them.
    b) use the same port for both applications, but run them on different physical machines under different IPs/URLs.

    I suggest that you offer both options to your customer. If they insist on not permitting a second port (which, as they are government, is quite likely), then they need to pay you more so that you can rent a second server and subscribe to a second Photon server license.