All Products
Search
Document Center

Performance Testing:Run performance tests in a VPC

Last Updated:Mar 11, 2026

Need to load-test a service that is not exposed to the public internet? Performance Testing (PTS) can deploy load generators directly inside your Alibaba Cloud Virtual Private Cloud (VPC), keeping all test traffic on the internal network. This eliminates the need for public endpoints or temporary firewall changes during testing.

PTS supports two scenarios:

  • Single-instance testing -- Test a service running on one Elastic Compute Service (ECS) instance.

  • Multi-instance testing -- Test a service distributed across multiple ECS instances behind a Classic Load Balancer (CLB).

How it works

When you set Source of Stress to Alibaba Cloud VPC, PTS deploys load generator instances into a vSwitch in the selected VPC and region. These generators send requests to your application over the internal network using private IP addresses, bypassing the public internet entirely.

Prerequisites

Before you start, make sure your environment meets the following requirements:

RequirementDetails
VPC selectionYou must select a VPC in which the service under test resides.
Private IP addressesAll API endpoints in your test scenario must use private IP addresses or domain names that resolve to private IP addresses. See Domain name-IP address binding.
Single-region scopeEach test scenario supports only one region. All endpoints must be reachable on the internal network within that region.
Available vSwitch IP addressesThe selected vSwitch must have more idle IP addresses than the number of load generators for the test. If the vSwitch runs out of IP addresses, PTS cannot deploy generators.
Security group rulesInternal network access can only be granted manually. Add the CIDR block of the vSwitch to the private IP address whitelist of the service under test. Make sure outbound traffic is not restricted in the security groups used by the service. Security groups managed by other cloud services are not supported. For details, see ECS security group rules and SLB access control.
Leased line connectivity (if applicable)If the VPC connects to a third-party cloud or on-premises data center through a leased line, make sure the VPC and the remote network share the same CIDR block (for example, 10.0.0.0/8).

Test a service on a single ECS instance

  1. Log on to the PTS console.

  2. In the left-side navigation pane, choose Performance Test > Create Scenario, and then click PTS.

  3. On the Scenario Settings tab, configure the test scenario. For details, see Create a PTS scenario.

  4. In the Stress Mode Configuration section, set Source of Stress to Alibaba Cloud VPC, and then select the target region and VPC.

  5. Click Save and Start Testing.

Test a service across multiple ECS instances

To test a service distributed across multiple ECS instances, place a CLB instance in front of the ECS instances and point PTS at the CLB private IP address.

Step 1: Create a CLB instance

  1. Log on to the SLB console.

  2. In the left-side navigation pane, click Instances.

  3. On the Instances page, click Create CLB.

  4. Set Instance Type to Intranet and Network Type to VPC. Configure other parameters as needed. For details, see Create and manage a CLB instance.

  5. Click Buy Now.

  6. Back on the Instances page, find the new CLB instance and click Configure Listener in the Actions column. For listener configuration details, see CLB listeners.

    Note
    • In the Protocol & Listener step, the Access Control switch in Advanced Settings is off by default. Keep it off to allow test traffic.

Step 2: Configure and run the test

  1. Log on to the PTS console.

  2. In the left-side navigation pane, choose Performance Test > Create Scenario, and then click PTS.

  3. On the Scenario Settings tab, configure the test scenario. For details, see Create a PTS scenario.

  4. In the Stress Mode Configuration section, set Source of Stress to Alibaba Cloud VPC, and then select the region and VPC where the CLB instance resides.

  5. Click Save and Start Testing.

Limits

LimitDetails
Maximum throughput20,000 to 100,000 transactions per second (TPS), depending on the region.
Security groupsSecurity groups managed by cloud services are not supported as test targets.

Billing

Creating a CLB instance for multi-instance testing incurs additional fees. Choose a CLB specification that matches your expected throughput -- an undersized CLB can become the bottleneck during performance testing.

What's next