Alibaba Cloud VPC Intranet Performance Testing Best Practices

Author: wind up

background

With the rapid development of the Internet, various tools and services derived from the Internet have been integrated into every corner of our work and life. Therefore, the stability of Internet services is becoming more and more important, such as online registration and consultation, online government affairs, and online consumption and entertainment. It is closely related to everyone's life. As an important means of verifying service stability, performance testing is increasingly valued by Internet service providers.

At present, the mainstream performance testing tools in the industry send performance testing requests from the public network to simulate public network traffic, which undoubtedly can simulate the real traffic when users use Internet services as much as possible. However, there are some problems with this method, such as:

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

• Unable to test services that require high security, such as finance, insurance, data storage and other services, if public network access is opened, it may bring security problems such as data leakage, so it is impossible to initiate performance tests from the public network

• Brings an increase in the cost of deployment and transformation. When the service is still in the development process, the service may need to perform frequent performance tests during the development process and adjust the service according to the performance test results. This situation is not suitable for open public network access, so it is impossible to Initiate performance test from the public network

In response to the above problems, this article introduces the method for performing performance testing on the Alibaba Cloud VPC intranet. Compared with the traditional public network performance test, the VPC internal network performance test is completely carried out in the customer's VPC environment, without exposing services to the public network, which is more secure, and users can customize the routing table through the VPC to open up the local data center to form a hybrid The cloud architecture has more flexibility. In addition, in the microservice development stage, performance testing can be performed for each microservice in the VPC intranet, which can greatly improve the efficiency of performance testing and save performance testing costs.

What is Alibaba Cloud VPC Private Network

First, let's introduce what is Alibaba Cloud VPC private network (also called VPC intranet). A VPC private network is your private private network on the cloud. You can fully control your own VPC, such as selecting IP address ranges, configuring routing tables and gateways, etc. You can use Alibaba Cloud resources, such as cloud servers, ApsaraDB for RDS, and load balancing, in your own VPC.

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

insert image description here

Function comparison and features

Compared with the physical connection between different customers in the classic network, the VPC of the private network is safe, reliable, flexible and controllable, flexible and usable, and has strong scalability.

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

• You can flexibly control the inbound and outbound traffic accessing cloud resources in the VPC through security group rules, access control whitelists, etc.

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

In general, the VPC intranet is the basic network facility of Alibaba Cloud, providing customers with the advantages of security and connectivity for services deployed on the cloud.

The difference between public network and VPC intranet performance test

After understanding the basic characteristics of the VPC intranet, I will introduce the difference between the public network performance test and the VPC intranet performance test. From the perspective of the service being tested, the difference between the two is mainly due to the different traffic sources.

• Public network performance test: The traffic originates from the public network, and multiple operators' network devices may be involved in the process of network routing

• VPC intranet performance test: The traffic originates from the VPC intranet, and only the VPC intranet switch is involved in the network routing process, which is invisible to the external network

insert image description here

Because the traffic sources of the two are different, the traffic routing of the two is different. The public network performance test traffic will pass through the public network, while the VPC intranet performance test traffic will only flow within the VPC intranet.

VPC Intranet Performance Test Applicable Scenarios

After understanding the difference between the public network performance test and the VPC intranet performance test, under what circumstances do we need to use the VPC intranet performance test? There are mainly the following situations:

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

Although we can isolate other public network access by whitening the IP of the pressure machine during the performance test, the VPC intranet completely isolates the public network solution, which undoubtedly provides stronger security.

2. In the performance test in the process of new service development, it is necessary to simplify the impact of the network environment on the performance test results, and to evaluate the performance of the service separately.

At present, the microservice architecture is very popular. In each microservice development stage, performance testing for service load may be involved, so as to evaluate the upper limit of the load of each service, which requires the ability to quickly initiate performance testing in the customer R&D environment. Traditional public network performance testing requires customers to open the service to be tested to the public network, which not only brings security risks, but also increases the execution cost of performance testing. The VPC intranet can perfectly solve this demand, and can quickly initiate performance tests for microservices during the development phase.

3. Evaluate the performance of Alibaba Cloud VPC intranet services, such as RDS, MQ and other Alibaba Cloud basic products, such as RDS, MQ and other basic Alibaba Cloud products, as the basic components of customer service, often do not open public network access, so for these components. Performance testing must also be performed within the VPC intranet.

4. Save the cost of performance testing. Compared with the public network performance test, which will incur a large amount of public network bandwidth costs, the VPC intranet performance test is completely performed on the VPC intranet, and the service will not incur additional network bandwidth costs.

When the public network initiates a performance test, for the service under test, a large amount of public network bandwidth process will be generated, which will bring a lot of public network bandwidth costs, while the VPC intranet performance test is completely carried out on the customer's VPC intranet. For the public network performance test, the test cost is greatly reduced.

How to initiate a VPC intranet performance test

Since VPC intranet performance test has many benefits, how to initiate VPC intranet performance test? It is recommended to learn about Alibaba Cloud Performance Testing Service PTS[1].

After activating the PTS service, users can go to the purchase page to purchase the intranet stress test resource package [2] . The minimum cost is only 29 yuan, and you can purchase a resource package of 100,000 VUM (supports 10,000 concurrent tests for 10 minutes). Enter after purchase. PTS console, you can view the corresponding resource package.

insert image description here

Next, you can choose to create a corresponding performance test scenario according to the stress test requirements. Here, the HTTP protocol is used as an example to create a PTS stress test scenario. When the customer enters the scenario editing page for the first time, the customer will be reminded to grant VPC access, so that the PTS Products can access the customer's VPC information. After the authorization is approved, edit the basic information of the scenario. It should be noted that the pressure measurement address can be filled in either the public domain name or the intranet IP, but it is necessary to ensure that the corresponding IP address is in the network segment of the switch before it can be accessed through the switch. Services inside the VPC. For example, this stress test ALB:

insert image description here

Then select the Alibaba Cloud VPC intranet in the stress test source. It should be noted that the region, VPC, security group and switch information here must be consistent with the service under test:

insert image description here

After that, you can initiate debugging and start the test. From the debugging results, you can see that the performance test of the VPC intranet is running smoothly.

insert image description here

Implementation principle of VPC intranet performance test

In order to facilitate the understanding of the use of the VPC intranet performance test, the principle of the VPC intranet performance test is introduced here. Before a customer performs a VPC intranet performance test, the following conditions must be met:

  1. Customers activate VPC services and create corresponding VPC networks, switches and security groups
  2. Start the server in the VPC network and configure security group rules to ensure that the service is accessible in the VPC network
  3. Activate the PTS service and purchase the resource package, enter the PTS console to authorize the PTS service to access the customer's VPC service, so that the authorized service can access the customer's VPC, switch, security group and other services

After the scenario construction is completed and the VPC intranet performance test is initiated, the PTS side will perform the following steps:

  1. Obtain the VPC-related information filled in by the customer, and create a free ENI elastic network card in the customer-side VPC[3]
  2. Mount the ENIC created on the client side to the PTS press
  3. Routes added to the customer switch segment on the presser to enable the presser to access services within the client-side VPC
  4. Configure routing rules to prohibit access to the public network to ensure that traffic is only sent from the VPC intranet
  5. The pressure test starts, and the request is sent according to the customer's configuration
  6. After stopping the pressure test, uninstall and delete the elastic network card from the pressure machine

insert image description here

VPC intranet performance test under multi-protocol

In addition to the VPC intranet performance test that supports the HTTP protocol, PTS also supports other protocols and performance tests of Alibaba Cloud's basic products, such as MQTT, Reids, MQ, etc. Welcome to the PTS console to experience the corresponding functions.

insert image description here

Best Practices for VPC Intranet Performance Testing

When performing a performance test on a service, it can be simply divided into a single-link performance test and a full-link performance test from the scope of the tested link.

• Single-link performance test: Only a part of the link is covered in the performance test process, the test range is relatively accurate, and the stability of a certain link is verified; the number of participants is small, the execution cost is low, and the test can be executed multiple times. Fully verified.

• Full-link performance test: During the performance test, all links that may be involved in the service are covered. The test range is large enough and involves many upstream and downstream, so as to ensure that the performance bottleneck point can be found globally and the global stability can be verified; The testing process involves a large number of participants. It is a complex system project with high execution costs and requires strict control of the number of tests.

The cost of the full-link performance test is relatively high. Therefore, it is generally necessary to perform the full-link performance test after each single link has passed the performance test several times. Due to the high frequency of single-link performance tests, it is recommended to use the lower-cost VPC intranet performance test as much as possible during the single-link performance test to save performance test costs; configure services after all single-link performance tests pass , open public network access, and accept all service links through the full-link performance test under the public network.

VPC Intranet Stress Test - Special Price During Purchase Season

Compared with the public network, the purchase cost can be greatly reduced by purchasing the internal network pressure test resource package. The cost is only 1/10 of the public network pressure test.

And now it's the procurement season, all specifications are discounted by 5%, and you can also stack the official website discount.

insert image description here

Related Links

[1] Alibaba Cloud Performance Testing Service PTS

https://www.aliyun.com/product/pts

[2] Purchase the intranet stress test resource package

https://common-buy.aliyun.com/?commodityCode=pts_bag_dp_cn

[3] ENI elastic network card

https://help.aliyun.com/document_detail/58496.html

Click here to purchase the intranet stress test resource package. Publish the latest information on cloud native technology, gather the most comprehensive content of cloud native technology, regularly hold cloud native events, live broadcasts, and release Alibaba products and user best practices. Explore cloud-native technologies side by side with you and share the cloud-native content you need.

Follow the official account of [Alibaba Cloud Native] to get more real-time information about cloud native!

{{o.name}}
{{m.name}}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326603713&siteId=291194637