Using Private Resource Groups to Perform Pressure Tests Through the Private Network in the Same VPC
Overview
Scenarios
You can perform a pressure test on backend services via the private network in the same VPC. This method eliminates network interference and lowers test costs. You can systematically verify core components' performance in a highly controllable environment. This is especially suitable for optimizing complex architectures internally and verifying high-risk changes beforehand.
Advantages
- Reduced network interference and enhanced accuracy: Private networks eliminate congestion and cross-carrier jitter that may occur on public networks, providing more stable transmissions with lower latency. This helps test results more accurately reflect service performance.
- Costs-effectiveness: Performing pressure tests via private networks eliminates expensive bandwidth costs of public networks.
- More stable and controllable environment: Customers use their private resource groups to conduct pressure tests via private networks, rather than sharing execution nodes with others. They can customize the configurations of the debugging and execution nodes to enhance resource stability.
Constraints
Private networks cannot replace the actual public network user paths, for example, CDN acceleration, global network delay, and weak mobile network. Adopt a combined testing strategy based on your service characteristics.
Procedure
Step 1: Create a Private Resource Group
Step 3: Create and Start a Pressure Test Task via the Private Network and View Results
Step 1: Create a Private Resource Group
- Log in to the CodeArts PerfTest console.
- Choose Resource Groups in the navigation pane, and click Create Private Resource Group.
- (Optional) If this is the first time you create a private resource group, grant CodeArts PerfTest permissions necessary for creating private resource groups.
- On the page for creating a resource group, perform the following operations based on the actual situation:
- If you do not have a CCE cluster, create a cluster and then create a resource group.
- If a CCE cluster is available, create a resource group.
- Create a cluster.
- In the upper part of the page, click create one to access the page for buying a CCE cluster. For details about how to create a cluster, see Buying a CCE Standard/Turbo Cluster. You can also set cluster parameters by referring to Table 1 and retain the default values for other parameters.
Table 1 Cluster parameters Parameter
Description
Example Value
Type
Select CCE Standard Cluster or CCE Turbo Cluster as required.
CCE Standard Cluster
Billing Mode
Select a billing mode as required.
Pay-per-use
Cluster Name
Enter a cluster name. Cluster names in the same account must be unique.
perftest01
Enterprise Project
Select an enterprise project as required. This parameter is only available for enterprise users who have enabled Enterprise Project Management Service (EPS).
default
Cluster Version
Select the Kubernetes version used by the cluster.
Select the recommended version.
Cluster Scale
Select the maximum number of nodes that can be managed by the cluster.
Nodes: 50
VPC
Select the VPC to which the cluster belongs. If no VPC is available, click Create VPC to create one.
-
Default Node Subnet
Select the subnet to which the nodes belong. If no subnet is available, click Create Subnet to create one.
-
Network Model
Tunnel network is recommended.
Tunnel network
- Click Next: Select Add-on. On the page displayed, select the add-ons to be installed during cluster creation. When selecting add-ons, retain the default settings for the test executor. For example, deselect unnecessary add-ons, such as NodeLocal DNSCache and Cloud Native Cluster Monitoring, to prevent the add-ons from occupying executor resources.
- Click Next: Configure Add-on. On the displayed page, retain the default settings.
- Click Next: Confirm Settings. After confirming that the cluster configurations are correct, select I have read and understood the preceding instructions and click Submit. It takes about 6 to 10 minutes to create a cluster.
- After the cluster is created, return to the cluster management page and click Create Node. For details about how to create a node, see Creating a Node. You can also set node parameters by referring to Table 2 and retain the default values for other parameters.
Table 2 Node parameters Parameter
Description
Example Value
Billing Mode
Select a billing mode as required.
Pay-per-use
Specifications
Select node flavors as needed. Select General computing-plus and at least 4 CPU cores and 8 GiB of memory.
-
OS
Select EulerOS.
EulerOS
Nodes
At least two nodes (one debugging node and one execution node) are required. The number of nodes depends on the specifications of the pressure test object.
2
- Click Next: Confirm. After confirming that the node configurations are correct, select I have read and agree to CCE Disclaimer and click Submit. After the node is created, return to the CodeArts PerfTest console.
- In the upper part of the page, click create one to access the page for buying a CCE cluster. For details about how to create a cluster, see Buying a CCE Standard/Turbo Cluster. You can also set cluster parameters by referring to Table 1 and retain the default values for other parameters.
- Create a resource group.
- Choose Resource Groups in the navigation pane, and click Create Private Resource Group.
Configure the parameters as described in Table 3.
Table 3 Creating a private resource group Parameter
Description
Example Value
Resource Group Name
Name of the private resource group to be created.
perftest-cce-001
Debugging Cluster
Select a CCE cluster from the drop-down list.
perftest01
Debug Node
Select the management node that performs a pressure test.
The debugging node cannot be changed after the resource group is created.
-
Execution Node
Select the target machine that a pressure test will be performed on and provides performance data during testing.
-
- Click Create.
- Choose Resource Groups in the navigation pane, and click Create Private Resource Group.
Step 2: Create a Test Case
- In the navigation pane, choose PerfTest Projects. Click Create Test Project. Enter a project name (for example, net-test), enter descriptions, and click OK.
- In the PerfTest project list, click net-test. On the Cases tab, compile a test case.
- Compile the test case by modifying the sample case.
- Compile the test case by binding domain names. This maps domain names to specific IP addresses, eliminating the need to modify the domain names.
On the Cases tab, click Domain name binding. In the displayed dialog box, click Adding a domain name. Enter a domain name and its target IP address to resolve to. To add more IP addresses, click +. During resolution, requests will be distributed across all added IP addresses. After IP addresses are added, click
.
Figure 2 Binding domain names
- After the test case is compiled, click Save.
- Click Debug, select the private resource group perftest-cce-001 created in Step 1: Create a Private Resource Group as the executor, and click Start to debug the test case. If an error is reported in the debugging result, edit the case based on the log information and debug the case again until no errors are reported.
Step 3: Create and Start a Pressure Test Task via the Private Network and View Results
- On the Test Tasks tab, click Create Task. Enter a test task name, for example, net-task.
- Click Add Case, select the test case compiled in Step 2: Create a Test Case, and click OK.
- Click Save. The test task is created.
- On the Test Tasks tab, click
in the Operation column of the created test task. In the displayed dialog box, set Resource Group Type to the private resource group perftest-cce-001 created in Step 1: Create a Private Resource Group, select Confirm that this pressure test is approved and complies with local laws, and click Start to execute the test task.
Figure 3 Starting a test task - Click View Report in the displayed dialog box to view the real-time test report.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot