Ensure Optimal Application Performance with Distributed Load Testing on AWS
AWS Architecture BlogEnsure Optimal Application Performance with Distributed Load Testing on AWSby Ajay Swamy and George Lenz | on13 MAY 2021| inAmazon API Gateway,Amazon CloudFront,Architecture,AWS CodeBuild,AWS CodePipeline,AWS Fargate,AWS Solutions Implementations,Intermediate (200)|Permalink|ShareAs 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 anAWS CloudFormationtemplate to deploy the solution within minutes. It usesTaurus, an open-source load testing framework to automate tests.Figure 1. DLT Landing page viewDLT 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 architectureDeploying this solution with the default parameters builds the following environment in the AWS Cloud:Figure 2. DLT architecture diagramDLT uses the following AWS services:Amazon API Gatewayto manage APIsAWS Lambdato manage the microservices with business logicAmazon Simple Storage Service (Amazon S3)to host the web console, store test scenarios, and store results of load testsAmazon DynamoDBto store test scenarios and accompanying test resultsAmazon Elastic Container Registryto hold the Docker image with the Taurus Load Testing frameworkAmazon Elastic Container ServicewithAWS Fargatetasks to run the load testsAWS CodePipelineandAWS CodeBuildto retrieve and build Taurus imageAWS Amplifyto manage the web UI used by the solutionAmazon Cognitoto authenticate and manage usersAmazon CloudWatch Eventsto manage scheduled tests and display test resultsAWS Secrets Manager(optional) to use Docker Hub credentials to overcome Docker Hub rate limitsFigure 3. Create load test, schedule test, and submit job viewRunning and monitoring tests with DLTOnce 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 viewDLT 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 viewThe 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.ConclusionWhether 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 withDistributed Load Testing on AWS.Ajay SwamyAjay 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 LenzGeorge 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.
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 […]
Ajay Swamy
Amazon API Gateway Amazon CloudFront Architecture AWS CodeBuild AWS CodePipeline AWS Fargate AWS Solutions Implementations Intermediate (200)