Multiple Master/Lobby Server

Options
KevinB
KevinB
edited October 2012 in Photon Server
Hi,

a typical set up probably involve 1 master/lobby server and multiple game servers. However, does photon support multiple lobby/master server? we are worry that doing authentication and doing some database lookup on the master could make it the bottleneck.

and with a single master, we will have to make sure the hardware that runs the lobby server will have to handle the peak traffic(no horizontal scaling for master) which pretty much waste money for most of the less busy time.

K

Comments

  • Hi Kevin,

    Photon LoadBalancing does not support multiple master/lobby servers out of the box. The code for the master server application is part of the SDK, so you could make the required changes yourself. We might add some similar features in future (with failover and horizontal scaling in mind), but not in the short term.

    Some general things to consider:
    From our experience, the main load is often on the game servers because:
    - clients are connected to the master only for a short time (until they found a match)
    - message rates are lower on the master (only lobby operations & events - no "realtime ingame action" ;))
    - if you have expensive database queries, move your database server to a separate machine - don't run it on the same server as Photon.
    - it is often MUCH cheaper to pay for better hardware than to add the horizontal scaling: from an operations perspective (you need to decide when to start up / shut down new machines - and ideally automate that process), and from a development perspective as well - you need to implement mechanisms for synchronization between multiple master servers, clients need to know which servers are available, need to be moved away from servers you plan to shut off and so on.

    To give you an impression: on our Photon Public cloud, at any time, the master server handles ~ 10% of the overall CCUs - but has only 5% or less of the overall load (CPU & bandwidth).
    Of course, that might vary greatly for your setup - but we'd recommend that you run a real-world load test for your server with a few hundred clients and then decide if there is a bottleneck - and if you really need horizontal scaling for your master server.

    Let us know if you need more infos!