First I will describe our scenario, and the ask the question:
- Each of our clients owns his unique dedicated server instance ( 1…n ) per client.
- All of those servers can be the same build. So we could have all of the clients to reside on the same fleet.
- Those server instances should be available for the client any time, ( its possible for them to wait a short amount of time for deployment like 2 3 minutes ).
- Those server instances are empty most of the time. And so far we do not expect the number of players to exceed 20.
I have created a fleet, in order for the players to join, I need to create a game session.
So if I wanted to have instant availability for all of our clients i would have to create for each client server instance, a game session, and have them online all of the time.
My question is:
- Do we pay for empty game sessions running on gamelift?
- If above ture, Is it possible to create a game session on demand, and then terminate it, and how much time would it take for the client to have his instance ready ?
- Do we pay for a fleet running without game sessions?
Gamelift charges you for your instance usage. A game session (even if empty) requires an EC2 instance so you will get charged for that. You do not pay for empty fleets.
Typically a new instance can be provisioned in a few minutes (your time may vary based on size of build, operating system, how your game initializes. Firstly I would instrument that so you know how long it takes.
A typically use case would be to have a warm pool of ready to go instances and use target tracking to autoscale your instances based on demand. See https://aws.amazon.com/blogs/gametech/autoscaling-with-amazon-gamelift-target-tracking/. Clients requiring servers get them instantly and autoscaling starts warming up more servers or scaling them down as demand drops.
To really minimize costs, you should look at having at least two, ideally Linux, fleets: a Spot fleet and an OnDemand fleet per region, with a queue in front of them. You can get GameLift to drive traffic to your Spot fleet and only fallback to the OnDemand fleet during times of Spot unavailability (which is rate).
Definitely read about scaling with Gamelift and take advantage of Spot fleets.