How to do Load Testing in AWS?
What is distributed load testing?
Distributed Load Testing is where a heavy load is generated using multiple load generators. In standard load testing, the load is generated from a single machine, but to test huge user demand in real time, we may need to distribute the load across different devices in different geolocations.
Step 1)
Sign in to your AWS console.
Now AWS load testing creates a stack to test your site. This bears some cost. If you don't have idea about ClodFormation Template and Stack and CloudFront then click on this link Distributed Load Testing AWS to learn more about distributed load testing.
If you know about this then Click on this link Launch the CloudFormation template in AWS console . It will take you to your console if not signed in. Else it will take you to the page below:-
If you click on view in Designer you will see a page like this below. from there you can edit your cloud formation stack as you wish.
Step 2)
Save that or close that if you don't need to edit anything. Then click on Next.
Step 3)
This will take you to the next step 2.
Fill in the information that is required. If you have created a VPC and your EC2 instance is in that VPC then choose your VPC. Else choose default VPC. Click on Next.
Step 3)
This will take you to the next step 3.
You have to create a IAM role, If not already created. The rest of it can be left as it is.
Step 4)
This will take you to the next step 4. Review all of the settings that you just set.
Click on submit. This will take about 15-25 minutes to create the stack.
Step 5)
Search Cloudfront on the search bar and click on that. It will take you to the page below.
There is no distribution in the screenshot I have provided. But you should have a distribution there. And if you click on that it will show details about that. There you will see a link like this:
https://dxyzelmenop.cloudfront.net/
Step 6)
Copy the link and open it in another tab. It should show a sign-in page. Give user credentials that you set in step 3.
Step 7)
It will take you to the page below:
Here I have already created a test. But you will not have any tests there.
Step 8)
Click on CREATE TEST from the header menu. It will show something like below:
Step 9)
Name: Give any name you want.
Description: Whatever you want.
Task Count: How many containers you want. ( Don't know anything about containers? can't explain it here. Will explain in another post hopefully. )
Concurrency: How many users do you want at a time.
Region: Choose any region from the option provided.
Ramp Up: It explains how many minutes or seconds it will take to get to your concurrency number. For example, if you give 1000 in the concurrency and ramp up as 5 seconds then it will take 5 second to go to the 1000 user number.
Hold For: It will hold that 1000 users for the given time.
Test Type: You can choose single HTTP Endpoint or Jmeter Script(It is a tool that is used for scripting test. More on this later..).
HTTP endpoint under test: in this field give the link where you want to test the load. For example, https://google.com .
HTTP Method: Whichever method you want to choose. If you want to know how many POST method your site can handle at a single time you can select POST here. Or simply to check how many visitor can visit at a time you can choose GET.
No comments