CN112242933A - TCPCOPY test method, device, medium and equipment - Google Patents

TCPCOPY test method, device, medium and equipment Download PDF

Info

Publication number
CN112242933A
CN112242933A CN201910640434.0A CN201910640434A CN112242933A CN 112242933 A CN112242933 A CN 112242933A CN 201910640434 A CN201910640434 A CN 201910640434A CN 112242933 A CN112242933 A CN 112242933A
Authority
CN
China
Prior art keywords
container
flow
tcpcopy
network address
directory
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.)
Pending
Application number
CN201910640434.0A
Other languages
Chinese (zh)
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.)
Guizhou Baishancloud Technology Co Ltd
Original Assignee
Guizhou Baishancloud Technology Co Ltd
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 Guizhou Baishancloud Technology Co Ltd filed Critical Guizhou Baishancloud Technology Co Ltd
Priority to CN201910640434.0A priority Critical patent/CN112242933A/en
Publication of CN112242933A publication Critical patent/CN112242933A/en
Pending legal-status Critical Current

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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure relates to a TCPCOPY test method, device, medium and equipment, the method comprises: starting a first container, a second container and a third container which are arranged in the same service server; the first container acquires flow information from a buffer of the service server, executes a TCPCOPY command and sends the flow information to a second container; the second container receives the flow information, performs service test on the flow information, and sends the tested response flow to a third container; and the third container receives the response flow and cleans the response flow. The containers are arranged in the same service server, so that the complex process of scheduling a plurality of service servers is avoided, and the safety of data is effectively protected by setting the containers to be private network IPs.

Description

TCPCOPY test method, device, medium and equipment
Technical Field
The present disclosure relates to the field of network data processing technologies, and in particular, to a TCPCOPY testing method, apparatus, medium, and device.
Background
TCPCOPY is a distributed online pressure testing tool, can copy the online flow to the tester, the real-time simulation online environment, reach the effect of assuming online flow in real time under the situation that the procedure is not online, apply to the advertising system, the urs system, nginx hmux agreement system extensively. In the related art, when TCPCOPY is used, three service servers are required to be used for respectively performing traffic replication, testing and cleaning, the scheduling process is complex and is not easy to control, and the data security of the three service servers cannot be effectively protected.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a TCPCOPY test method, apparatus, medium, and device.
According to an aspect of the embodiments of the present disclosure, there is provided a TCPCOPY test method, including:
starting a first container, a second container and a third container which are arranged in the same service server;
the first container acquires flow information from a buffer of the service server, executes a TCPCOPY command and sends the flow information to a second container;
the second container receives the flow information, performs service test on the flow information, and sends the tested response flow to a third container;
and the third container receives the response flow and cleans the response flow.
The TCPCOPY test method also has the following characteristics:
after the third container cleans the response flow, the method further includes: deleting the first container, the second container, and the third container.
The TCPCOPY test method also has the following characteristics:
the first container uses a host network mode and shares an IP with the service server;
the second container and the third container use a bridge network mode, and the IP of the second container and the IP of the third container are both private network IPs.
The TCPCOPY test method also has the following characteristics:
after the first container, the second container and the third container which are arranged in the same service server are started, the method further comprises the following steps:
sharing a directory of the traffic server for TCPCOPY testing to the first container, the second container, and the third container;
the second container writes the network address of the second container into a second container configuration file under the directory; the third container writes the network address of the third container into a third container configuration file under the directory;
the executing the TCPCOPY command comprises: the first container reads the network address of the second container from a second container configuration file under the directory, reads the network address of the third container from a third container configuration file under the directory, and executes the TCPCOPY command according to the network address of the second container and the network address of the third container;
the sending the traffic information to a second container comprises: the first container reads the network address of the second container from a second container configuration file in the directory, and sends the flow information to the network address of the second container;
the sending the tested response traffic to the third container includes: the second container reads the network address of the third container from a third container configuration file under the directory; and sending the tested response flow to the network address of the third container.
The TCPCOPY test method also has the following characteristics:
the first container obtaining the traffic information from the buffer of the service server includes:
determining a flow replication coefficient according to a preset rule, and replicating flow information matched with the flow replication coefficient from the buffer, wherein the flow replication coefficient is a coefficient larger than 1 or smaller than 1;
the preset rule comprises at least one of the following rules:
when the current time belongs to a first preset time period, the flow duplication coefficient is a real number greater than 1;
when the current time belongs to a second preset time period, the flow duplication coefficient is a real number smaller than 1;
when the user flow of the buffer is greater than a first preset threshold, the flow duplication coefficient is a real number which is less than 1 and is negatively correlated with the user flow;
when the user traffic of the buffer is smaller than a second preset threshold, the traffic duplication coefficient is a real number which is greater than 1 and positively correlated with the user traffic.
According to another aspect of the embodiments of the present disclosure, there is provided a TCPCOPY test apparatus including: the device comprises a starting module, a first container, a second container and a third container;
the starting module is configured to start a first container, a second container and a third container which are arranged in the same service server;
the first container is configured to acquire traffic information from a buffer of the service server, execute a TCPCOPY command, and send the traffic information to a second container;
the second container is configured to receive the traffic information, perform service test on the traffic information, and send the tested response traffic to a third container;
the third container is configured to receive the response flow and clean the response flow.
The TCPCOPY testing device also has the following characteristics:
further comprising a deletion module configured to delete the first container, the second container, and the third container.
The TCPCOPY testing device also has the following characteristics:
the first container uses a host network mode and shares an IP with the service server;
the second container and the third container use a bridge network mode, and the IP of the second container and the IP of the third container are both private network IPs.
The TCPCOPY testing device also has the following characteristics:
the sharing module is configured to share the directory of the service server for performing the TCPCOPY test to the first container, the second container and the third container;
the second container is further configured to write a network address of the second container into a second container configuration file under the directory; further configured to send the tested reply traffic to a third container using: the second container reads the network address of the third container from a third container configuration file under the directory; sending the tested response flow to the network address of the third container;
the third container is further configured to write a network address of the third container into a third container configuration file under the directory;
the first container further configured to execute a TCPCOPY command using the following method: reading the network address of the second container from a second container configuration file under the directory, reading the network address of the third container from a third container configuration file under the directory, and executing the TCPCOPY command according to the network address of the second container and the network address of the third container; further configured to send the traffic information to a second container using: and reading the network address of the second container from a second container configuration file under the directory, and sending the flow information to the network address of the second container.
The TCPCOPY testing device also has the following characteristics:
the first container is further configured to obtain traffic information from a cache of the service server using:
determining a flow replication coefficient according to a preset rule, and replicating flow information matched with the flow replication coefficient from the buffer, wherein the flow replication coefficient is a coefficient larger than 1 or smaller than 1;
the preset rule comprises at least one of the following rules:
when the current time belongs to a first preset time period, the flow duplication coefficient is a real number greater than 1;
when the current time belongs to a second preset time period, the flow duplication coefficient is a real number smaller than 1;
when the user flow of the buffer is greater than a first preset threshold, the flow duplication coefficient is a real number which is less than 1 and is negatively correlated with the user flow;
when the user traffic of the buffer is smaller than a second preset threshold, the traffic duplication coefficient is a real number which is greater than 1 and positively correlated with the user traffic.
According to another aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed, performs the steps of the above-described method.
According to another aspect of the embodiments of the present disclosure, there is provided a computer device comprising a processor, a memory and a computer program stored on the memory, the processor implementing the steps of the above method when executing the computer program.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the containers are arranged in the same service server, so that the complex process of scheduling a plurality of service servers is avoided, and the safety of data is effectively protected by setting the containers to be private network IPs.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow diagram illustrating a TCPCOPY test method in accordance with an exemplary embodiment;
FIG. 2 is a block diagram illustrating a TCPCOPY test setup in accordance with an exemplary embodiment;
FIG. 3 is a block diagram illustrating a TCPCOPY test setup in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating a computer device according to an example embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
FIG. 1 is a flow chart illustrating a TCPCOPY test method according to an exemplary embodiment, the method comprising:
step S11, starting a first container, a second container and a third container which are arranged in the same service server;
step S12, the first container obtains the flow information from the buffer of the service server, executes TCPCOPY command, and sends the flow information to the second container;
step S13, the second container receives the flow information, performs service test on the flow information, and sends the tested response flow to the third container;
in step S14, the third container receives the response flow and cleans the response flow.
After the test is finished, the method further comprises the following steps: the first container, the second container, and the third container are deleted.
In the whole method, the TCPCOPY test is completed by using three containers in the same service server, the test can be started at any time, only the three containers are needed to be started, and no program is needed to be started for the test; the test can be finished at any time, only the three containers are needed to be terminated, no adverse effect is caused on the host service, and no fragment program is left on the host.
The first container uses host network mode, sharing IP with the traffic server. And storing a configuration file, namely target _ conf, of the second container under a preset directory (for example, a/tmp directory) of the service server, wherein the configuration file comprises network information (for example, IP) of the second container, and storing a configuration file, namely interrupt _ conf, of the third container, wherein the configuration file comprises network information (for example, IP) of the third container.
The second container uses the bridge network mode, the created IP is a private network IP, and only the service server can access the private network IP. Devices other than the service server cannot access.
The third container uses the bridge network mode, the created IP is a private network IP, and only the service server can access the private network IP. Devices other than the service server cannot access.
After the step S11 and before the step S12, the method further includes S11' sharing the directory of the service server for performing the TCPCOPY test to the first container, the second container, and the third container. The second container writes the network address of the second container into a second container configuration file under the directory; and the third container writes the network address of the third container into a third container configuration file under the directory.
S11' further includes: the first container requests the IP of the second container at regular time, and executes the TCPCOPY command until the CDN service of the second container is started.
In step S12, executing the TCPCOPY command includes: the first container reads the network address of the second container from the second container configuration file under the directory, reads the network address of the third container from the third container configuration file under the directory, and executes the TCPCOPY command according to the network address of the second container and the network address of the third container.
In step S12, sending the traffic information to the second container includes: and the first container reads the network address of the second container from a second container configuration file in the directory and sends the flow information to the network address of the second container.
In step S13, sending the tested response traffic to the third container includes: the second container reads the network address of the third container from a third container configuration file in the directory; and sending the tested response flow to the network address of the third container.
The method can intelligently adjust the flow to be tested, and does not influence the normal service of the service on the premise of normally completing the test. Specifically, the step of acquiring, by the first container, the traffic information from the buffer of the service server in S12 includes: determining a flow rate copy coefficient according to a preset rule, copying flow rate information matched with the flow rate copy coefficient from a buffer, wherein the flow rate copy coefficient is a coefficient larger than 1 or smaller than 1;
the preset rules include at least one of the following rules:
when the current time belongs to a first preset time period, the flow duplication coefficient is a real number greater than 1;
when the current time belongs to a second preset time period, the flow duplication coefficient is a real number smaller than 1;
when the user flow of the buffer is greater than a first preset threshold, the flow duplication coefficient is a real number which is less than 1 and is negatively correlated with the user flow;
when the user traffic of the buffer is smaller than a second preset threshold, the traffic duplication coefficient is a real number which is greater than 1 and positively correlated with the user traffic.
For example: and in the night time period, the traffic replication coefficient is greater than 1, and in the daytime business peak time period, the traffic replication coefficient is less than 1 so as not to influence the normal business experience of the user.
For another example: when the user flow is large, the flow duplication coefficient is smaller than 1, and when the user flow is small, the flow duplication coefficient is larger than 1.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
As shown in fig. 2, the host address of the traffic server is 10.104.17.221. The service server comprises: a first container, a second container, and a third container. The first container uses a host network mode, sharing IP with the service server. The second container and the third container use a bridged network mode. The IP address of the second container is the private network IP, 172.17.0.3. The IP address of the second container is the private network IP, 172.17.0.4. The advantage of using private network IP for the second and third containers is that the CDN hub does not need to distinguish which servers are for tcpcopy, which does not cause the problem of managing tcpcopy servers.
The first container, the second container, and the third container are activated. And sharing the/tmp directory, which is the directory of the service server for performing the TCPCOPY test, to the first container, the second container and the third container. The second container writes the network address 172.17.0.3 of the second container into a second container configuration file, namely target _ conf, under the directory; and the third container writes the network address 172.17.0.4 of the third container into a third container configuration file intercept _ conf under the directory.
The first container requests the IP of container B, 172.17.0.3, every few seconds, waiting for cdn services in container B to be started.
The first container reads the IP of the second container from a target _ conf file under the/tmp directory, reads the IP of the third container from an interrupt _ conf file under the/tmp directory, and executes a TCPCOPY command according to the IP of the second container and the IP of the third container, which specifically comprises the following steps: the ratio of/tcpcopy-x 80-172.17.0.3:80-s 172.17.0.4-c 62.135.200. x.
The first container acquires the traffic information from the buffer of the service server, executes the TCPCOPY command, and sends the traffic information to the second container.
After the second container is started, only some basic environments are included, and then the boot script downloads the specified versions of the nginx and squid programs from the yum source for installation and starts the programs. The information such as the version of each service is transmitted to the container by specifying the environment variable parameters when the container is created.
And the second container receives the flow information and performs service test on the flow information. And reading the interrupt _ conf file to obtain the ip of the container C. Adding a routing rule, and transferring the responded flow to a container C, wherein the specific instruction is as follows: route add-net 62.135.200.0netmask 255.255.0gw 172.17.0.4.
The second container also collects error logs and exception status codes and reports the test results to the central cdn service.
The third container receives the response flow, and turns off the ip forward function, wherein the specific instruction is as follows: echo 0>/proc/sys/net/ipv4/ip _ forward. The third container cleans the response flow, and after cleaning is finished, the flow of the response request, the network packet data and the like is completely cleared. The following instructions are specifically executed: intercept-i eth0-F 'tcp and src port 80' -d.
FIG. 3 is a block diagram illustrating a TCPCOPY test device according to an exemplary embodiment, the TCPCOPY test device comprising: the device comprises a starting module, a first container, a second container and a third container;
the starting module is configured to start a first container, a second container and a third container which are arranged in the same service server;
the first container is configured to acquire traffic information from a buffer of the service server, execute a TCPCOPY command, and send the traffic information to a second container;
the second container is configured to receive the traffic information, perform service test on the traffic information, and send the tested response traffic to a third container;
the third container is configured to receive the response flow and clean the response flow.
The apparatus also includes a deletion module configured to delete the first container, the second container, and the third container.
The first container uses a host network mode and shares an IP with the service server;
the second container and the third container use a bridge network mode, and the IP of the second container and the IP of the third container are both private network IPs.
The apparatus further includes a sharing module configured to share a directory of the service server for performing TCPCOPY testing to the first container, the second container, and the third container;
the second container is further configured to write a network address of the second container into a second container configuration file under the directory; further configured to send the tested reply traffic to a third container using: the second container reads the network address of the third container from a third container configuration file under the directory; sending the tested response flow to the network address of the third container;
the third container is further configured to write a network address of the third container into a third container configuration file under the directory;
the first container further configured to execute a TCPCOPY command using the following method: reading the network address of the second container from a second container configuration file under the directory, reading the network address of the third container from a third container configuration file under the directory, and executing the TCPCOPY command according to the network address of the second container and the network address of the third container; further configured to send the traffic information to a second container using: and reading the network address of the second container from a second container configuration file under the directory, and sending the flow information to the network address of the second container.
The device can intelligently adjust the flow to be tested, and does not influence the normal service of the service on the premise of normally completing the test. Specifically, the first container is further configured to obtain the traffic information from the cache of the service server by using the following method:
determining a flow replication coefficient according to a preset rule, and replicating flow information matched with the flow replication coefficient from the buffer, wherein the flow replication coefficient is a coefficient larger than 1 or smaller than 1;
the preset rule comprises at least one of the following rules:
when the current time belongs to a first preset time period, the flow duplication coefficient is a real number greater than 1;
when the current time belongs to a second preset time period, the flow duplication coefficient is a real number smaller than 1;
when the user flow of the buffer is greater than a first preset threshold, the flow duplication coefficient is a real number which is less than 1 and is negatively correlated with the user flow;
when the user traffic of the buffer is smaller than a second preset threshold, the traffic duplication coefficient is a real number which is greater than 1 and positively correlated with the user traffic.
A computer-readable storage medium is also provided herein, having stored thereon a computer program that, when executed, performs the steps of the above-described method.
FIG. 4 is a block diagram illustrating a computer device for TCPCOPY testing in accordance with an exemplary embodiment. For example, the computer device may be provided as a server. Referring to fig. 4, the computer device includes a processor 401, and the number of the processors may be set to one or more as necessary. The computer device further comprises a memory 402 for storing instructions, e.g. application programs, executable by the processor 401. The number of the memories can be set to one or more according to needs. Which may store one or more application programs. The processor 401 is configured to execute instructions to perform the above-described method.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus (device), or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, including, but not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer, and the like. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of additional like elements in the article or device comprising the element.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and variations of this invention provided they come within the scope of the appended claims and their equivalents.

Claims (12)

1. A TCPCOPY test method, comprising:
starting a first container, a second container and a third container which are arranged in the same service server;
the first container acquires flow information from a buffer of the service server, executes a TCPCOPY command and sends the flow information to a second container;
the second container receives the flow information, performs service test on the flow information, and sends the tested response flow to a third container;
and the third container receives the response flow and cleans the response flow.
2. The TCPCOPY test method of claim 1,
after the third container cleans the response flow, the method further includes: deleting the first container, the second container, and the third container.
3. The TCPCOPY test method of claim 1,
the first container uses a host network mode and shares an IP with the service server;
the second container and the third container use a bridge network mode, and the IP of the second container and the IP of the third container are both private network IPs.
4. The TCPCOPY test method of claim 1,
after the first container, the second container and the third container which are arranged in the same service server are started, the method further comprises the following steps:
sharing a directory of the traffic server for TCPCOPY testing to the first container, the second container, and the third container;
the second container writes the network address of the second container into a second container configuration file under the directory; the third container writes the network address of the third container into a third container configuration file under the directory;
the executing the TCPCOPY command comprises: the first container reads the network address of the second container from a second container configuration file under the directory, reads the network address of the third container from a third container configuration file under the directory, and executes the TCPCOPY command according to the network address of the second container and the network address of the third container;
the sending the traffic information to a second container comprises: the first container reads the network address of the second container from a second container configuration file in the directory, and sends the flow information to the network address of the second container;
the sending the tested response traffic to the third container includes: the second container reads the network address of the third container from a third container configuration file under the directory; and sending the tested response flow to the network address of the third container.
5. The TCPCOPY test method of claim 1,
the first container obtaining the traffic information from the buffer of the service server includes:
determining a flow replication coefficient according to a preset rule, and replicating flow information matched with the flow replication coefficient from the buffer, wherein the flow replication coefficient is a coefficient larger than 1 or smaller than 1;
the preset rule comprises at least one of the following rules:
when the current time belongs to a first preset time period, the flow duplication coefficient is a real number greater than 1;
when the current time belongs to a second preset time period, the flow duplication coefficient is a real number smaller than 1;
when the user flow of the buffer is greater than a first preset threshold, the flow duplication coefficient is a real number which is less than 1 and is negatively correlated with the user flow;
when the user traffic of the buffer is smaller than a second preset threshold, the traffic duplication coefficient is a real number which is greater than 1 and positively correlated with the user traffic.
6. A TCPCOPY test apparatus, comprising: the device comprises a starting module, a first container, a second container and a third container;
the starting module is configured to start a first container, a second container and a third container which are arranged in the same service server;
the first container is configured to acquire traffic information from a buffer of the service server, execute a TCPCOPY command, and send the traffic information to a second container;
the second container is configured to receive the traffic information, perform service test on the traffic information, and send the tested response traffic to a third container;
the third container is configured to receive the response flow and clean the response flow.
7. The TCPCOPY test device of claim 6,
further comprising a deletion module configured to delete the first container, the second container, and the third container.
8. The TCPCOPY test device of claim 6,
the first container uses a host network mode and shares an IP with the service server;
the second container and the third container use a bridge network mode, and the IP of the second container and the IP of the third container are both private network IPs.
9. The TCPCOPY test device of claim 6,
the sharing module is configured to share the directory of the service server for performing the TCPCOPY test to the first container, the second container and the third container;
the second container is further configured to write a network address of the second container into a second container configuration file under the directory; further configured to send the tested reply traffic to a third container using: the second container reads the network address of the third container from a third container configuration file under the directory; sending the tested response flow to the network address of the third container;
the third container is further configured to write a network address of the third container into a third container configuration file under the directory;
the first container further configured to execute a TCPCOPY command using the following method: reading the network address of the second container from a second container configuration file under the directory, reading the network address of the third container from a third container configuration file under the directory, and executing the TCPCOPY command according to the network address of the second container and the network address of the third container; further configured to send the traffic information to a second container using: and reading the network address of the second container from a second container configuration file under the directory, and sending the flow information to the network address of the second container.
10. The TCPCOPY test device of claim 6,
the first container is further configured to obtain traffic information from a cache of the service server using:
determining a flow replication coefficient according to a preset rule, and replicating flow information matched with the flow replication coefficient from the buffer, wherein the flow replication coefficient is a coefficient larger than 1 or smaller than 1;
the preset rule comprises at least one of the following rules:
when the current time belongs to a first preset time period, the flow duplication coefficient is a real number greater than 1;
when the current time belongs to a second preset time period, the flow duplication coefficient is a real number smaller than 1;
when the user flow of the buffer is greater than a first preset threshold, the flow duplication coefficient is a real number which is less than 1 and is negatively correlated with the user flow;
when the user traffic of the buffer is smaller than a second preset threshold, the traffic duplication coefficient is a real number which is greater than 1 and positively correlated with the user traffic.
11. A computer-readable storage medium, on which a computer program is stored, which, when executed, carries out the steps of the method according to any one of claims 1 to 5.
12. A computer arrangement comprising a processor, a memory and a computer program stored on the memory, wherein the steps of the method according to any of claims 1-5 are implemented when the computer program is executed by the processor.
CN201910640434.0A 2019-07-16 2019-07-16 TCPCOPY test method, device, medium and equipment Pending CN112242933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910640434.0A CN112242933A (en) 2019-07-16 2019-07-16 TCPCOPY test method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910640434.0A CN112242933A (en) 2019-07-16 2019-07-16 TCPCOPY test method, device, medium and equipment

Publications (1)

Publication Number Publication Date
CN112242933A true CN112242933A (en) 2021-01-19

Family

ID=74167026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910640434.0A Pending CN112242933A (en) 2019-07-16 2019-07-16 TCPCOPY test method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN112242933A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124744A (en) * 2021-11-24 2022-03-01 绿盟科技集团股份有限公司 Flow data display method and device, electronic equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101571829A (en) * 2009-06-19 2009-11-04 北京航空航天大学 Automatic closed loop test method of real-time embedded software
CN102855173A (en) * 2011-06-27 2013-01-02 北京新媒传信科技有限公司 Method and device for testing software performance
CN105933137A (en) * 2015-12-21 2016-09-07 中国银联股份有限公司 Resource management method, device and system
CN106453299A (en) * 2016-09-30 2017-02-22 北京奇虎科技有限公司 Network security monitoring method and device, and cloud WEB application firewall
CN106657248A (en) * 2016-11-01 2017-05-10 山东大学 Docker container based network load balancing system and establishment method and operating method thereof
CN107222365A (en) * 2017-06-08 2017-09-29 百度在线网络技术(北京)有限公司 Data processing method, device and server
CN108111364A (en) * 2016-11-24 2018-06-01 苏宁云商集团股份有限公司 The test method and device of a kind of operation system
CN108304270A (en) * 2017-12-12 2018-07-20 中国电子科技集团公司电子科学研究院 A kind of communication means, equipment and computer readable storage medium
US20180329943A1 (en) * 2015-08-06 2018-11-15 International Business Machines Corporation Vertical tuning of distributed analytics clusters
CN108959046A (en) * 2018-06-08 2018-12-07 联想(北京)有限公司 A kind of information processing method, equipment and device
CN109739744A (en) * 2018-12-05 2019-05-10 北京奇艺世纪科技有限公司 A kind of test macro and method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101571829A (en) * 2009-06-19 2009-11-04 北京航空航天大学 Automatic closed loop test method of real-time embedded software
CN102855173A (en) * 2011-06-27 2013-01-02 北京新媒传信科技有限公司 Method and device for testing software performance
US20180329943A1 (en) * 2015-08-06 2018-11-15 International Business Machines Corporation Vertical tuning of distributed analytics clusters
CN105933137A (en) * 2015-12-21 2016-09-07 中国银联股份有限公司 Resource management method, device and system
CN106453299A (en) * 2016-09-30 2017-02-22 北京奇虎科技有限公司 Network security monitoring method and device, and cloud WEB application firewall
CN106657248A (en) * 2016-11-01 2017-05-10 山东大学 Docker container based network load balancing system and establishment method and operating method thereof
CN108111364A (en) * 2016-11-24 2018-06-01 苏宁云商集团股份有限公司 The test method and device of a kind of operation system
CN107222365A (en) * 2017-06-08 2017-09-29 百度在线网络技术(北京)有限公司 Data processing method, device and server
CN108304270A (en) * 2017-12-12 2018-07-20 中国电子科技集团公司电子科学研究院 A kind of communication means, equipment and computer readable storage medium
CN108959046A (en) * 2018-06-08 2018-12-07 联想(北京)有限公司 A kind of information processing method, equipment and device
CN109739744A (en) * 2018-12-05 2019-05-10 北京奇艺世纪科技有限公司 A kind of test macro and method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
NAMENOTEFOUND: "TCPCopy", 《《HTTPS://BLOG.CSDN.NET/WYXPKU/ARTICLE/DETAILS/52076210》 *
WANGBIN517: "tcpcopy架构漫谈", 《HTTPS://BLOG.CSDN.NET/WANGBIN579/ARTICLE/DETAILS/8949315》 *
青岛英孚教育科技股份有限公司: "《云计算与虚拟化技术》", 28 February 2018 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124744A (en) * 2021-11-24 2022-03-01 绿盟科技集团股份有限公司 Flow data display method and device, electronic equipment and storage medium
CN114124744B (en) * 2021-11-24 2023-06-02 绿盟科技集团股份有限公司 Flow data display method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11593302B2 (en) Methods, systems, and computer readable mediums for implementing a data protection policy for a transferred enterprise application
US10241681B2 (en) Management of physical extents for space efficient storage volumes
US10409658B2 (en) Batch processing of messages
CN112131099B (en) Version upgrading test method and device
US10204021B2 (en) Recovery of an infected and quarantined file in a primary storage controller from a secondary storage controller
US10599675B2 (en) Hybrid data replication
US20120260053A1 (en) Cascade ordering
WO2018214905A1 (en) Data storage method, apparatus, medium and device
US20190272391A1 (en) Efficient auditing of data in object storage
US20180307575A1 (en) Automated test generation for multi-interface and multi-platform enterprise virtualization management environment
CN108829588A (en) A kind of processing method of test application program, deployment system and device
CN105224541B (en) Uniqueness control method, information storage means and the device of data
CN112242933A (en) TCPCOPY test method, device, medium and equipment
CN111443894A (en) Random number generation method, device and medium based on block chain
CN110944026A (en) Network file system replacement method, cluster configuration file sharing method and device
US20220206836A1 (en) Method and Apparatus for Processing Virtual Machine Migration, Method and Apparatus for Generating Virtual Machine Migration Strategy, Device and Storage Medium
CN108197323A (en) Applied to distributed system map data processing method
CN105989096A (en) Account information clearing method and apparatus
CN107423367A (en) Web page loading method and device
CN112433950A (en) Method for automatically building test environment, electronic equipment and storage medium
CN114297058B (en) Test method and device
CN110874238A (en) Online service updating method and device
CN116258524B (en) Advertisement putting method, device, equipment and storage medium based on bloom filter
US11194660B1 (en) Listing and protocol for namespace index
US20210373777A1 (en) Leasing unordered items in namespace indices

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210119

RJ01 Rejection of invention patent application after publication