With the HostCapacityTemplate element you can define how many game instances you want deployed on any specified BM instance types and / or VM instance types. The actual definitions of the instance types and capacities themselves are defined in the InstanceTypeCapacity elements, which are assigned to this HostCapacityTemplate upon creation.
Table 1: HostCapacityTemplate element structure
Create a new HostCapacityTemplate within your i3D.net account.
A HostCapacityTemplate can be assigned to a . Here is a simple example to show you how:
A HostCapacityTemplate can also be assigned to an . This will override a HostCapacityTemplate set in the Fleet. This is useful if you want to test optimizations of a new build, to see if you can deploy more game instances than before.
This element contains a list of elements.
id
string
Read-only
Unique identifier of this element
name
string
Yes
The name of the HostCapacityTemplate
createdAt
int
Read-only
A unix timestamp of when this element was created
{
"name": "MyHostCapacityTemplate"
}[
{
"id": "4943474277300823573",
"name": "MyHostCapacityTemplate",
"createdAt": 1579007256
}
]{
"hostCapacityTemplateId": "4943474277300823573"
}[
{
"id": "7420099900751948711",
"name": "Bluewolf PC",
"deploymentEnvironmentId": "173892217340309897",
"deploymentProfileId": "8068976724396537810",
"gameDeploymentTemplateId": "2190484266497878757",
"utilityDeploymentTemplateId": "1316371245160957961",
"dependencyDeploymentTemplateId": "6537333393893172977",
"hostCapacityTemplateId": "4943474277300823573",
"operationalStatus": 0
}
]{
"hostCapacityTemplateId": "4943474277300823573"
}[
{
"id": "794401102378076360",
"name": "Bluewolf PC build",
"applicationId": "7983757100270474749",
"type": 1,
"executable": "GameServer",
"startupParameters": "-applicationInstanceId VARAPPLICATIONINSTANCEID -maxplayers 8",
"instanceDoesReadyCallback": 0,
"installId": 8675,
"osId": 151,
"hostCapacityTemplateId": "4943474277300823573",
"createdAt": 1568899371,
"label": []
}
]The InstanceTypeCapacity element is a child of the HostCapacityTemplate and defines how many game instances you want deployed on a certain BM instance type and / or VM instance type. during creation, you provide the ID of the HostCapacityTemplate that you want this element to become part of.
Table 1: InstanceTypeCapacity element structure
You can get a list of BM instance types using the /host/instanceType endpoint.
You can get a list of VM instance types using the /cloud/instanceType endpoint.
Note that within this InstanceTypeCapacity element you must provide the name of the instance type and not the ID. This is because the HostCapacityTemplate is region agnostic and therefore we have to use the names and not the IDs of the instance types.
The capacity you indicate is related to the amount of physical cores in a machine. It is therefore important to differentiate between BMs and VMs, because the core count of VMs is usually indicated as vCpus, which are based on logical cores (threads) and not physical cores.
The maximum number of game server instances you can deploy per physical core is 60.
The following table illustrates a few different examples:
Assignment of an InstanceTypeCapacity element to a HostCapacityTemplate is done during creation of this element by providing the ID of the HostCapacityTemplate in the hostCapacityTemplateId property.
Create a new InstanceTypeCapacity for an already existing HostCapacityTemplate.
This element is a child of the element.
VM
16 vCpus
16 _ 0.5 _ 60 = 480
VM
64 vCpus
64 _ 0.5 _ 60 = 1920
id
string
Read-only
Unique identifier of this element
hostCapacityTemplateId
string
Read-only
The ID of the HostCapacityTemplate it is a child of
providerId
int
Yes
The ID of the /cloud/provider to which the instanceType property applies
instanceType
string
Yes
The name of the instance type to which the capacity applies. See GET /cloud/instanceType (for virtual servers) and GET /host/instanceType (for bare metal servers)
isVirtual
int
Read-only
1 if the instance type is a virtual server, 0 if it is a bare metal server
capacity
int
Yes
The capacity (number of instances) of the instance type. Minimum value: 1, maximum value: 60
createdAt
int
Read-only
A unix timestamp of when this element was created
BM
4 cores
4 * 60 = 240
BM
16 cores
16 * 60 = 960
BM
64 cores
64 * 60 = 3840
VM
4 vCpus
4 _ 0.5 _ 60 = 120
{
"providerId": 31,
"instanceType": "c2-standard-8",
"capacity": 8
}[
{
"id": "4847342966680359842",
"hostCapacityTemplateId": "4943474277300823573",
"providerId": 31,
"instanceType": "c2-standard-8",
"isVirtual": 1,
"capacity": 8,
"createdAt": 1579009662
}
]