Alibaba Cloud VPC Intranet Performance Test Best Practices


With the rapid development of the Internet, various tools and services derived from it have already integrated into every corner of our work and life. Therefore, the stability of Internet services is becoming increasingly important, such as online registration and consultation, online government affairs, online consumption and entertainment, which are closely related to everyone's lives. Performance testing, as an important means of verifying service stability, is increasingly being valued by internet service providers.

At present, the mainstream performance testing tools in the industry all send performance testing requests from public networks to simulate public network traffic, which undoubtedly can simulate the real traffic of users when using internet services as much as possible. However, this method also has some problems, such as:

• Bringing additional performance testing costs. During the process of transferring public network traffic from the client to the server through multiple operator networks, additional traffic bandwidth costs will be incurred. For large-scale performance testing, the traffic cost will far exceed the machine cost during the performance testing process

Unable to test services that require high security requirements, such as finance, insurance, data storage, etc. If open to public network access, it may cause security issues such as data leakage, so performance testing cannot be initiated from the public network

• Bringing an increase in deployment and transformation costs. While services are still in the development process, they may need to undergo frequent performance testing and adjust services based on performance testing results. This situation is not suitable for open public network access, so performance testing cannot be initiated from the public network

In response to the above issues, this article introduces the method of performing performance testing on the Alibaba Cloud VPC intranet. Compared to traditional public network performance testing, VPC internal network performance testing is entirely conducted in the customer VPC environment, without the need to expose services to the public network, with higher security. Users can use VPC custom routing tables to connect local data centers to form a hybrid cloud architecture, which has stronger flexibility. In addition, performance testing can be carried out for each microservice in the VPC internal network during the microservice development phase, It can significantly improve the efficiency of performance testing and save performance testing costs.

What is Alibaba Cloud VPC Private Network

Firstly, let's introduce what Alibaba Cloud VPC Private Network (also known as VPC Intranet) is. VPC proprietary network is your proprietary cloud based private network. You can have complete control over your private network, such as selecting IP address ranges, configuring routing tables, and gateways. You can use Alibaba Cloud resources such as cloud servers, cloud database RDS, and load balancing in your defined private network.

As shown in the figure below, each private network consists of at least one private network segment, one router, and at least one switch.

Function comparison and characteristics

Compared to classical networks that are physically connected between different customers, VPCs in proprietary networks have the advantages of security, reliability, flexibility, controllability, availability, and strong scalability.

Each VPC network corresponds to a virtualization network, and VPCs are isolated from each other

Flexible control of access to cloud resources within VPC through security group rules, access control whitelists, and other methods

Different subnets can be created within the VPC, and can also be connected to local data centers or other VPCs to expand network architecture

Overall, the VPC intranet is Alibaba Cloud's basic network infrastructure, providing customers with the advantages of security and connectivity in deploying services on the cloud.

Differences in performance testing between public and VPC internal networks

After understanding the basic characteristics of VPC intranet, introduce the difference between public network performance testing and VPC intranet performance testing. From the perspective of the tested service, the main difference between the two lies in the different sources of traffic.

• Public network performance testing: Traffic originates from public networks, and the process of network routing may involve multiple operator network devices

• VPC intranet performance test: traffic originates from VPC intranet, and only VPC intranet switches are involved in network routing, which is invisible to external networks

Because the traffic sources of the two are different, their traffic routes are different. The public network performance test traffic will pass through the public network, while the VPC internal network performance test traffic will only flow through the VPC internal network.

Applicable scenarios for VPC intranet performance testing

After understanding the difference between public network performance testing and VPC internal network performance testing, when do we need to use VPC internal network performance testing? There are several main occasions:

1. Services are sensitive to security and cannot be opened to public networks, such as finance, insurance, and other businesses that require high security requirements

Although we can isolate other public network access by adding white to the IP address of the pressure machine during performance testing, the VPC internal network completely isolates the public network solution, undoubtedly providing stronger security.

2. During the development process of new services, it is necessary to simplify the impact of network environment on performance testing results and evaluate the performance of the services separately.

The current microservice architecture is popular, and in various stages of microservice development, performance testing may be involved to assess the load limit of each service, which requires the ability to quickly initiate performance testing in the customer's research and development environment. Traditional public network performance testing requires customers to open the services to be tested to the public network, which not only poses security risks but also increases the execution cost of performance testing. The VPC intranet can perfectly address this demand and quickly initiate performance testing for microservices during the development phase.

3. Evaluate the performance of Alibaba Cloud VPC internal network services, such as RDS, MQ, and other Alibaba Cloud basic products

Alibaba Cloud's basic products such as RDS and MQ, as basic components of customer service, often do not have public network access. Therefore, performance testing for these components must also be conducted on the VPC intranet.

4. Save on the cost of performance testing. Compared to public network performance testing, it incurs a significant amount of public bandwidth costs. VPC internal network performance testing is entirely conducted on the VPC internal network, and the service does not incur additional network bandwidth costs.

When conducting performance testing on the public network, a large amount of public bandwidth processes will be generated for the tested service, resulting in a large amount of public bandwidth costs. VPC internal network performance testing is entirely conducted on the customer's VPC internal network, so compared to public network performance testing, the testing cost is significantly reduced.

How to initiate VPC intranet performance testing

Since VPC intranet performance testing has many benefits, how can we initiate VPC intranet performance testing? Here, we recommend learning about Alibaba Cloud Performance Testing Service PTS [1].

After activating the PTS service, users can go to the purchase page to purchase an internal network pressure testing resource package [2]. For a minimum of 29 yuan, they can purchase a 100000 VUM resource package (supporting 10000 concurrent testing for 10 minutes). After purchasing, they can enter the PTS console to view the corresponding resource package.

Next, according to the pressure testing requirements, you can choose to create a corresponding performance testing scenario. Here, using the HTTP protocol as an example, create a PTS pressure testing scenario. When the customer enters the scenario editing page for the first time, they will be reminded to grant VPC access permissions, so that the PTS product can access the customer's VPC information. After authorization and consent, edit the basic information of the scene. It should be noted that the pressure test address can be filled in either the public domain name or the internal IP address, but both must ensure that the corresponding IP address is within the switch network segment before accessing VPC internal services through the switch. For example, here, pressure test ALB:

After selecting the Alibaba Cloud VPC intranet from the pressure testing source, it should be noted that the region, VPC, security group, and switch information here must be consistent with the tested service:

Afterwards, initiate debugging and start testing. From the debugging results, it can be seen that the performance testing of the VPC intranet is progressing smoothly.

The Implementation Principle of VPC Intranet Performance Testing

To facilitate the understanding of the use of VPC intranet performance testing, this article introduces the principles of VPC intranet performance testing. Before the customer performs VPC intranet performance testing, the following conditions need to be met:

1. Customers activate VPC services and create corresponding VPC networks, switches, and security groups

2. Start the server within the VPC network and configure security group rules to ensure that the service is accessible within the VPC network

3. Activate PTS services and purchase resource packages, enter the PTS console to authorize PTS services to access customers' VPC services, so that authorized services can access customers' VPC, switches, security groups, and other services

When the scenario construction is completed and VPC intranet performance testing is initiated, the PTS side will mainly perform the following steps:

1. Obtain the VPC related information filled out by the customer and create a free ENI elastic network card within the VPC on the customer's side [3]

2. Mount the elastic network card created on the customer side to the PTS pressure machine

3. Add a route to the client switch network segment on the pressure machine to enable it to access services within the client side VPC

4. Configure routing rules to prohibit access to public networks, ensuring that traffic is only sent from the VPC intranet

5. Start pressure testing and send requests according to customer configuration

6. After stopping the pressure test, unload and remove the elastic network card from the pressure machine

VPC intranet performance testing under multiple protocols

In addition to supporting VPC internal network performance testing with HTTP protocol, PTS also supports other protocols and performance testing of Alibaba Cloud's basic products, such as MQTT, Reids, MQ, etc. Welcome to the PTS console to experience the corresponding functions.

Best Practices for VPC Intranet Performance Testing

When performing performance testing on services, it can be simply divided into single link performance testing and full link performance testing based on the scope of the tested link.

Single link performance testing: During the performance testing process, only a portion of the links are covered, and the testing range is relatively accurate to verify the stability of a certain link; During the testing process, the number of participants is relatively small, and the execution cost is low. Multiple tests can be performed to fully validate.

Full link performance testing: During the performance testing process, it covers all links that may be involved in the service, with a large enough testing range and involving a large number of upstream and downstream, to ensure that performance bottlenecks can be found globally and verify global stability; The testing process involves a large number of participants and is a complex system engineering with high execution costs, requiring strict control over the number of tests.

The cost of full link performance testing is relatively high, so it is generally necessary to perform full link performance testing on each single link after passing multiple performance tests. Due to the high frequency of single link performance testing, it is recommended to use VPC internal network performance testing with lower cost as much as possible during the single link performance testing process to save performance testing costs; After passing all single link performance tests, configure the service, open public network access, and accept all service links through full link performance testing under the public network.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00

phone Contact Us