AWS Architecture Blog

Ensure Optimal Application Performance with Distributed Load Testing on AWS

As a modern enterprise, your customers expect 100% availability of your critical web and mobile applications. Unforeseen events such as COVID-19, have necessitated many customer engagements to become virtual. This has made web and mobile applications even more critical.

Distributed Load Testing on AWS (DLT) helps you automate the performance testing of your software applications at scale. This way you can identify bottlenecks before releasing your application. The solution supports scheduled and concurrent tests, and handles increased numbers of simultaneous users who can generate many requests per second. It also offers real-time reporting. With DLT, you can simulate thousands of users connecting to your application, so you can better understand your application performance profile.

Companies that must test their website performance can benefit significantly from the solution. They can use default load tests such as simple GET requests, or use JMeter scripts to create custom tests. DLT uses an AWS CloudFormation template to deploy the solution within minutes. It uses Taurus, an open-source load testing framework to automate tests.

Figure 1. DLT Landing page view

Figure 1. DLT Landing page view

DLT provides an intuitive web console where you can create tests to run or update, or schedule future runs. As part of the testing parameters, you can define the number of tasks launched and the number of concurrent users accessing the endpoint per task. You can also specify ramp-up time and hold time of target concurrency. You can choose to create a simple test to an HTTP endpoint, or provide a custom JMeter script. Once the test is created, you submit your job to run the tests.

DLT architecture

Deploying this solution with the default parameters builds the following environment in the AWS Cloud:

Figure 2. DLT architecture diagram

Figure 2. DLT architecture diagram

DLT uses the following AWS services:

Figure 3. Create load test, schedule test, and submit job view

Figure 3. Create load test, schedule test, and submit job view

Running and monitoring tests with DLT

Once you submit the job, the request is sent to Amazon API Gateway. This invokes AWS Lambda functions that manage and store test data in Amazon S3 and Amazon DynamoDB. The AWS Lambda functions also initiate the Step Functions state machine, which then begins the AWS Fargate tasks deployment. The tasks retrieve a file containing a Docker image from Amazon S3, and build an Amazon ECR image containing Taurus. Each task runs the test based on the job parameters and test scenario.

Figure 4. Running test view

Figure 4. Running test view

DLT allows for all tests to start simultaneously. The test endpoint receives traffic at the same time, which simulates real word scenarios.

Figure 5. Test results view

Figure 5. Test results view

The solution also features a scheduling function via an Amazon CloudWatch Events rule that can run tests daily, weekly, biweekly, or monthly. DLT also allows you to see how tests are progressing in real-time via an Amazon CloudWatch dashboard. This dashboard shows the average response time, the number of concurrent users, the number of successful requests, and the failed requests. As individual tests complete, results are stored in Amazon S3. When the job finishes, aggregate results are then computed and stored in Amazon DynamoDB. The results will then be viewable in the web console.

Conclusion

Whether you’re a private enterprise providing telemedicine, or a public sector service such as a virtual court, you need confidence that your application can scale with increased user loads. Distributed Load Testing on AWS allows you to automate application testing, understand how it will perform at scale, and fix bottlenecks before releasing your application. Get started with Distributed Load Testing on AWS.

Ajay Swamy

Ajay Swamy

Ajay Swamy is Senior Product Lead at AWS Solutions Group. He is responsible for managing a portfolio of AWS Solutions that offers quick, easy to deploy cloud-based solutions for complex technical and business problems. He is based in NYC.

George Lenz

George Lenz

George Lenz is a Solutions Developer on the AWS Solutions team. He has contributed to updates to the Distributed Load Testing on AWS solution. He is based in New York.