CN107070752B - Testing method and testing system for long connection capacity - Google Patents

Testing method and testing system for long connection capacity Download PDF

Info

Publication number
CN107070752B
CN107070752B CN201710278749.6A CN201710278749A CN107070752B CN 107070752 B CN107070752 B CN 107070752B CN 201710278749 A CN201710278749 A CN 201710278749A CN 107070752 B CN107070752 B CN 107070752B
Authority
CN
China
Prior art keywords
service server
client
server
service
long connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710278749.6A
Other languages
Chinese (zh)
Other versions
CN107070752A (en
Inventor
陈宏亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sifo Technology Co ltd
Original Assignee
深圳市世纪福科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市世纪福科技有限公司 filed Critical 深圳市世纪福科技有限公司
Priority to CN201710278749.6A priority Critical patent/CN107070752B/en
Publication of CN107070752A publication Critical patent/CN107070752A/en
Application granted granted Critical
Publication of CN107070752B publication Critical patent/CN107070752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Abstract

The invention discloses a method for testing long connection capacity, which comprises the following steps: s10, the client reads the configuration file on the virtual server; s20, the client initiates a long connection request to the monitoring port of the service server through the virtual server according to the configuration file; s30, detecting the performance consumption parameters of the virtual server and the service server in real time according to the long connection established between the client and the service server; and S40, when the performance consumption parameters of the virtual server and/or the service server reach the preset performance consumption parameters, the client stops initiating the long connection request, and records the number of the long connections established between the client and the service server. The invention uses the simplest and lowest cost method to obtain the long connection quantity of the system under the condition of setting the hardware index and ensuring the stable operation of the system.

Description

Testing method and testing system for long connection capacity
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a method and a system for testing long connection capacity.
Background
A long connection refers to a connection that can continuously send multiple data packets after a persistent connection between a client (smart device) and a cloud server system. During the connection holding period, if no data packet is sent, both sides are required to send a link heartbeat detection packet.
The long connection is mostly used for communication with frequent operation and point-to-point, each TCP connection needs three-step handshaking, and each step of handshaking needs a certain time. If the connection is long, each operation is not disconnected after the operation is finished, and a TCP connection is not required to be established in the next operation, and the data packet is directly sent. In the case of a short connection, the TCP connection needs to be re-established every operation, and the processing speed is greatly reduced.
At present, a long connection is widely used in a push system of a mobile phone APP and an intelligent device behind an NAT network, and the long connection penetrates through the NAT network to communicate with a server and receive a remote control command.
For a system that needs to support tens of millions of long connections, it is important to measure the number of long connections that the system can support. Theoretically, the maximum value of the number of long connections is not necessarily the most appropriate value for stable operation of the system. According to hardware indexes and resource allocation of the system, determining the maximum value of the number of long connections is particularly important on the premise that the system stably operates.
Disclosure of Invention
The technical scheme provided by the invention is as follows:
the invention provides a method for testing long connection capacity, which comprises the following steps: s10, the client reads the configuration file on the virtual server, the configuration file includes the number of the service servers, the IP of each service server and a plurality of monitoring ports; s20, the client initiates a long connection request to the monitoring port of the service server through the virtual server according to the configuration file; s30, detecting the performance consumption parameters of the virtual server and the service server in real time according to the long connection established between the client and the service server; the performance consumption parameters comprise CPU utilization rate and memory occupancy rate; and S40, when the performance consumption parameters of the virtual server and/or the service server reach the preset performance consumption parameters, the client stops initiating the long connection request, and records the number of the long connections established between the client and the service server.
Further, the method also comprises the following steps: s41, when the performance consumption parameter of the virtual server and/or the service server reaches the preset performance consumption parameter, replacing the monitoring port in the step S20, and then jumping to execute the step S20; or after replacing the client terminal in the step S10 and the service server in the step S20, the process skips to execute the step S10.
Further, the step S20 further includes: and S21, the multiple connection ports of the client sequentially initiate multiple long connection requests to one monitoring port of the service server through the virtual server respectively according to the configuration file.
Further, the step S41 further includes: s411, when the performance consumption parameters of the virtual server and/or the service server reach preset performance consumption parameters, checking whether all monitoring ports of the service server establish long connection with the connection port of the client; s412, when a long connection is established between a part of the monitoring ports of the service server and the connection port of the client, replacing the monitoring port in the step S21 with an unconnected monitoring port in the service server, and then jumping to perform the step S21; s413, when all monitoring ports of the service server establish long connections with the connection port of the client, replacing the client in the step S10 with another client, and after replacing the service server in the step S20 with another service server, jumping to execute step S10.
Further, before the step S10, the method further includes: s01, building a topology framework among a plurality of clients, a virtual server and a plurality of service servers, and a network environment of the topology framework; and a plurality of service servers in the topology framework form a service server cluster and then are connected to the virtual server.
Further, before the step S10, the method further includes: s03, respectively configuring a running environment mode of a long connection service program on the service server, wherein the testing environment mode comprises a production environment mode and a testing environment mode; the production environment mode is as follows: configuring a monitoring port on the business server to run a long connection service program; the test environment mode is as follows: and configuring a plurality of monitoring ports on the business server to run a long connection service program.
Further, before the step S10, the method further includes: s02, configuring at least 4 service servers in the configuration file on the virtual server, and configuring the IP and multiple monitoring ports of each service server, where the number of the monitoring ports of the service server is less than the number of the connection ports on the client.
The invention also provides a test system with long connection capacity, which comprises a client, a virtual server and a service server, wherein the client comprises: the reading module is used for reading configuration files on the virtual servers, wherein the configuration files comprise the number of the service servers, the IP of each service server and a plurality of monitoring ports; the connection port is used for initiating a long connection request to the monitoring port of the service server through the virtual server according to the configuration file; the detection module is used for detecting the performance consumption parameters of the virtual server and the service server in real time according to the long connection established between the client and the service server; the performance consumption parameters comprise CPU utilization rate and memory occupancy rate; the system comprises a connection control module and a recording module, wherein when the performance consumption parameters of the virtual server and/or the service server reach preset performance consumption parameters, the connection control module is used for controlling to stop initiating long connection requests, and the recording module is used for recording the number of the established long connections between the client and the service server.
Further, the client further comprises: the replacing module is used for replacing the monitoring port when the performance consumption parameter of the virtual server and/or the service server reaches a preset performance consumption parameter; or replacing the client and the service server.
Further, the plurality of connection ports of the client sequentially initiate a plurality of long connection requests to one monitoring port of the service server through the virtual server respectively according to the configuration file.
Compared with the prior art, the test method and the test system for the long connection capacity have the following beneficial effects:
1) after the IP and the monitoring ports of the service server and the service server are configured, the client initiates a long connection request to the service server through the virtual server, the service server responds to the long connection request and establishes long connection with the client, and then performance consumption parameters of the virtual server and the service server are detected in real time. And when the performance consumption parameters of the virtual server and/or the service server reach the preset performance consumption parameters, stopping initiating the long connection request, and recording the number of the established long connections. The invention uses the simplest and lowest cost method to obtain the long connection quantity of the system under the condition of setting the hardware index and ensuring the stable operation of the system.
2) Under the condition of test simulation, one client can initiate tens of thousands of long connections to one monitoring port of one service server through the virtual server, one client can initiate millions of long connections to a plurality of monitoring ports of one service server through the virtual server, and a plurality of clients can initiate tens of millions of long connections to a plurality of service servers through the virtual server. The invention completes the test of tens of millions of long connections by using a simple and low-cost system.
3) The test environment mode is suitable for testing the long connection number in the research and development stage and the product test stage; the production environment mode is suitable for determining the number of long connections applied to the actual application process of the product. The performance overhead is the same for both a port and multiple ports during operation. Therefore, the maximum number of long connections that can be supported under the determined hardware index of the service server in the production environment mode can be accurately evaluated through the test environment mode.
4) The number of monitoring ports on the configuration service server is far less than that of the connecting ports on the client, so that the test of tens of millions of long connections is realized; rather than configuring the number of monitoring ports on the traffic server to be greater than or equal to the number of connection ports on the client. The method is not only used for simplifying the configuration operation steps of configuring the monitoring ports in the configuration file, but also used for enabling the client to quickly read the monitoring ports configured in the configuration file.
Drawings
The above features, technical features, advantages and implementations of a long connection capacity test method and test system will be further described in the following detailed description of preferred embodiments in a clearly understandable manner, in conjunction with the accompanying drawings.
FIG. 1 is a schematic flow chart of a method for testing long connection capacity according to the present invention;
FIG. 2 is a schematic flow chart of another method for testing long connection capacity in accordance with the present invention;
FIG. 3 is a schematic flow chart of another method for testing long connection capacity in the present invention;
FIG. 4 is a schematic diagram of the structure of a long connection capacity test system according to the present invention;
FIG. 5 is a schematic flow chart of a method for testing long connection capacity according to another embodiment of the present invention;
FIG. 6 is a schematic diagram of the structure of another long connection capacity test system according to the present invention.
The reference numbers illustrate:
10. the system comprises a client, 11, a reading module, 12, a connecting port, 13, a detection module, 14, a connection control module, 15, a recording module, 16, a checking module, 17 and a replacing module;
20. a virtual server 21, a file configuration module;
30. and the service server 31 is used for configuring the mode.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
As shown in fig. 1, according to an embodiment of the present invention, a method for testing a long connection capacity includes the following steps: s10, the client reads the configuration file on the virtual server, the configuration file includes the number of the service servers, the IP of each service server and a plurality of monitoring ports;
s20, the client initiates a long connection request to the monitoring port of the service server through the virtual server according to the configuration file;
s30, detecting the performance consumption parameters of the virtual server and the service server in real time according to the long connection established between the client and the service server; the performance consumption parameters comprise CPU utilization rate and memory occupancy rate;
s40, when the performance consumption parameter of the virtual server and/or the service server reaches the preset performance consumption parameter, the client stops initiating the long connection request, and records the number of the long connections established between the client and the service server;
preferably, the method further comprises the following steps: s41, when the performance consumption parameter of the virtual server and/or the service server reaches the preset performance consumption parameter, replacing the monitoring port in the step S20, and then jumping to execute the step S20; or after replacing the client terminal in the step S10 and the service server in the step S20, the process skips to execute the step S10.
Specifically, L VS is an abbreviation of L inux Virtual Server, that is, the IP load balancing technology of L inux Virtual Server, L VS is implemented by an IPVS module (IP Virtual Server). IPVS is the core of L VS cluster system, installed on a Director Server (dispatcher), and at the same time, an IP address is virtually simulated on the Director Server (dispatcher). a client must access a service Server through the Virtual IP address.
Socket, commonly referred to as a "Socket," describes an IP address and port, and is a handle of a communication chain that can be used to implement communication between different virtual servers or different computers. A plurality of service software is generally run on the Internet host to provide a plurality of services. Each service opens a Socket and binds to a port, with different ports corresponding to different services.
As shown in fig. 2, according to another embodiment of the present invention, a method for testing a long connection capacity includes the steps of: s01, building a topological framework among a plurality of (for example, 4) clients, a virtual server and a plurality of (for example, 4) servers, and establishing a network environment of the topological framework; and a plurality of service servers in the topology framework form a service server cluster and then are connected to the virtual server.
S02, configuring at least 4 service servers in the configuration file on the virtual server, and configuring the IP and a plurality of monitoring ports of each service server.
S03, respectively configuring a running environment mode of a long connection service program on the service server, wherein the testing environment mode comprises a production environment mode and a testing environment mode; the production environment mode is as follows: configuring a monitoring port on the business server to run a long connection service program; the test environment mode is as follows: and configuring a plurality of monitoring ports on the business server to run a long connection service program.
S10, the client reads the configuration file on the virtual server, the configuration file includes the number of the service servers, the IP of each service server and a plurality of monitoring ports;
and S21, the multiple connection ports of the client sequentially initiate multiple long connection requests to one monitoring port of the service server through the virtual server respectively according to the configuration file.
S30, detecting the performance consumption parameters of the virtual server and the service server in real time according to the long connection established between the client and the service server; the performance consumption parameters comprise CPU utilization rate and memory occupancy rate;
s40, when the performance consumption parameter of the virtual server and/or the service server reaches the preset performance consumption parameter, the client stops initiating the long connection request, and records the number of the long connections established between the client and the service server;
preferably, the method further comprises the following steps: s41, when the performance consumption parameter of the virtual server and/or the service server reaches the preset performance consumption parameter, replacing the monitoring port in the step S20, and then jumping to execute the step S20; or after replacing the client terminal in the step S10 and the service server in the step S20, the process skips to execute the step S10.
Specifically, the test environment mode is suitable for being applied to a research and development stage or a condition of testing a product after the research and development are completed, and the production environment mode is suitable for being applied to an application environment after the product is completed. The performance overhead is the same for long connection service programs running on one port and running on multiple ports. Therefore, the maximum number of long connections that can be supported under the determined hardware index of the service server in the production environment mode can be accurately evaluated through the test environment mode. 4 service servers can be configured on the virtual server, and 5, 6 and other service servers can also be configured on the virtual server; each service server has 6 ten thousand ports, and 50, 60 and other ports are selected as monitoring ports from the 6 ten thousand ports. Each client has 64511 ports and can initiate 64511 connections (eliminating 1024 system reserved ports). Taking 60000 connections initiated by each client as an example, 50 monitoring ports are configured on each service server, each client can initiate 300 ten thousand long connections to 4 service servers, and 4 clients can simulate 1200 ten thousand long connections to 4 service servers. For example, when testing services between a large number of intelligent devices (e.g., more than 3000 ten thousand) and the cloud server system, it may be difficult to obtain a true more than 3000 ten thousand intelligent devices for performing service testing.
As shown in fig. 3, according to still another embodiment of the present invention, a method for testing a long connection capacity includes the steps of: s01, building a topological framework among a plurality of (for example, 4) clients, a virtual server and a plurality of (for example, 4) servers, and establishing a network environment of the topological framework; and a plurality of service servers in the topology framework form a service server cluster and then are connected to the virtual server.
S02, configuring at least 4 service servers in the configuration file on the virtual server, and configuring the IP and a plurality of monitoring ports of each service server.
S03, respectively configuring a running environment mode of a long connection service program on the service server, wherein the testing environment mode comprises a production environment mode and a testing environment mode; the production environment mode is as follows: configuring a monitoring port on the business server to run a long connection service program; the test environment mode is as follows: and configuring a plurality of monitoring ports on the business server to run a long connection service program.
S10, the client reads the configuration file on the virtual server, the configuration file includes the number of the service servers, the IP of each service server and a plurality of monitoring ports;
and S21, the multiple connection ports of the client sequentially initiate multiple long connection requests to one monitoring port of the service server through the virtual server respectively according to the configuration file.
S30, detecting the performance consumption parameters of the virtual server and the service server in real time according to the long connection established between the client and the service server; the performance consumption parameters comprise CPU utilization rate and memory occupancy rate;
s40, when the performance consumption parameter of the virtual server and/or the service server reaches the preset performance consumption parameter, the client stops initiating the long connection request, and records the number of the long connections established between the client and the service server;
s411, when the performance consumption parameters of the virtual server and/or the service server reach preset performance consumption parameters, checking whether all monitoring ports of the service server establish long connection with the connection port of the client;
s412, when a long connection is established between a part of the monitoring ports of the service server and the connection port of the client, replacing the monitoring port in the step S21 with an unconnected monitoring port in the service server, and then jumping to perform the step S21;
s413, when all monitoring ports of the service server establish long connections with the connection port of the client, replacing the client in the step S10 with another client, and after replacing the service server in the step S20 with another service server, jumping to execute step S10.
Specifically, 6 ten thousand long connection requests are sequentially initiated to the virtual server by 6 ten thousand connection ports of one client for the first time, and after a load scheduler on the virtual server selects one service server according to the load condition of the service server, one monitoring port of the service server sequentially responds to the 6 ten thousand long connection requests initiated by the client. After long connection is established with the client in sequence, performance consumption parameters (CPU utilization rate and memory occupancy rate) of the virtual server and the service server are detected in real time.
And when the CPU utilization rate and the memory occupancy rate of the virtual server reach 80 percent and/or the CPU utilization rate and the memory occupancy rate of the service server reach 80 percent, the client stops initiating the long connection request and records the number of the established long connections between the client and the service server. And when the CPU utilization rate and the memory occupancy rate of the virtual server do not reach 80 percent and/or the CPU utilization rate and the memory occupancy rate of the business server do not reach 80 percent, checking whether all monitoring ports of the business server are connected with the connection port of the client in a long way or not.
And when the long connection is established between part of the monitoring ports of the service server and the connection ports of the client, replacing the connection ports with the other unconnected monitoring ports, and repeating the steps. And after long connection is established between all monitoring ports of the service server and the connection port of the client, the service server is replaced by another client and another service server, and the steps are repeated.
As shown in fig. 4, according to an embodiment of the present invention, a test system with a long connection capacity includes a plurality of clients 10, a virtual server 20, and a plurality of service servers 30: building a topology framework among a plurality of (for example, 4) clients 10, one virtual server 20, a plurality of (for example, 4) service servers 30, and a network environment of the topology framework; a plurality of service servers 30 in the topology framework form a service server cluster and then are connected to the virtual server 20.
The service server 30 includes a mode configuration module 31, configured to configure an operation environment mode of the long connection service program on the service server 30, where the test environment mode includes a production environment mode and a test environment mode; the production environment mode is as follows: configuring a monitoring port on the service server 30 to run a long connection service program; the test environment mode is as follows: a plurality of monitoring ports are configured on the service server 30 to run a long connection service program.
The virtual server 20 includes a file configuration module 21, configured to configure at least 4 service servers 30 in a configuration file on the virtual server 20, and configure an IP and a plurality of monitoring ports of each service server 30.
Each client 10 includes: a reading module 11, configured to read a configuration file on the virtual server 20, where the configuration file includes the number of the service servers 30, the IP of each service server 30, and multiple monitoring ports;
the connection ports 12 of the client 10 respectively initiate a plurality of long connection requests to a monitoring port of the service server 30 through the virtual server 20 according to the configuration file.
The detection module 13 is configured to detect performance consumption parameters of the virtual server 20 and the service server 30 in real time according to the long connection established between the client 10 and the service server 30; the performance consumption parameters comprise CPU utilization rate and memory occupancy rate;
a connection control module 14 and a recording module 15, where when the performance consumption parameter of the virtual server 20 and/or the service server 30 reaches a preset performance consumption parameter, the connection control module 14 is configured to control to stop initiating a long connection request, and the recording module 15 is configured to record the number of long connections established between the client 10 and the service server 30;
the checking module 16 is configured to check whether all monitoring ports of the service server 30 establish a long connection with the connection port 12 of the client 10 when the performance consumption parameter of the virtual server 20 and/or the service server 30 reaches a preset performance consumption parameter;
a replacing module 17, configured to, when a long connection is established between a part of the monitoring ports of the service server 30 and the connection port 12 of the client 10, replace the monitoring port with an unconnected monitoring port in the service server 30, and then repeat the above steps;
a replacing module 17, configured to replace the client 10 with another client 10 when all monitoring ports of the service server 30 establish long connections with the connection port 12 of the client 10, and repeat the above steps after replacing the service server 30 with another service server 30.
Specifically, the detection module 13 may be disposed on the client 10, or may be disposed on the virtual server 20 and the service server 30, respectively. The viewing module 16 may be provided on the client terminal 10 or on the service server 30. The replacement module 17 may be provided on the client terminal 10 or on the virtual server 20.
As shown in fig. 5 and 6, according to still another embodiment of the present invention, a method for testing long connection capacity includes the steps of building a network environment based on a three-layer topology architecture of a client, L inux virtual servers L VS and long connection service servers, wherein a cluster of the long connection service servers is connected to L inux virtual servers L VS, L inux virtual servers L VS, the theoretical maximum value is the maximum and the number of connections is in the order of ten million.
In the configuration file of the L inux virtual server L VS, the IP and port of the long connection service server that needs to be forwarded are configured, 4 server IPs are configured, and each server IP configures forwarding of 50 ports.
The method comprises the steps that a long connection service program runs on 4 long connection service servers, the long connection service program has a production environment mode and a test environment mode which are distinguished and can be configured through a configuration file, if the long connection service program is in the production environment mode, the long connection service program runs on a designated port on the long connection service server, if the long connection service program is in the test environment mode, the long connection service program can automatically read L content in the configuration file of the VS server and run and record performance expenses (CPU utilization rate and memory occupancy rate) of the long connection service program according to a plurality of configured ports on the long connection service server.
If the long-connection service server is opened with 50 monitoring ports, the port of one client can initiate 64511 connections (removing 1024 system reserved ports), taking 60000 connections initiated by each client as an example, 50 monitoring ports are opened on the long-connection service server, each client can initiate 300 ten thousand long connections, 4 clients can simulate 1200 ten thousand long connections, the client simulator establishes a long connection in such a way that one monitoring port is started every minute, before the monitoring port is started to establish a long connection next time, the performance consumption conditions of the L inux virtual server 56 VS and the long-connection service server are detected in real time, the cumulative consumption of the CPU is less than 80%, and the total consumption of the CPU is recorded when the CPU is started, and when the CPU is started, the total consumption of the CPU is less than 80%.
The maximum long connection number which can be supported by L inux virtual server L VS (set hardware index) and long connection service server (set hardware index) can be determined by the method, taking 4 servers and 50 ports as examples, the maximum long connection number can be determined in time after the hardware index of the long connection service server is changed, elastic expansion and contraction are achieved, server resources are reasonably used according to the number of intelligent terminals, and the method can dynamically expand the number of the servers and the ports to support the test of the number of the more massive (hundreds of millions of levels) long connections.
The invention establishes a long connection service server system cluster and simulates a program of a long connection client to determine the long connection capacity of each layer (L inux virtual server L VS, long connection service server) in a system network component so as to correctly evaluate the number of intelligent terminal hardware supported by the system and the hardware resources of the corresponding system server.
The invention can determine the number of long connections with mass (ten million scale) with less computing resources (4 client servers). The client simulation program and the long connection service program automatically configure a dynamic starting port to operate according to the L inux virtual server L VS.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (5)

1. A method for testing long connection capacity, comprising the steps of:
s10, the client reads the configuration file on the virtual server, the configuration file includes the number of the service servers, the IP of each service server and a plurality of monitoring ports;
s20, the client initiates a long connection request to the monitoring port of the service server through the virtual server according to the configuration file;
s30, detecting the performance consumption parameters of the virtual server and the service server in real time according to the long connection established between the client and the service server; the performance consumption parameters comprise CPU utilization rate and memory occupancy rate;
s40, when the performance consumption parameter of the virtual server and/or the service server reaches the preset performance consumption parameter, the client stops initiating the long connection request, and records the number of the long connections established between the client and the service server;
s41, when the performance consumption parameter of the virtual server and/or the service server reaches the preset performance consumption parameter, replacing the monitoring port in the step S20, and then jumping to execute the step S20; or after replacing the client in the step S10 and the service server in the step S20, skipping to execute the step S10;
the step S20 further includes:
s21, the multiple connection ports of the client sequentially initiate multiple long connection requests to one monitoring port of the service server through the virtual server respectively according to the configuration file; the step S41 further includes:
s411, when the performance consumption parameters of the virtual server and/or the service server reach preset performance consumption parameters, checking whether all monitoring ports of the service server establish long connection with the connection port of the client;
s412, when a long connection is established between a part of the monitoring ports of the service server and the connection port of the client, replacing the monitoring port in the step S21 with an unconnected monitoring port in the service server, and then jumping to perform the step S21;
s413, when all monitoring ports of the service server establish long connections with the connection port of the client, replacing the client in the step S10 with another client, and after replacing the service server in the step S20 with another service server, jumping to execute step S10.
2. The method for testing long connection capacity according to claim 1, further comprising, before the step S10:
s01, building a topology framework among a plurality of clients, a virtual server and a plurality of service servers, and a network environment of the topology framework; and a plurality of service servers in the topology framework form a service server cluster and then are connected to the virtual server.
3. The method for testing long connection capacity according to any one of claims 1 to 2, further comprising, before the step S10:
s03, respectively configuring a running environment mode of a long connection service program on the service server, wherein the testing environment mode comprises a production environment mode and a testing environment mode; the production environment mode is as follows: configuring a monitoring port on the business server to run a long connection service program; the test environment mode is as follows: and configuring a plurality of monitoring ports on the business server to run a long connection service program.
4. The method for testing long connection capacity according to any one of claims 1 to 2, further comprising, before the step S10:
s02, configuring at least 4 service servers in the configuration file on the virtual server, and configuring the IP and multiple monitoring ports of each service server, where the number of the monitoring ports of the service server is less than the number of the connection ports on the client.
5. A test system applied to the test method of long connection capacity according to claim 1, comprising a client, a virtual server and a service server, wherein the client comprises:
the reading module is used for reading configuration files on the virtual servers, wherein the configuration files comprise the number of the service servers, the IP of each service server and a plurality of monitoring ports;
the connection port is used for initiating a long connection request to the monitoring port of the service server through the virtual server according to the configuration file;
the detection module is used for detecting the performance consumption parameters of the virtual server and the service server in real time according to the long connection established between the client and the service server; the performance consumption parameters comprise CPU utilization rate and memory occupancy rate;
the system comprises a connection control module and a recording module, wherein when the performance consumption parameters of the virtual server and/or the service server reach preset performance consumption parameters, the connection control module is used for controlling to stop initiating long connection requests, and the recording module is used for recording the number of the established long connections between the client and the service server; the client further comprises:
the replacing module is used for replacing the monitoring port when the performance consumption parameter of the virtual server and/or the service server reaches a preset performance consumption parameter; or replacing the client and the service server;
and the plurality of connection ports of the client sequentially initiate a plurality of long connection requests to one monitoring port of the service server through the virtual server respectively according to the configuration file.
CN201710278749.6A 2017-04-25 2017-04-25 Testing method and testing system for long connection capacity Active CN107070752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710278749.6A CN107070752B (en) 2017-04-25 2017-04-25 Testing method and testing system for long connection capacity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710278749.6A CN107070752B (en) 2017-04-25 2017-04-25 Testing method and testing system for long connection capacity

Publications (2)

Publication Number Publication Date
CN107070752A CN107070752A (en) 2017-08-18
CN107070752B true CN107070752B (en) 2020-07-24

Family

ID=59604069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710278749.6A Active CN107070752B (en) 2017-04-25 2017-04-25 Testing method and testing system for long connection capacity

Country Status (1)

Country Link
CN (1) CN107070752B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855511A (en) * 2018-08-20 2020-02-28 北京国双科技有限公司 Method, device and system for determining capacity of server, storage medium and processor
CN110515782A (en) * 2019-07-09 2019-11-29 中移(杭州)信息技术有限公司 Test method, test device and the test macro of server
CN110795339A (en) * 2019-09-29 2020-02-14 苏州浪潮智能科技有限公司 Method, device and medium for testing configuration program code of server
CN110620826A (en) * 2019-10-17 2019-12-27 吉旗(成都)科技有限公司 TCP link data processing method and device for application cluster deployment
CN111639014A (en) * 2020-05-14 2020-09-08 深圳市筑泰防务智能科技有限公司 Test method and device for simulating multiple terminals to test server, terminal and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6408335B1 (en) * 1996-09-10 2002-06-18 Netiq Corporation Methods, systems and computer program products for endpoint pair based communications network performance testing
CN102137104A (en) * 2011-03-11 2011-07-27 华为软件技术有限公司 Transmission control protocol (TCP) long-connection access control method and device
CN103618738A (en) * 2013-12-09 2014-03-05 惠州华阳通用电子有限公司 Intelligent load distribution system and method for achieving TCP long connection and communication
CN103618741A (en) * 2013-12-09 2014-03-05 惠州华阳通用电子有限公司 TCP long connection communication system and method
CN104009938A (en) * 2014-06-17 2014-08-27 合一网络技术(北京)有限公司 Method and system for long connections based on router level
CN104170353A (en) * 2013-12-27 2014-11-26 华为技术有限公司 TCP link configuring method, device and equipment
CN104811398A (en) * 2015-04-17 2015-07-29 北京奇艺世纪科技有限公司 Method and device for load balancing
CN105847071A (en) * 2015-01-14 2016-08-10 北京嘀嘀无限科技发展有限公司 Method and device for performing service test using long connection
CN106201794A (en) * 2016-06-27 2016-12-07 北京奇虎科技有限公司 The detection method of a kind of server and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6408335B1 (en) * 1996-09-10 2002-06-18 Netiq Corporation Methods, systems and computer program products for endpoint pair based communications network performance testing
CN102137104A (en) * 2011-03-11 2011-07-27 华为软件技术有限公司 Transmission control protocol (TCP) long-connection access control method and device
CN103618738A (en) * 2013-12-09 2014-03-05 惠州华阳通用电子有限公司 Intelligent load distribution system and method for achieving TCP long connection and communication
CN103618741A (en) * 2013-12-09 2014-03-05 惠州华阳通用电子有限公司 TCP long connection communication system and method
CN104170353A (en) * 2013-12-27 2014-11-26 华为技术有限公司 TCP link configuring method, device and equipment
CN104009938A (en) * 2014-06-17 2014-08-27 合一网络技术(北京)有限公司 Method and system for long connections based on router level
CN105847071A (en) * 2015-01-14 2016-08-10 北京嘀嘀无限科技发展有限公司 Method and device for performing service test using long connection
CN104811398A (en) * 2015-04-17 2015-07-29 北京奇艺世纪科技有限公司 Method and device for load balancing
CN106201794A (en) * 2016-06-27 2016-12-07 北京奇虎科技有限公司 The detection method of a kind of server and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Linux虚拟服务器LVS负载均衡模式研究";洪新建;《万方数据》;20141118;全文 *
"基于TCP长连接的负载均衡器设计与实现";柯刘阳;《万方数据》;20160602;全文 *

Also Published As

Publication number Publication date
CN107070752A (en) 2017-08-18

Similar Documents

Publication Publication Date Title
CN107070752B (en) Testing method and testing system for long connection capacity
US10136345B2 (en) Testing a mobile application
US10277475B2 (en) System and method for dynamically testing networked target systems
US10461990B2 (en) Diagnostic traffic generation for automatic testing and troubleshooting
CN114095567B (en) Data access request processing method and device, computer equipment and medium
CN110008005B (en) Cloud platform-based power grid communication resource virtual machine migration system and method
WO2014194704A1 (en) A grouping processing method and system
WO2023131343A1 (en) Stress test method and system, and device and storage medium
CN111600760B (en) Quality detection system, method and equipment of power grid operation monitoring system
CN108427635A (en) Quickly method, server and the computer readable storage medium of test web page
CN111104336A (en) Online service interface testing method and device based on container and VNC
CN107666401A (en) A kind of configuration information obtaining method and terminal
CN106875765B (en) Electronic classroom implementation method and device based on VDI
CN102546652B (en) System and method for server load balancing
JP5768722B2 (en) Program for verification test, information processing method, and information processing apparatus
CN112152879A (en) Network quality determination method and device, electronic equipment and readable storage medium
Liu et al. Towards a community cloud storage
CN112527453B (en) Virtualization information simulation system, method and computer-readable storage medium
CN109600278A (en) A kind of data communications method, device, equipment and medium
CN115037651A (en) RDMA bandwidth transmission testing method, system and storage medium
US9479579B2 (en) Grouping processing method and system
US11108652B2 (en) Server assisted network discovery (SAND)
CN115086216B (en) Test method and system for multiple virtual terminals
CN116389188B (en) Data transmission method and related device
CN111435919B (en) Method, device and system for managing configuration parameters

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200407

Address after: No. 2-3167, zone a, Nonggang City, No. 2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Applicant after: Taizhou Jiji Intellectual Property Operation Co., Ltd

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Applicant before: Phicomm (Shanghai) Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200701

Address after: 518000, Shenzhen District, Guangdong City, Longgang District South Bay Street cloth road LIAN science and Technology Park 1, 11, 1, 5, building 501 room

Applicant after: SHENZHEN SIFO TECHNOLOGY Co.,Ltd.

Address before: No. 2-3167, zone a, Nonggang City, No. 2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Applicant before: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant