When you run a performance test, you may need to direct traffic to a specific server rather than the address returned by DNS -- for example, to load-test a staging environment without changing DNS records. Domain name binding in Performance Testing Service (PTS) routes testing traffic directly to a specified IP address during the test.
For example, if api.example.com normally resolves to a production server at 203.0.113.10, binding it to 198.51.100.20 routes all test requests to 198.51.100.20 instead.
Use cases
Domain name and IP address binding is suitable for scenarios in which you need to quickly switch tested addresses, such as directing traffic between test and production environments.
| Scenario | Domain name | Binding target | Result |
|---|---|---|---|
| Isolate test traffic from production | api.example.com | 198.51.100.20 (test server) | Load test traffic bypasses the production server |
| Test services in a VPC | api.example.com | 10.0.0.15 (VPC internal address) | Test traffic reaches services not exposed to the public internet |
For VPC-specific setup, see Performance testing in an Alibaba Cloud VPC.
Set up domain name bindings
Prerequisites
Before you begin, make sure you have:
A configured test scenario in PTS with Scenario Settings completed
Add a binding
Open your test scenario.
Expand the Advanced Settings section.
In the Domain name binding section, enter the following:
Field Description Example Domain name The domain name to override api.example.comIP address The target IP address that receives test traffic 198.51.100.20
Click Save.
After you save, PTS routes all test traffic for the specified domain name to the bound IP address.
See also
Performance testing in an Alibaba Cloud VPC -- Run performance tests against services inside a VPC.