Jump to content

API & Load Balancing


Nobby

Recommended Posts

Hi,

 

 

 

How do I go about making use of the load balancing features of TCAdmin if im using the API to auto create game servers?

 

 

 

I have a complete working script that creates the server and assigns the parent service/game switching details etc, but at the moment I have to specify a Server and an IP address for the install.

 

 

 

Is there a way to set it to assign a server automatically based on the load balancing data, or is it a case of iterating through all the servers and basing the decision on the Average CPU and Memory usage?

 

 

 

Thanks for any info.

Link to comment
Share on other sites

In the GameServerCreationInfo object you use, set ServerId = "[Auto]", ServerIP = "[Auto]" and DatacenterId = "The datacenter id where you want the server". This will create the game server on a game server with the lowest average CPU in that datacenter. If you have load balancing disabled it will do a round robin on all servers for that datacenter.

Link to comment
Share on other sites

Argh still no good!

 

 

 

System.Exception: An error occurred while creating the server: Could not create server plugin.

 

 

 

This only happens when I set ServerID = "[AUTO]". If I give it a server ID instead it installs the server OK but then gives me this error:

 

 

 

GSAutomation.Processes.CreateGameServer: Error while checking for available port on ip [AUTO]: Object reference not set to an instance of an object.

 

 

 

Source code attached! Any ideas?

 

 

 

 

 

Also, if i try and set "Port" i get:

 

 

 

'Port' is not a member of 'TCAdminSDK.Remote.Plugins.GSAutomation.GameServerCreationIn fo'.

 

 

 

:confused: Thanks.

TCASourceCode.txt

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Who's Online   0 Members, 0 Anonymous, 7 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use