how to deploy my project

Hi_TT
edited July 2013 in Photon Server
Hi !I am a newer ,
my team now are developing a game and we decide to use the photon , I use about one week to go through the photon server source code,I decide to use the photon server host by myself, and I find that the loadbalancing project is good for my project, I have saw the loadbalancing project ,but some problem confused me :
1: the loadbalancing project has a masterserver and a gameserver, it run on one photon instance in the one same computer,that is easy to understand,but if I want to deploy my project on two computer,how should I do that ?during my developing ,I use the vs2010, I think one masterserver+X gameservers,so I decide to use the loadbalacing I want to add the chatserver and the loginserver to the loadbalancing project that the exitgames provide,I don't quite understand the gameserver meaning,it is the same to the loginserver or the chatserver?? :?

2,I have two PC for my this game project,it is a mobile game ,I plan to deploy my project ,it contain the one masterserver,chatserver,loginserver,and two gameservers ,if I have finished my project like the plan, how should I deploy on the two PC,just copy the bin\ folder to another computer,and run the photon instance?? I don't know ,so if that ,it may have two masterserver? my Programming is no problem,but just confused on the deploying the project, I hope the two computers can hold 4K CCu,,how to deploy my project ,anyone can help me ?? :)

Comments

  • Welcome to our forum & thanks for choosing Photon. :)

    1. To deploy Photon Loadbalancing, check this link: http://doc.exitgames.com/photon-server/ ... ing/#cadlb (and the previous sections on that article about the general workflow of loadbalancing: our "master server" only works as a loadbalancer - it has a list of all connected game servers and lets the client know to which GS it should connect. The clients then disconnect from the master and actually create the room & send data on the GS (for chatting, playing, ...).

    I guess you are referring to the great tutorial of cjrgaming.com? Their "chat server" and "login servers" are also connected to the master, but the difference is that clients are only connected to the master. The master is routing all incoming data from the client to the correct subserver and then back to the client, serving as a "router" (which obviously requires high bandwidth usage on the master server). So the use case is a bit different there.

    Of course, you could combine the functionality of both cases - i.e., build a "subtype" of our Game Server that only handles chat, and another one that only handles game rooms - or whatever you can think of. But that's probably a bit over the top for now. (I hope this is all correct, I'm not too familiar with those tutorials, as they are not written by Exit Games... ;))

    2. Again, check the documentation above - in general, you need to configure all game servers, chat servers etc. to connect to the correct master server. In that case, it does not matter that you have started a second master server instance, you only need to make sure that all your clients & game servers agree to use the same master address.
    Of course, you could also remove all references of the "master" application from your PhotonServer.config so that it won't get loaded at all - if you want to be dead sure that it will not be used. (But you still need to configure clients & game servers correctly in the first place, so it's usually fine to just load the additonal master apps, but never use them. ;) )

    Hope I could help - otherwise, let me know if there are still questions. :)
  • regarding server capacity - 2 decent physical machines can handle 4k CCU, but you need to do some calculations / load tests upfront - especially regarding bandwidth.

    if you have N players peer room and they mainly call "RaiseEvent" operations - sending events to all other players in the room-, the formula to calculate bandwidth requirements is roughly:

    N ^ 2 * number of events per second * size of each event * number of rooms

    So basically, the more CCU you have and the larger your rooms, the smaller should your event size & send rate be.
  • If i understand ass well :

    If i have an unlimited ccu licence , i can setup :

    - Machine 1 : 1 master server and 1 game server and run the photon instance.
    - Machine 2 : 1 game server and run the photon instance ( according that he connect to the IP of the machine 1).
    but on the machine 2 the photon instance will check the licence and will see that an another IP already use it?

    Right?

    In this case , as exemple i have 1000 players connected and want have 500 on each game servers , how i can handle that?
    How i can say to the master server to create a room on the machine 1 or 2?
  • HI guys!,maybe you are right ,I am a newer , I know how to deploy a masterserver and a gameserver one the Machine1,but I don't quite understand how should I do to deploy my project on Machine2, at my developing time ,I use the vs2010, so I just copy the bin\ folder to the Machine2 for the gameserver?? the gameserver1 and the gameserver2 are the same?can you give me a detailed instruction for how to deploy the gameserver2 on the Machine2
  • Nicole wrote:
    regarding server capacity - 2 decent physical machines can handle 4k CCU, but you need to do some calculations / load tests upfront - especially regarding bandwidth.

    if you have N players peer room and they mainly call "RaiseEvent" operations - sending events to all other players in the room-, the formula to calculate bandwidth requirements is roughly:

    N ^ 2 * number of events per second * size of each event * number of rooms

    So basically, the more CCU you have and the larger your rooms, the smaller should your event size & send rate be.
    Thanks Nicole :) ,I have saw a question that the events can send to the all players in the same room ,so If a room has 200 players in it ,I think it will be much traffic ,so I have read the MMO ,if I add the interest managent feature in the room ,then I just send the events to the people who can see me ,but not the players who are far way from me ,is that right?? maybe a room can't hold 200 players ,beacuese I think I will do many things in the mmoworld ,maybe 100players are good ,if I open 40rooms ,it means I can hold 4K CCU ,right?? :D
  • @Hi_TT:
    The deployment on machine 2 is basically the same as for machine 1 - just make sure that the config files in the /deploy/GameServer directory have the correct master server address.
    It's described here: http://doc.exitgames.com/photon-server/ ... ing/#cadlb

    100 Players per room is still a lot - that might make sense for a chat room (where messages aren't sent very frequently, maybe 1 - 2x per second), but probably not for actual gaming. Adding some kind of interest management (like our MMO example) would be required to keep bandwidth usage at a reasonable level.
    As I said - try to make an upfront calculation & run loadtests early.

    Handling 4k CCUs on 2 machines is easier for 1-on-1 games than for 100-player-rooms. ;)

    Also, 4k CCU is a lot, it's not very likely to have that amount of players from the release date onwards (unless you are big publisher with a considerable marketing budget) - so you might want to relax a bit about those numbers, you can always add more capacity later on if needed (although it is, of course, always a good idea to run some load tests and know how much load your game / servers can handle with your specific game design).

    @rokawar:
    The Photon Server licenses are limited to 1 machine - if you want to set up, say, 3 Photon Servers with Loadbalancing, you need 3 licenses (or contact us for an enterprise deal: drop an email to business@exitgames.com).

    The users are automatically distributed between the game servers with the lowest "load" (which is measured by CPU load, network usage etc.) - this leads to an even distribution between all connected Game Servers.
    But the source code for the loadbalancing project is part of the Photon Server SDK, so you could modify the loadbalancing mechanism in any way you like - for example, create X games on one server, and then the next X games on the next server.

    Here are more details: http://doc.exitgames.com/photon-server/ ... ing/#lbilb
  • Thank for your answer.