Expenditure awareness - Games Industry Lens

Expenditure awareness

GAMECOST04 - How do you measure the cost of your game environments?

Understand the cost per player, game feature, and environment so that you can manage and forecast your spend as the number of players changes over time and features are added and improved. Consider the following best practices in order to manage your costs of your different game environments.

GAMECOST_BP07: Implement attribution of cost per player, game feature, and environment.

Cost attribution for game servers is usually easier to perform than game backend services because a game server is usually optimized to be able to host a specific number of concurrent players per instance which can be amortized across the cost of running the instance. For game backend services, it is recommended to de-couple the components of your game into distinct features that can be managed as separate logical or physical resources to make it easier to analyze costs. For example, although it may seem easier to implement a single monolithic application to host game backend services, this pattern makes it hard to derive the total cost per player and game feature over time as you add more features because the compute, networking, and storage costs of resources are shared across all of them.

Consider adopting a serverless architecture for your game backend services with services such as Amazon API Gateway and Lambda or Fargate for compute, Amazon SQS and Amazon SNS for messaging, Amazon S3 for object storage, and Amazon DynamoDB for database storage. These services are just a few examples of products that offer pricing that is usage-based and primarily driven by request volume so that costs can be broken down more granularly. Individual resources such as Lambda functions, Fargate services, DynamoDB tables, and S3 buckets can all be associated with cost allocation tags so that you can attribute the costs of these services with game feature names that make it easier for you to understand the costs for each of your services.

It is also recommended to separately manage each of your game development environments so that you can easily attribute costs for the different environments. Typically, game developers will manage separate environments for development, test, staging and production environments, as described in the operations pillar of this games industry lens. Each environment usually has different scalability, performance, and usage requirements and may be managed by separate teams. To control costs, organize these environments so that you can properly monitor and attribute the costs of each environment.

For more information, refer to the following documentation: