Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Skip to main content

Guidance for Kubernetes-Based Game Load Testing on AWS

Deploy distributed load testing across integrated environments

Overview

This Guidance demonstrates how to set up a game load testing solution using AWS services and Locust, an open-source load testing tool. It leverages Amazon Elastic Kubernetes Service (Amazon EKS) with AWS Fargate to create a secure, scalable and cost-effective environment. The Guidance allows load test operators to manage the cluster through their local machine's terminal and interact with Locust's web dashboard through port forwarding.

How it works

These technical details feature an architecture diagram to illustrate how to effectively use this solution. The architecture diagram shows the key components and their interactions, providing an overview of the architecture's structure and functionality step-by-step.

Deploy with confidence

Ready to deploy? Review the sample code on GitHub for detailed deployment instructions to deploy as-is or customize to fit your needs. 

Go to sample code

Well-Architected Pillars

The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.

Amazon EKS packages, manages, and deploys applications in a lightweight, portable, and efficient manner. Fargate automatically provisions, scales, and manages the nodes your containers run on, simplifying infrastructure management. Use Locust to efficiently simulate high-concurrency, distributed load on your applications, uncovering potential issues and gaining valuable insights. By harnessing these powerful tools and services, you can create a secure, scalable, and fully-managed load testing environment, allowing you to evaluate your system's performance under realistic conditions and proactively address any bottlenecks, inefficiencies, or service degradation.

Read the Operational Excellence whitepaper

Fargate removes the attack surface associated with securing the underlying infrastructure, reducing the risk of vulnerabilities and misconfigurations. Fargate also deploys your workloads in private subnets, isolating them from direct internet access and minimizing the risk of unauthorized access. AWS Identity and Access Management (IAM) secures your workloads by providing fine-grained control over user and resource permissions, so that only authorized entities can access and interact with your AWS resources. By offloading the responsibility of securing the hardware and network environment, you can focus on safeguarding your application and mitigating the risks associated with manual configurations and human errors.

Read the Security whitepaper

Conduct thorough load testing to simulate varying levels of user traffic and load, revealing whether your application's scaling mechanisms are working as expected and scaling thresholds are properly configured. This process exposes pain points and allows you to implement robust error handling, graceful degradation, circuit breakers, and other fault-tolerance mechanisms, leading to more resilient, self-healing applications that handle downtime better and maintain critical functionality under stress.

Read the Reliability whitepaper

Leverage AWS CLI, Terraform, and kubectl to programmatically define, deploy, and scale your infrastructure and applications, enabling faster provisioning, more consistent configurations, and better utilization of resources compared to manual, error-prone processes. By automating these tasks, you can streamline your operations, reduce the risk of human errors, and focus your engineering efforts on more value-adding activities.

Read the Performance Efficiency whitepaper

Use Fargate to only pay for the compute resources your containers actually consume, avoiding expenses associated with idle, over-provisioned, self-managed resources needed to handle peak loads. The serverless nature of Fargate also removes the costs and operational overhead related to infrastructure management. Locust.io, a free and open-source load testing framework, offers the benefits of a powerful testing tool at no cost. By optimizing your resource utilization and leveraging cost-effective solutions, you can maximize the return on your investment and redirect resources towards more strategic initiatives.

Read the Cost Optimization whitepaper

Fargate reduces your infrastructure footprint and environmental impact, as AWS data centers are designed for optimal energy efficiency and powered by renewable energy sources. Additionally, the dynamic scaling capabilities of Fargate also leads to more efficient use of energy and resources. Use Locust, an event-based load testing framework, to simulate large-scale, real-world load conditions without requiring extensive hardware or infrastructure, further contributing to your sustainability efforts.

Read the Sustainability whitepaper

Disclaimer

The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.