Simplifying Load Testing with Open Load Fury

Engineering @ PhysicsWallah
4 min readSep 25, 2024

--

At Physics Wallah, we frequently perform load tests to ensure our applications can handle high volumes of traffic, especially during peak
times like exam seasons or course launches. Our QA and DevOps teams collaborate closely to conduct these tests. The DevOps team
manages the infrastructure, setting up and maintaining the necessary virtual machines, while the QA team focuses on executing the load
tests. This involves SSHing into the servers, copying the JMeter plan files, and running the tests. After the tests, the QA team collects the
reports from each server. The DevOps team then ensures all virtual machines are terminated to optimize resource usage and reduce costs.

However, this manual process is time-consuming and prone to errors. With multiple steps and handoffs between teams, there’s always a
risk of misconfigurations or missed instances, leading to incomplete tests or unnecessary costs. Open Load Fury addresses these
challenges by automating the entire process, from provisioning instances to collecting results and terminating the instances. This not only
saves time but also ensures a more reliable and efficient load testing workflow.

About Open Load Fury

In today’s digital age, ensuring your applications can handle high traffic is more crucial than ever. To address this, effective load testing is
essential. Enter Open Load Fury, an open-source tool that simplifies load testing by leveraging Apache JMeter on AWS EC2 instances. With
Open Load Fury, configuring and deploying load tests is a breeze, thanks to its intuitive YAML configuration files.
By utilizing Open Load Fury, you can quickly establish scalable load testing environments. This allows you to identify performance
bottlenecks and ensure your applications are ready for peak usage. Whether you are a performance engineer or a developer, Load Fury
offers a straightforward yet powerful solution for all your load testing needs. Discover how Load Fury can enhance your load testing process
and ensure your applications remain robust under pressure.

Implementation Steps

Provisioning EC2 Instances
Open Load Fury streamlines the process of provisioning AWS EC2 instances for load testing. It enables you to effortlessly set up EC2
instances across different availability zones or regions, or a combination of both. Additionally, Load Fury can provision spot instances,
providing a cost-effective option for your load testing requirements.
Here is a sample YAML configuration for provisioning EC2 instances:

instances:
- region: ap-south-1
spec:
ImageId: ami-1234567890
InstanceType: t3.xlarge
KeyName: key-name
SecurityGroupIds:
- sg-1234567890
SubnetId: subnet-1234567890
TagSpecifications:
- ResourceType: instance
Tags:
- Key: Name
Value: Loadtest

- region: ap-south-2
spec:
ImageId: ami-0987654321
InstanceType: t3.xlarge
KeyName: key-name
SecurityGroupIds:
- sg-0987654321
SubnetId: subnet-0987654321
TagSpecifications:
- ResourceType: instance
Tags:
- Key: Name
Value: Loadtest

For more arguments, you can refer to the Boto3 run_instances documentation.

Remote execution
Configuring remote servers in Open Load Fury requires specifying the SSH key directory and SSH user. Here’s how you can set it up:

remote_execution:
ssh_key_dir: location to your ssh keys
ssh_user: 'ubuntu'

Load test configuration
Open Load Fury uses Apache JMeter for performing load tests. If JMeter is not installed on your remote servers, Open Load Fury will install
it for you. After installation, it will copy the local JMeter configuration directory to the remote servers and start the load test.

Here’s a sample configuration for running a load test:

loadtest:
name: lt-demo
instance_count: 10
tool: jmeter
install: true
jmeter_version: 5.6.3
jmeter_local_config_dir: jmeter
jmeter_remote_config_dir: jmeter/
jmeter_output_file: result.csv
output_report_dir: loadtest_result
jmeter_plan_file: plan.jmx

After the load test, Open Load Fury collects all the results from the remote instances and merges them into a combined CSV file. It then
terminates all the instances created for the load test. The Apache JMeter binary on the host machine is used to create the final result. If an
S3 bucket configuration is specified, it will upload the result to the S3 bucket.

Benefit

- Scalability: Easily scale the number of instances up or down based on testing requirements.
- Flexibility: Test applications from multiple geographic locations to ensure global performance and reliability.
- Cost-Effective: Utilize on-demand or spot instances to optimize costs.
- Simplicity: Streamlined user interaction through a single YAML configuration file.

Conclusion

Open Load Fury provides a streamlined and efficient approach to load testing. By leveraging the power of AWS EC2 and Apache JMeter, it
enables you to set up scalable load testing environments with ease. Whether you are preparing for peak traffic or identifying performance
bottlenecks, Open Load Fury offers a robust solution to ensure your applications can withstand high traffic loads. Embrace Open Load Fury
for your load testing needs and keep your applications running smoothly under any load.

--

--

Engineering @ PhysicsWallah
Engineering @ PhysicsWallah

No responses yet