Amazon AWS tagging capability is powerful and yet little used in load testing. Redline13 has supported AWS instance tagging for years. These tags can be set globally for all load tests under the account settings page, and also individually for each server though our API. RedLine13 has now increased the number of tags to give you more control and better load testing with AWS instance Tagging. At the end we’ve included how two customers are using AWS Instance Tagging.
We previously wrote about RedLine13 support for AWS Instance Tagging where you can create your own tags. But first, let’s talk about what tags are and how they can be used.
AWS has a User’s Guide: Tagging Your Amazon EC2 Resources. This explains how it helps you “manage your instances, images, and other Amazon EC2 resources”. It also says that you can “optionally assign your own metadata to each resource in the form of tags. This topic describes tags and shows you how to create them.”
RedLine13 supports the ability to create your own custom tags. The tag limit for free accounts has increased from one to two. And now RedLine13 has increased the tag limit to 10 for all paid accounts (Basic, Pro and Enterprise).
You can use EC2 tags for many things. They can help you group instances in the AWS console, run cost reports based on tags, set up AWS permissions based on the tags, and much more. Some users use them to tag resources by environment and type and then use that to run appropriate server updates on the right instances.
Defining Global Tags Using in Settings
You define tags that will be assigned to all servers for every test that you run through the settings page. You can access this page from the “Your Settings” option under the “Account” menu on the main navigation bar:
On that page, if you scroll down to the “Instance Tagging” section you will be able to define multiple “Key” and “Value” pairs which correspond to EC2 tags:
Any tags that are defined here will be applied to every load generator server and for every test that you run.
Defining Tags Using the RedLine13 API
Another way that you can define EC2 tags is though the RedLine13 API. When using the /POST endpoint you can attach tags as a “key” and “value” pair to each type of load generator server you add to your test. The syntax for adding these parameters would be as follows:
In the above, “x” would correspond to the index of the EC2 server type that you want to add the tag to (e.g., m3.medium). Server indices within API calls are zero-based, therefore the first server you define will have an index of “0”, the next server will have an index of “1”, and so-on. The value for “y” would also be a zero-based index and correspond to the tag you are adding. For simplicity, if you only have one server type, and one key/value pair to add as an EC2 tag, then both x and y would be “0”.
To illustrate as a complete example (with sensitive information masked) the entire request as called from cURL would be similar to:
curl --location --request POST 'https://www.redline13.com/Api/LoadTest' \ --header 'X-Redline-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \ --header 'Content-Type: application/form-data' \ --header 'Cookie: user=subscriber' \ --form 'testType="jmeter-test"' \ --form 'file=@"/local_drive/folder/JMeter_Test_Plan.jmx"' \ --form 'name="AWS Server Tag POC"' \ --form 'numServers="1"' \ --form 'storeOutput="T"' \ --form 'servers[location]="us-east-1"' \ --form 'servers[subnetId]="subnet-xxxxxxxx"' \ --form 'servers[size]="t3.micro"' \ --form 'servers[num]="1"' \ --form 'servers[onDemand]="T"' \ --form 'servers[usersPerServer]="1"' \ --form 'servers[tags][key]="Demo Tag"' \ --form 'servers[tags][value]="Tag Content"'
In the above example, a tag with the key “Demo Tag” would be attached to the provisioned t3.micro instance for this test, with a value of “Tag Content“. You may modify the above example for your own needs by changing the parameters to suit your particular test case.
How Users Are Using AWS Instance Tagging
It allows us to have a more precise control of the EC2 instance. For examples:
- To control the accurate price (we have AWS discount price) by applications (and not only by load test)
- To avoid that AWS Lambda does something, such as stop EC2 instance during the night, in EC2 RedLine13 injector
- To avoid monitoring EC2 RedLine13 injector by Dynatrace and Datadog (RedLine13 already do it) and paid for it
Ben Loveridge of Gradecam:
GradeCam uses AWS for a variety of purposes, including managing EC2 instances for load tests we run via RedLine 13. Using the RedLine 13 API, we are able to automate the scheduling and execution of different types of load tests, for different scenarios and different purposes. By defining instance tags when scheduling load tests, we are able to easily track AWS usage across teams and purpose (e.g. ops scale testing, qa regression testing, and so on). This facilitates financial reporting and budgeting, as well as allowing us to easily view and correlate across different initiatives within the company.
RedLine13 gives you better load testing with AWS instance Tagging. Check it out and run your own test on RedLine13.