Load balancing concept

Options
Hi. I'm new in Photon, and I want to understand few basics ideas of it.

let's say, I have one VPS. And I try to start Load Balancing instance by Photon Control.
In documentaion says "Loadbalanced setup for local development: A Master-server and two game-servers."
and config

		<Applications Default="Master">		
			<Application
				Name="Master"
				BaseDirectory="LoadBalancing"
				Assembly="Photon.LoadBalancing"
				Type="Photon.LoadBalancing.MasterServer.MasterApplication"
				ForceAutoRestart="true"
				WatchFiles="dll;config"
				ExcludeFiles="log4net.config"
				ApplicationRootDirectory="LoadBalancing"
				>
			</Application>
			
			<Application
				Name="Game"
				BaseDirectory="LoadBalancing"
				Assembly="Photon.LoadBalancing"
				Type="Photon.LoadBalancing.GameServer.GameApplication"
				ForceAutoRestart="true"
				WatchFiles="dll;config"
				ExcludeFiles="log4net.config"
				ApplicationRootDirectory="LoadBalancing"
				SharedDirectory="Plugins">
			</Application>			   
	
		</Applications>
And first question is: where is second game server? Or game-server instances are dynamically genetated?

Ok, next I'm thinking about servers and balancing.
How exacly servers are takes a hardware resource? One instance - one CPU? Thread? Why I need to use load balancing rather than Hive?
For example, I need to create 100 rooms with 50 users each in my real-time (fps) game. Maybe Hive-type will be enough.. I think not. But why?

One more question is: can I run Master and Game servers on different VPS? Is it possible?




Comments

  • chvetsov
    Options
    here in config, there is only one game server. we do not create instenses on the fly
    Hive is part of LoadBalancing. it does not have match making. if you need few game servers then defenetely use LoadBalancing
    Server takes haradware resources using multithreading.
    if you are able to connect from one VPS to another, then yes this is possible...
  • DantaliaN
    Options
    Thanks for answer, chvetsov.
    if you need few game servers

    how do I know how many servers I need to create? "Servers" it's not a "rooms", right? In one server I can create any number of rooms

    then yes this is possible

    Can you explain how? basics of it

  • chvetsov
    Options
    >how do I know how many servers I need to create? "Servers" it's not a "rooms", right? In one server I can create any number of rooms
    well, how many server machines you need? if you (developer) do not know, how can i know? you may start with one and later it will be easy to add more.

    >Can you explain how? basics of it
    in LoadBalancing.dll.config you may find setting 'MasterIPAddress'. set it address of your master. that is it. there is no any magic. if your ip is accessible, then game server will be able to connect.
  • DantaliaN
    Options
    if you (developer) do not know, how can i know?

    sorry for misunderstanding. I asked about phisical limits for one game server. What reasons should I have to add one more game server. How do i know this?
    Max socket connection limits on one port? or max sending messages? or something...

    For example, if I have 100 users who makes a ping every 20ms, how many game servers I need to create on one vps? or if 10000 users?

    Sorry if it's a stupid question. I'm not so good in load balancing.

    set it address of your master. that is it.

    thanks! it's realy simple
  • chvetsov
    Options
    well, usually there is only two limits: memory and cpu. main limit is cpu. so, if cpu is exhausted, then your users will expirience lags. same will be if you overload your server memorywise.

    so, rule of thumb is if your clients exprience lags, it is time to take closer look at your game servers. probably you need one more, or you need optimize something

    well, you also may rent more expensive server so, that it will work faster and handle everything in one game server.