Multi Server Game World

Options
garysimmons
edited November 2011 in Photon Server
Hi,

In the past my multi-player projects have been quite small, simple single server affairs. For my next project we want to make something that is easily scalable. That is, we need the ability to be able to plugin more servers as required and balance the room creation across those servers. Our game has a large universe but it is broken down into many smaller areas (rooms) with limited player counts in each room. Therefore this is still essentially a room based multi-player game where rooms are created and destroyed as players enters them and a database is used for persistence.

I have to admit they have very little experience in distributing a game across multiple servers and hope that someone here can point me in the right direction about how I would do this with photon. Any tips, reference material or anything else that you have would be greatly appreciated as I have thus far found information quite hard to come by.

1) Does photon have any inbuilt infrastructure for distributing room creation across a multi server set up?
2) If so would this solution work for both a multi-dedicated server setup and a cloud hosting solution (with server instances)?
3) Does any one here have any experience with this kinda set up and have any best practices or worst practices that is should avoid?
4) If photon has no inbuilt system for this...are there any good third party software you would recommend?

Any advice would be greatly appreciated

Comments

  • dreamora
    Options
    1) LoadBalancing in Photon 3 is exactly that basically
    2) No, it wouldn't work for cloud hosting as the gameserver IPs are to be hardcoded in the configuration (the gameserver are the distributed room handling nodes)
  • Hi Dreamora,

    Thanks for the response. I did read on the exit games website the following:-
    Loadbalancing
    With Photon loadbalancing developers are enabled to create scalable multi-node solutions. It includes out of the box a master server hosting the lobby and game servers to host the active games. The lobby application is delivered with a set of machmaking methods and a loadbalancing component that distributes the load (where to create new games).

    The thing is though...this is the only reference I can find to it anywhere? What am I missing?

    How do I invoke the load balancer and master server? where do i configure it?

    Thanks
  • Tobias
    Options
    Download the Server SDK: ExitGames-Photon-Server-SDK_v3-0-12-2468-RC4.zip
    http://www.exitgames.com/Download/Photon

    It contains a folder: src-server\Loadbalancing.
    This contains a loadbalanced solution with Master and GameServer projects.

    The fitting client is "Photon Unity Networking" from the asset store. In there, the NetworkingPeer contains the operations and logic to use Master and GameServer. You can extend either with your own operations for in-room logic.

    Currently, the setup for the GameServer is done with a config file. This contains the "public ip" of each gameserver. This is why Dreamora says this is not flexible for dynamic deployment on a cloud. We are thinking about a solution to automate this.
  • doh.....I downloaded the wrong version of Photon by mistake which Is why I could find no Load Balancing folder :)

    So just so I understand....

    Master Server Project
    Is this ready to go out of the box? Does it already auto-balance and select the correct game servers to create rooms on based on their current load. That is really all I need so if it does this I am not sure I would need to add my own business logic to the master server.

    Game Server
    These are what I would consider my normal room servers right? This is where I would add my own logic for the actual game?

    Thanks for the advice
  • Tobias
    Options
    You are right about the Master and Game Server projects. The game server is an extended "Lite" implementation with rooms and everything. You add logic in those or the peers.
    The framework does the work to communicate rooms lists and load and the master will forward players to a fitting game server.