Using Amazon VPC to Run Load Tests

Applies to ReadyAPI 3.52, last modified on April 18, 2024

You can run load tests from Amazon Virtual Private Cloud (VPC). This may be useful if you are going to run load tests in regions where EC2 Classic is not supported (for example, Frankfurt, Seoul, Mumbai), or to create a network with additional servers that can store information for load tests.

About Amazon VPC

Amazon Virtual Private Cloud (Amazon VPC) helps you launch instances in a defined virtual network. The structure of the virtual private network is similar to a traditional network you use in data centers.

To start instances in VPC, you create subnets. A subnet has a number of IP addresses that can be used to create Amazon EC2 instances.

Find more information about Amazon VPC in the Amazon online documentation

Requirements

To start LoadUI agent in your Amazon VPC subnet, you need the following:

  • A VPC with a public subnet where public IPs are assigned automatically.

  • Access to the subnet instances on the port the agent will use. By default, the agents use port 1991.

Quick Start Guide

This quick start scenario explains how you can create a virtual private cloud (VPC) with a single public subnet and an Internet gateway that enables ReadyAPI to connect to instances inside the subnet.

Creating VPC

First, you need to create a VPC:

  • Log in to Amazon Web Services Console and select VPC.

    API distributed cloud testing with ReadyAPI: Amazon Web Services

    Click the image to enlarge it.

  • On the VPC Dashboard page, select Start VPC Wizard.

    API distributed cloud testing with ReadyAPI: Start VPC Wizard

    Click the image to enlarge it.

  • Make sure the VPC with a Single Public Subnet option is active and click Select. The other options create more complex networks which are more difficult to manage.

    API distributed cloud testing with ReadyAPI: VPC with a Single Public Subnet

    Click the image to enlarge it.

  • Configure IP ranges and specify the names of your VPC and subnet. If you are not sure what to do, just enter VPC name and Subnet name and leave the other fields at default values.

    API distributed cloud testing with ReadyAPI: VPC Configuration

    Click the image to enlarge it.

  • Amazon will create a VPC with a subnet that can be used for load tests.

Verifying the Created VPC

Amazon Wizard will automatically configure the VPC so that you can run load tests in the cloud. Still, we need to make sure the VPC is configured correctly:

  • Switch to the Subnets page. Make sure Auto-assign Public IP is set to Yes. If it is not, select Subnet Actions > Modify Auto-Assign Public IP and enable auto-assigning IPs.

    API distributed cloud testing with ReadyAPI: The Subnets Pag

    Click the image to enlarge it.

  • Switch to Internet Gateways and make sure there is a gateway attached to your VPC:

    API distributed cloud testing with ReadyAPI: Internet Gateways

    Click the image to enlarge it.

  • Switch to the Route Tables page and make sure there is an item that refers to your VPC. Select it and switch to the Routes tab. It should have a route with 0.0.0.0/0Destination and your gatewayTarget.

    API distributed cloud testing with ReadyAPI: Route Tables

    Click the image to enlarge it.

Running Load Tests in a VPC

Running load tests in a VPC is similar to running them in Amazon EC2. The only difference is that instead of selecting the EC2 Classic network, you select the network and subnet you created.

API distributed cloud testing with ReadyAPI: Running Load Tests in a VPC

Click the image to enlarge it.

See Also

Creating Custom Amazon Machine Images
Estimating the Cloud Test Price

Highlight search results