CN109412960B - High-concurrency TCP application congestion control method based on dynamic adjustment of TCP connection number - Google Patents
High-concurrency TCP application congestion control method based on dynamic adjustment of TCP connection number Download PDFInfo
- Publication number
- CN109412960B CN109412960B CN201811208741.3A CN201811208741A CN109412960B CN 109412960 B CN109412960 B CN 109412960B CN 201811208741 A CN201811208741 A CN 201811208741A CN 109412960 B CN109412960 B CN 109412960B
- Authority
- CN
- China
- Prior art keywords
- tcp
- concurrent
- upper limit
- tcp connections
- connections
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/19—Flow control; Congestion control at layers above the network layer
- H04L47/193—Flow control; Congestion control at layers above the network layer at the transport layer, e.g. TCP related
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a high-concurrency TCP application congestion control method based on dynamic adjustment of TCP connection quantity, belongs to the technical field of computer communication networks, and solves the problem that application throughput is sharply reduced due to serious congestion caused by high-concurrency TCP application at a data sending or receiving end. Calculating an initial value of an upper limit of the number of concurrent TCP connections according to the network bandwidth capacity and the average transmission rate of a single TCP connection in the network; according to the initial value of the upper limit of the number of the concurrent TCP connections, establishing a corresponding number of concurrent TCP connections; dynamically adjusting the upper limit of the number of the concurrent TCP connections according to the state of the concurrent TCP connections; and according to the adjusted upper limit of the number of the concurrent TCP connections and the number of the current concurrent TCP connections, establishing a corresponding number of concurrent TCP connections, and finishing congestion control on the high-concurrency TCP application.
Description
Technical Field
The invention relates to a computer communication network, in particular to a high-concurrency TCP application congestion control method based on dynamic adjustment of TCP connection quantity.
Background
With the rapid development of distributed computing and storage technologies, highly concurrent TCP applications are widely deployed in computer communication networks. Such applications simultaneously obtain information from a large number of data sources by establishing concurrent TCP connections and then aggregate the information for further processing. For example, in a power system protection communication private network, a protection master station needs to periodically read device logs from a large number of power access terminals, and then determines the operating state of a power grid according to summarized data; in a data center, a search application divides a search task into subtasks and distributes the subtasks to hundreds of servers for processing, and then aggregates the processing results of the servers to obtain a final search result.
However, the high-concurrency TCP service has the characteristic of burst large flow, and is very easy to cause serious congestion at a data sending end or a receiving end. In extreme congestion situations, a large number of concurrent TCP connections fall into a time-out retransmission state due to excessive packet loss, i.e. the TCP connections suspend sending data packets for a period of time (default value is 200 ms). This will significantly reduce the TCP transmission rate and ultimately affect the overall communication performance of the application.
By controlling the congestion degree of the high-concurrency TCP, the problem of communication performance reduction of the high-concurrency TCP application due to serious congestion can be effectively solved. Based on this idea, researchers have proposed many congestion control methods for highly concurrent TCP. However, these methods are congestion control methods based on network devices or transmission control protocols, and it is necessary to substantially modify network hardware or a terminal operating system, and a large amount of manpower and material resources are consumed, so that it is difficult to implement rapid and large-scale deployment in a real network.
Disclosure of Invention
The invention provides a high-concurrency TCP application congestion control method based on TCP connection quantity dynamic adjustment, aiming at solving the defects and deficiencies of the prior art, and the network congestion degree is controlled within a reasonable range by dynamically adjusting the TCP connection quantity on the premise of not modifying network hardware or a terminal operating system; the invention fully utilizes the network bandwidth capacity on one hand, and avoids serious network congestion caused by high-concurrency TCP application when transmitting data on the other hand, thereby effectively improving the communication performance of the application.
The invention is realized by the following technical scheme:
the high-concurrency TCP application congestion control method based on the dynamic regulation of the TCP connection number comprises the following steps:
s1, calculating the initial value of the upper limit of the number of the concurrent TCP connections applied by the high concurrent TCP through the network bandwidth capacity and the average transmission rate of the single TCP connection in the network;
s2, establishing a corresponding number of concurrent TCP connections according to the initial value of the upper limit of the number of the concurrent TCP connections calculated in the step S1;
s3, dynamically adjusting the upper limit of the number of the concurrent TCP connections according to the state of the concurrent TCP connections in the step S2;
and S4, reestablishing the corresponding number of concurrent TCP connections according to the dynamically adjusted upper limit of the number of the concurrent TCP connections and the current number of the concurrent TCP connections in the step S3, and completing congestion control on the high-concurrency TCP application.
Further, the calculation formula of the initial value of the upper limit of the number of TCP connections for the high concurrency TCP application in step S1 is as follows:
n0=max{1,C/X}
wherein n is0The initial value of the upper limit of the number of TCP connections for high concurrency TCP applications, C the network bandwidth capacity, and X the average transmission rate of a single TCP connection in the network.
Further, the specific step of step S2 includes:
s2-1, if n0< N, new N0Parallel TCP connections, where n0The initial value of the upper limit of the number of the TCP connections of the high-concurrency TCP application obtained in the step S1 is obtained, and N is the total number of the TCP connections required to be established by the high-concurrency TCP application;
s2-2, if n0And (4) more than or equal to N, and establishing N concurrent TCP connections.
Further, the specific step of step S3 includes:
s3-1, acquiring the state of the established concurrent TCP connection in the step S2, wherein the state includes successful transmission of a data packet, completion of data transmission of the TCP connection and overtime retransmission of the TCP connection;
s3-2, when one TCP connection completes data transmission, deducing whether any TCP connection is in a serious congestion state, wherein the judging method is as follows: for a certain TCP connection which does not complete data transmission, if three TCP connections established after the former TCP connection complete data transmission after the last TCP connection successfully transmits a data packet, the TCP connection is judged to be in a serious congestion state;
s3-3, if no TCP connection is in a serious congestion state, the upper limit of the number of concurrent TCP connections is additively increased, and the formula is as follows:
wherein n is the upper limit of the number of concurrent TCP connections;
s3-4, if finding that the TCP connection is in a serious congestion state, multiplicatively reducing the upper limit of the number of concurrent TCP connections, and the formula is as follows:
wherein n is the upper limit of the number of concurrent TCP connections;
s3-5, if the TCP connection is retransmitted overtime, resetting the upper limit of the number of concurrent TCP connections to an initial value, wherein the formula is as follows:
n=n0
where n is the upper limit of the number of concurrent TCP connections, n0The initial value of the upper limit of the number of the concurrent TCP connections obtained in the step 1 is obtained.
Further, the specific step of step S4 includes:
s4-1, if n is less than n, then establishing n-n parallel TCP connections, wherein n is the number of established and unfinished parallel TCP connections, and n is the upper limit of the number of the parallel TCP connections obtained in the step S3;
s4-2, if n is not less than n, not establishing a concurrent TCP connection temporarily;
s4-3, jumping to step S3.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. the congestion degree of the concurrent TCP application is controlled within a reasonable range, the network bandwidth capacity is fully utilized on the premise of effectively avoiding excessive congestion of the concurrent TCP, so that the communication performance of the high concurrent TCP application is remarkably improved, and in a typical data center high concurrent TCP communication scene (the bandwidth capacity of a bottleneck link of the high concurrent TCP application is 1Gbps, the end-to-end round-trip transmission delay is less than 1ms, and the number of data sources is 1000), the effective throughput of the application is averagely improved by more than 10 times, and the end-to-end round-trip delay is averagely reduced by more than 80%;
2. the dynamic adjustment of the number of the concurrent TCP connections is realized in an application layer software mode, only high-concurrency TCP application needs to be upgraded, network equipment or a terminal operating system does not need to be modified, the running of the existing service is not influenced, and the deployment cost is low, simple and rapid.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
FIG. 1 is a schematic flow chart of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.
Examples
As shown in fig. 1, the method for controlling congestion of high concurrent TCP application based on dynamic adjustment of TCP connection number includes the following steps:
s1, calculating the initial value of the upper limit of the number of the concurrent TCP connections applied by the high concurrent TCP through the network bandwidth capacity and the average transmission rate of the single TCP connection in the network;
the calculation formula of the initial value of the upper limit of the number of TCP connections for the high-concurrency TCP application in step S1 is as follows:
n0=max{1,C/X}
wherein n is0The initial value of the upper limit of the number of TCP connections for high concurrency TCP applications, C the network bandwidth capacity, and X the average transmission rate of a single TCP connection in the network.
In this embodiment, when the network bandwidth capacity C is 1Gbps and the average transmission rate X of a single TCP connection is 0.5Gbps, the initial value of the upper limit of the number of concurrent TCP connections is
n0=max{1,C/X}
=max{1,1Gbps/0.5Gbps}
=2
The larger of 1 and C/X is taken in the above formula, so the initial value n of the upper limit of the number of concurrent TCP connections is ensured0Not lower than 1.
S2, establishing a corresponding number of concurrent TCP connections according to the initial value of the upper limit of the number of the concurrent TCP connections calculated in the step S1;
the specific steps of step S2 include:
s2-1, if n0< N, new N0Parallel TCP connections, where n0The initial value of the upper limit of the number of the TCP connections of the high-concurrency TCP application obtained in the step S1 is obtained, and N is the total number of the TCP connections required to be established by the high-concurrency TCP application;
in this embodiment, an initial value n for the upper limit of the number of concurrent TCP connections is set02, newly building 2 parallel TCP connections when the total number N of the TCP connections needed to be built by the high parallel TCP application is 1000;
s2-2, if n0More than or equal to N, newly establishing N concurrent TCP connections;
in this embodiment, an initial value n for the upper limit of the number of concurrent TCP connections is set0And when the total number N of the TCP connections required to be established by the high-concurrency TCP application is 5, 5 concurrent TCP connections are newly established.
S3, dynamically adjusting the upper limit of the number of the concurrent TCP connections according to the state of the concurrent TCP connections in the step S2;
the specific steps of step S3 include:
s3-1, acquiring the state of the established concurrent TCP connection in the step S2, wherein the state includes successful transmission of a data packet, completion of data transmission of the TCP connection and overtime retransmission of the TCP connection;
s3-2, when one TCP connection completes data transmission, deducing whether any TCP connection is in a serious congestion state, wherein the judging method is as follows: for a certain TCP connection which does not complete data transmission, if three TCP connections established after the former TCP connection complete data transmission after the last TCP connection successfully transmits a data packet, the TCP connection is judged to be in a serious congestion state;
s3-3, if no TCP connection is in a serious congestion state, the upper limit of the number of concurrent TCP connections is additively increased, and the formula is as follows:
wherein n is the upper limit of the number of concurrent TCP connections;
in this embodiment, if the upper limit of the number of concurrent TCP connections is currently n-4, the number is updated to n
S3-4, if finding that the TCP connection is in a serious congestion state, multiplicatively reducing the upper limit of the number of concurrent TCP connections, and the formula is as follows:
wherein n is the upper limit of the number of concurrent TCP connections;
in this embodiment, if the upper limit of the number of concurrent TCP connections is currently n equal to 10, the number is updated to n
S3-5, if the TCP connection is retransmitted overtime, resetting the upper limit of the number of concurrent TCP connections to an initial value, wherein the formula is as follows:
n=n0
where n is the upper limit of the number of concurrent TCP connections, n0The initial value of the upper limit of the number of the concurrent TCP connections obtained in the step 1 is obtained;
in this embodiment, let n be 10 at the upper limit of the number of concurrent TCP connections, and let n be an initial value of the upper limit of the number of concurrent TCP connections0If 2, update the upper limit of the number of concurrent TCP connections to
n=2。
And S4, reestablishing the corresponding number of concurrent TCP connections according to the dynamically adjusted upper limit of the number of the concurrent TCP connections and the current number of the concurrent TCP connections in the step S3, and completing congestion control on the high-concurrency TCP application.
The specific steps of step S4 include:
s4-1, if n is less than n, then establishing n-n parallel TCP connections, wherein n is the number of established and unfinished parallel TCP connections, and n is the upper limit of the number of the parallel TCP connections obtained in the step S3;
in this embodiment, if the upper limit of the number of the concurrent TCP connections is set to n ═ 10, and the number of the established and unfinished concurrent TCP connections is set to n ═ 8, then 2 concurrent TCP connections are newly established;
s4-2, if n is not less than n, not establishing a concurrent TCP connection temporarily;
in this embodiment, the upper limit of the number of concurrent TCP connections is set to n ═ 10, and the number of established and unfinished concurrent TCP connections is set to n ═ 15, then the concurrent TCP connection is not newly established;
s4-3, jumping to step S3;
here, the high-concurrency TCP application continuously pays attention to the state of the established concurrent TCP connection, and dynamically adjusts the upper limit of the number of concurrent TCP connections according to step S3.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (4)
1. The high-concurrency TCP application congestion control method based on the dynamic adjustment of the TCP connection number is characterized by comprising the following steps of:
s1, calculating the initial value of the upper limit of the number of the concurrent TCP connections applied by the high concurrent TCP through the network bandwidth capacity and the average transmission rate of the single TCP connection in the network;
s2, establishing a corresponding number of concurrent TCP connections according to the initial value of the upper limit of the number of the concurrent TCP connections calculated in the step S1;
s3, dynamically adjusting the upper limit of the number of the concurrent TCP connections according to the state of the concurrent TCP connections in the step S2;
s4, reestablishing the corresponding number of concurrent TCP connections according to the dynamically adjusted upper limit of the number of the concurrent TCP connections and the current number of the concurrent TCP connections in the step S3, and completing congestion control on high-concurrency TCP application;
the specific steps of step S3 include:
s3-1, acquiring the state of the established concurrent TCP connection in the step S2, wherein the state includes successful transmission of a data packet, completion of data transmission of the TCP connection and overtime retransmission of the TCP connection;
s3-2, when one TCP connection completes data transmission, deducing whether any TCP connection is in a serious congestion state, wherein the judging method is as follows: for a certain TCP connection which does not complete data transmission, if three TCP connections established after the former TCP connection complete data transmission after the last TCP connection successfully transmits a data packet, the TCP connection is judged to be in a serious congestion state;
s3-3, if no TCP connection is in a serious congestion state, the upper limit of the number of concurrent TCP connections is additively increased, and the formula is as follows:
wherein n is the upper limit of the number of concurrent TCP connections;
s3-4, if finding that the TCP connection is in a serious congestion state, multiplicatively reducing the upper limit of the number of concurrent TCP connections, and the formula is as follows:
wherein n is the upper limit of the number of concurrent TCP connections;
s3-5, if the TCP connection is retransmitted overtime, resetting the upper limit of the number of concurrent TCP connections to an initial value, wherein the formula is as follows:
n=n0
where n is the upper limit of the number of concurrent TCP connections, n0The initial value of the upper limit of the number of the concurrent TCP connections obtained in the step 1 is obtained.
2. The TCP connection number dynamic adjustment based congestion control method for high concurrent TCP application according to claim 1, wherein the calculation formula of the initial value of the upper limit of the TCP connection number of high concurrent TCP application in step S1 is as follows:
n0=max{1,C/X}
wherein n is0The initial value of the upper limit of the number of TCP connections for high concurrency TCP applications, C the network bandwidth capacity, and X the average transmission rate of a single TCP connection in the network.
3. The method for controlling the congestion of the highly concurrent TCP application according to claim 1, wherein the step S2 includes:
s2-1, if n0< N, new N0Parallel TCP connections, where n0The initial value of the upper limit of the number of the TCP connections of the high-concurrency TCP application obtained in the step S1 is obtained, and N is the total number of the TCP connections required to be established by the high-concurrency TCP application;
s2-2, if n0And (4) more than or equal to N, and establishing N concurrent TCP connections.
4. The method for controlling the congestion of the highly concurrent TCP application according to claim 1, wherein the step S4 includes:
s4-1, if n is less than n, then establishing n-n parallel TCP connections, wherein n is the number of established and unfinished parallel TCP connections, and n is the upper limit of the number of the parallel TCP connections obtained in the step S3;
s4-2, if n is not less than n, not establishing a concurrent TCP connection temporarily;
s4-3, jumping to step S3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811208741.3A CN109412960B (en) | 2018-10-17 | 2018-10-17 | High-concurrency TCP application congestion control method based on dynamic adjustment of TCP connection number |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811208741.3A CN109412960B (en) | 2018-10-17 | 2018-10-17 | High-concurrency TCP application congestion control method based on dynamic adjustment of TCP connection number |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109412960A CN109412960A (en) | 2019-03-01 |
CN109412960B true CN109412960B (en) | 2022-04-29 |
Family
ID=65468425
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811208741.3A Active CN109412960B (en) | 2018-10-17 | 2018-10-17 | High-concurrency TCP application congestion control method based on dynamic adjustment of TCP connection number |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109412960B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110290003A (en) * | 2019-06-27 | 2019-09-27 | 携程旅游信息技术(上海)有限公司 | Dynamically distribute the method and system of the TCP connection number of short message supplier |
CN112291180A (en) * | 2019-07-22 | 2021-01-29 | 中兴通讯股份有限公司 | Message load balancing method |
CN113014512B (en) * | 2021-03-14 | 2022-12-09 | 白杨 | Network connection accelerated forwarding method based on N: M connection dynamic mapping |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009200611A (en) * | 2008-02-19 | 2009-09-03 | Nippon Telegr & Teleph Corp <Ntt> | TCP CONNECTION NUMBER CONTROL METHOD FOR iSCSI SESSION, iSCSI HOST DEVICE, AND CONSTITUTING PROGRAM FOR iSCSI INITIATOR |
CN104349509A (en) * | 2013-08-08 | 2015-02-11 | 佳能株式会社 | Mobile device and communication control method |
-
2018
- 2018-10-17 CN CN201811208741.3A patent/CN109412960B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009200611A (en) * | 2008-02-19 | 2009-09-03 | Nippon Telegr & Teleph Corp <Ntt> | TCP CONNECTION NUMBER CONTROL METHOD FOR iSCSI SESSION, iSCSI HOST DEVICE, AND CONSTITUTING PROGRAM FOR iSCSI INITIATOR |
CN104349509A (en) * | 2013-08-08 | 2015-02-11 | 佳能株式会社 | Mobile device and communication control method |
Also Published As
Publication number | Publication date |
---|---|
CN109412960A (en) | 2019-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109412960B (en) | High-concurrency TCP application congestion control method based on dynamic adjustment of TCP connection number | |
CN110198278B (en) | Lyapunov optimization method for vehicle networking cloud and edge joint task scheduling | |
CN107276850B (en) | Method and system for testing and transmitting unified interface of electricity consumption information acquisition system | |
CN103905328A (en) | Data transmission control system and method and related equipment | |
WO2004077225A2 (en) | Quality of service differentiation in wireless networks | |
EP3621342A1 (en) | Method and device for acquiring network resource, and scheduling server | |
US7675898B2 (en) | Session relay apparatus for relaying data, and a data relaying method | |
Wallace et al. | Concurrent multipath transfer using SCTP: Modelling and congestion window management | |
Hirai et al. | A proposal on cooperative transmission control middleware on a smartphone in a WLAN environment | |
WO2021036534A1 (en) | Link bandwidth adjustment method and apparatus, and storage medium | |
CN111245630A (en) | Method for simultaneously upgrading multiple devices in local area network | |
CN105227484B (en) | A kind of data transfer control method towards satellite network | |
CN117955979B (en) | Cloud network fusion edge information service method based on mobile communication node | |
CN116302578B (en) | QoS (quality of service) constraint stream application delay ensuring method and system | |
CN110891027A (en) | Named data network transmission control method, device and equipment based on queue scheduling | |
CN113915741B (en) | Instruction sending method, device and system | |
CN115514710A (en) | Weak connection flow management and control method based on self-adaptive sliding window | |
CN114301922B (en) | Reverse proxy method with delay perception load balance and storage device | |
WO2017101875A1 (en) | Transmission rate control method and device based on iscsi protocol | |
Brown | Low power wireless communication via reinforcement learning | |
JP2018508156A (en) | Dynamic adjustment method of packet transmission timing | |
CN111479261B (en) | OTA flow self-adaptive management method and device | |
CN112380175B (en) | Time management method for receiving temporary file by operating system | |
CN116886616A (en) | Congestion control method and device based on TCP, electronic equipment and storage medium | |
Pan et al. | CW-HSTCP: Fair TCP in high-speed networks |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |