> **Experimental**
>
> `@aws-cdk/aws-gamelift-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# RuntimeConfiguration

A collection of server process configurations that describe the set of processes to run on each instance in a fleet.

Server processes run either an executable in a custom game build or a Realtime Servers script.
GameLift launches the configured processes, manages their life cycle, and replaces them as needed.
Each instance checks regularly for an updated runtime configuration.

A GameLift instance is limited to 50 processes running concurrently.
To calculate the total number of processes in a runtime configuration, add the values of the `ConcurrentExecutions` parameter for each `ServerProcess`.

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/fleet-base.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-gamelift-alpha/lib/fleet-base.ts#L96)

## Example

TypeScript:

```ts
declare const build: gamelift.Build;
// Server processes can be delcared in a declarative way through the constructor
const fleet = new gamelift.BuildFleet(this, 'Game server fleet', {
  fleetName: 'test-fleet',
  content: build,
  instanceType: ec2.InstanceType.of(ec2.InstanceClass.C4, ec2.InstanceSize.LARGE),
  runtimeConfiguration: {
    serverProcesses: [{
      launchPath: '/local/game/GameLiftExampleServer.x86_64',
      parameters: '-logFile /local/game/logs/myserver1935.log -port 1935',
      concurrentExecutions: 100,
    }]
  }
});
```

Python:

```python
# build: gamelift.Build

# Server processes can be delcared in a declarative way through the constructor
fleet = gamelift.BuildFleet(self, "Game server fleet",
    fleet_name="test-fleet",
    content=build,
    instance_type=ec2.InstanceType.of(ec2.InstanceClass.C4, ec2.InstanceSize.LARGE),
    runtime_configuration=gamelift.RuntimeConfiguration(
        server_processes=[gamelift.ServerProcess(
            launch_path="/local/game/GameLiftExampleServer.x86_64",
            parameters="-logFile /local/game/logs/myserver1935.log -port 1935",
            concurrent_executions=100
        )]
    )
)
```

Java:

```java
Build build;

// Server processes can be delcared in a declarative way through the constructor
BuildFleet fleet = BuildFleet.Builder.create(this, "Game server fleet")
        .fleetName("test-fleet")
        .content(build)
        .instanceType(InstanceType.of(InstanceClass.C4, InstanceSize.LARGE))
        .runtimeConfiguration(RuntimeConfiguration.builder()
                .serverProcesses(List.of(ServerProcess.builder()
                        .launchPath("/local/game/GameLiftExampleServer.x86_64")
                        .parameters("-logFile /local/game/logs/myserver1935.log -port 1935")
                        .concurrentExecutions(100)
                        .build()))
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.GameLift.Alpha
Build build;

// Server processes can be delcared in a declarative way through the constructor
var fleet = new BuildFleet(this, "Game server fleet", new BuildFleetProps {
    FleetName = "test-fleet",
    Content = build,
    InstanceType = InstanceType.Of(InstanceClass.C4, InstanceSize.LARGE),
    RuntimeConfiguration = new RuntimeConfiguration {
        ServerProcesses = new [] { new ServerProcess {
            LaunchPath = "/local/game/GameLiftExampleServer.x86_64",
            Parameters = "-logFile /local/game/logs/myserver1935.log -port 1935",
            ConcurrentExecutions = 100
        } }
    }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2
var build Build

// Server processes can be delcared in a declarative way through the constructor
fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []ServerProcess{
			&ServerProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
				Parameters: jsii.String("-logFile /local/game/logs/myserver1935.log -port 1935"),
				ConcurrentExecutions: jsii.Number(100),
			},
		},
	},
})
```

## Properties

- `gameSessionActivationTimeout`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.seconds(300) — The maximum amount of time allowed to launch a new game session and have it report ready to host players.

  During this time, the game session is in status `ACTIVATING`.

  If the game session does not become active before the timeout, it is ended and the game session status is changed to `TERMINATED`.

- `maxConcurrentGameSessionActivations`: number — The number of game sessions in status `ACTIVATING` to allow on an instance.

  **Default:** no limit

  This setting limits the instance resources that can be used for new game activations at any one time.

- `serverProcesses`: [ServerProcess](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-gamelift-alpha.ServerProcess.html)[] (required) — A collection of server process configurations that identify what server processes to run on each instance in a fleet.
