Multiple photon instances on one computer

Options
mookanana
edited May 2013 in Photon Server
Hi, I have searched in vain for the answer to this question so I thought I'd try my luck here.

I am very new to the photon framework and am currently just riding on a working version of it at the office.
I would like to set up multiple instances of photon on my laptop for multiple user development purposes. Right now, we have a couple of people working on server code and as a result the server base is constantly being updated for testing. This causes a lot of delay - developers need to wait for each other to test their code. Our lazy alternative is to have different computers for different servers but that is inefficient. I have also tried running multiple servers under one instance, however if a developer's update causes a crash on his individual server, the whole instance goes down and everyone can't continue.

From what I understand reading up on threads, the photoncontrol currently cannot support more than one instance. however I am not clear how to manually configure the script files to run seperate instances or whether this is even possible. Any help would be much appreciated!

my best reference is here http://forum.exitgames.com/viewtopic.php?f=5&t=584

Comments

  • Hi,

    the thread you mentioned gives quite good advice.

    It is possible to run multiple Photon instances, but Photon Control does not support it yet. So you need to take care of starting / stopping the instances yourself. Each instance needs to have a unique instance name.

    You can either start multiple instances all in the same directory, or make a copy of the /deploy folder for each instance. The later is probably easier for your purpose.

    1. Modify the PhotonServer.config and add additional instances. There are currently <Default ... /> and <Loadbalancing ... > - add what you need; make sure that the instances all bind to a unique IP (replace 0.0.0.0 by your IPs) OR use different ports on all listeners.

    2. Modify the _ *.cmd script files in /bin_xxx and replace the "Default" by your instance name. Then use these script files to start / stop Photon as an application or install / start / stop as a service.

    Et voila, it should work. If it does not - please let us know.
  • Thank you Nicole, that was a prompt reply and your points solved my problem cleanly :)

    to add on to point 2 for others, i edited "_run-Photon-as-application.start.cmd" to have these lines:
    start PhotonSocketServer.exe /debug Instance1
    start PhotonSocketServer.exe /debug Instance2

    also, in case of infinite loops, individual instances can be stopped via the console command 'PhotonSocketServer.exe /stop1 Instance2'

    doing a 'PhotonSocketServer.exe /help' is really handy for learners.

    Thanks again Nicole!
  • Err, yes - I intended to write "Make one copy of the *.cmd files for each instance and replace the instance name" - so that you can handle each instance separately and don't need to start / stop all instances at once. ;)

    Glad to hear that this is working for you.
  • Hi,
    When I run 3 instances of photon server with 3 different free licenses on the same computer, can 300 users connect to my computer (every 100 users connect to an instance of photon server)? Sorry for my bad English and thanks in advance.
  • [Deleted User]
    Options
    Technically: yes, it is currently possible.

    But please note that it's a violation of our license terms if you are trying to run 3 Photon instances for the same game title, each with a separate 100-CCU-License. If your game should host more than 100 users, you need a 500 CCU license.

    We might implement mechanisms that prevent this kind of license usage any time, so please don't rely on a "hack" to work around our license terms. Thanks! :)
  • Thank you Nicole. I just want to test the performance when there's a large number of user connecting to the server. I will buy a license very soon.