Fleet Service Components #
Fleet Plugin #
The Fleet Plugin methods that interact with the Fleet service allow developers to manage game server capacity for fulfilling game instance requests. In the Fleet Service Tasks topic we’ll see how to use the Fleet Plugin methods, along with the SDKs that invoke them.
method | description |
---|---|
init | Provides an HTTP client through which Pragma can communicate with external resources for capacity. |
selectServerPool | Uses custom logic to determine what server pool should be used when allocating game servers for the given game allocation request. |
getServerPoolById | Associates the provided server pool ID with a new or existing server pool. Executed when Pragma does not recognize the game server reporting its capacity. |
add | Allocates additional game servers for a specific server pool. Executed when the current available capacity cannot fulfill a request to create a game instance. |
Pragma provides some reference examples for existing platforms:
PragmaNomadFleetPlugin
- Run servers using Nomad. Selects server pools based on game server version. All server pools map to the default server management policy.LocalProcessFleetPlugin
- Run servers using local hardware. Selects server pools based on game server version.DefaultFleetPlugin
- This implementation does not allocate game servers. Includes one server pool with the default server management policy.
You can view more details about the Fleet Plugin methods and their properties in the reference section of the documentation.
Server Pool Interface #
property | description |
---|---|
serverPoolId | Unique ID for the server pool |
managementPolicyId | Unique ID for the server pool management policy associated with this server pool |
ext | The ExtServerPool payload containing extra information that can be used when allocating game servers |
Server Pool Management Policy Configuration #
The ServerPoolManagementPolicyConfig
configuration block provides a place to define values for server pool management policies. The following configuration values are available in the game: serviceConfigs: FleetServiceConfig: serverPoolManagementPolicies:
block
config | description |
---|---|
id | Unique ID for this server capacity pool management policy |
gameCapacityPerServer | Maximum number of game instances that can run on a single game server. Value must be at least 1. |
capacityFloor | Minimum game capacity allocated at all times |
capacityCeiling | Maximum game capacity allocated at all times |
capacityBuffer | Preferred available game capacity defined as a percentage of used game capacity |
serverMaxStartDurationMillis | Maximum duration, in milliseconds, a game server can take to start before the allocation is declared failed |
serverHeartbeatPeriodMillis | Millisecond interval at which a game server should report its capacity |
serverHeartbeatExpiryFactor | Number of heartbeats that can be missed before a game server is considered unresponsive |
gameCapacityResolvedTimeoutMillis | Maximum duration, in milliseconds, the platform will wait for capacity to resolve for a game instance before ejecting it |
Consider whatcapacityFloor
andcapacityCeiling
values are appropriate for your environment. Setting these values too low or too high can lead to undesirable game instance load.
Extension Data #
ext | description |
---|---|
ExtHostRequest | Data to assist in game server allocation. Populated by GameInstanceHostPlugin.findHostForGameInstance and used in the Fleet service to determine which server pool to assign for the game instance. Example value: game mode (3v3, 1v1, etc.) or game version (beta, trial, etc.) |
ExtServerPool | Populated by the Fleet Plugin selectServerPool method and used when allocating game servers. Example value: game mode (3v3, tutorial, etc.) or game version (0.4, 0.5, etc.) |