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:
| Requirement | Details |
|---|---|
| VPC selection | You must select a VPC in which the service under test resides. |
| Private IP addresses | All 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 scope | Each test scenario supports only one region. All endpoints must be reachable on the internal network within that region. |
| Available vSwitch IP addresses | The 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 rules | Internal 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
Log on to the PTS console.
In the left-side navigation pane, choose Performance Test > Create Scenario, and then click PTS.
On the Scenario Settings tab, configure the test scenario. For details, see Create a PTS scenario.
In the Stress Mode Configuration section, set Source of Stress to Alibaba Cloud VPC, and then select the target region and VPC.
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
Log on to the SLB console.
In the left-side navigation pane, click Instances.
On the Instances page, click Create CLB.
Set Instance Type to Intranet and Network Type to VPC. Configure other parameters as needed. For details, see Create and manage a CLB instance.
Click Buy Now.
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.
NoteIn 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
Log on to the PTS console.
In the left-side navigation pane, choose Performance Test > Create Scenario, and then click PTS.
On the Scenario Settings tab, configure the test scenario. For details, see Create a PTS scenario.
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.
Click Save and Start Testing.
Limits
| Limit | Details |
|---|---|
| Maximum throughput | 20,000 to 100,000 transactions per second (TPS), depending on the region. |
| Security groups | Security 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
Create a PTS scenario -- Set up test parameters, request configurations, and load models.
Domain name-IP address binding -- Map domain names to private IP addresses for VPC-based testing.