Method, device and equipment for adjusting capacity of traffic forwarding network element and storage medium

By adjusting the SP cluster capacity of the traffic forwarding network element and updating the slot mapping relationship, the bottleneck of the upper limit of the number of connections of the traffic forwarding network element was solved, realizing the applicability to application scenarios with a high number of newly established connections and a high number of concurrent connections, and meeting the needs of applications such as flash sales and online live streaming.

CN116708191BActive Publication Date: 2025-11-21CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310915427.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2025-11-21
Estimated Expiration
2043-07-25

AI Technical Summary

Technical Problem

Existing traffic forwarding network elements have upper limits on the maximum number of newly established connections and the maximum number of concurrent connections, making it difficult to meet the needs of application scenarios with high numbers of newly established connections and high numbers of concurrent connections, such as flash sales and live streaming.

Method used

By controlling the nodes to adjust the capacity of the slow path SP cluster based on the operating status of the traffic forwarding network elements, and updating the mapping relationship between the slot range of the distributed key-value data storage system and the SP node group, the horizontal scaling and load balancing of the SP cluster can be achieved.

Benefits of technology

It solves the bottleneck problem of the upper limit of the number of connections of the traffic forwarding network element, and can be applied to application scenarios with a high number of newly established connections and a high number of concurrent connections, and realizes the normal execution of the traffic forwarding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708191B_ABST
    Figure CN116708191B_ABST
Patent Text Reader

Abstract

The application provides a capacity adjustment method, device and equipment of a traffic forwarding network element and a storage medium, relates to the technical field of cloud computing, and the method is applied to a control node and comprises the following steps: adjusting the capacity of a slow path SP cluster of the traffic forwarding network element according to the running state of the traffic forwarding network element; and updating the mapping relationship between a slot range and an SP node group stored by a distributed key-value data storage system according to the node information of the adjusted SP cluster; wherein the slot is related to a service request of a client. The scheme of the application solves the problem that the maximum newly established connection number, the maximum concurrent connection number and other indexes of the current traffic forwarding network element have upper limit bottlenecks by expanding and shrinking the capacity of the SP cluster, and the mapping relationship between the slot range and the SP node group is updated, so that the subsequent forwarding of the service request of the client is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a method, apparatus, device and storage medium for adjusting the capacity of a traffic forwarding network element. Background Technology

[0002] With the development of 5G technology, network applications such as live video streaming, video conferencing, short entertainment videos, online teaching, and flash sales are experiencing explosive growth. Their characteristics of high bandwidth, high concurrent connections, and high number of new connections place higher demands on traditional dedicated network equipment. Network Functions Virtualization (NFV) has emerged to address this need. It provides network functions on standard servers and features elastic scaling, effectively meeting the needs of expanding during peak network application usage and shrinking during off-peak periods, thus gaining increasing favor among cloud computing providers.

[0003] Currently, leveraging the advantages of cloud computing resource pooling, elasticity, and high reliability, network elements are being software-defined. Software network elements run on virtual machines, building higher-performance virtualized network elements and enabling NFV capabilities for traditional dedicated network devices, such as Server Load Balancing (SLB) and Network Address Translation (NAT). Among these, traffic forwarding network elements are key to realizing NFV-enabled SLB and NAT virtualized network elements.

[0004] like Figure 1 As shown, the existing traffic forwarding network element adopts a two-layer architecture, namely a session layer (also known as the slow path (SP)) with a master-slave architecture and a forwarding layer (also known as the fast path (FP)) with a distributed cluster deployment mode. Among them, the session capacity of a group of master and slave nodes of the SP node in the session layer is limited by the size of the machine memory and cannot be horizontally scaled. This results in an upper limit bottleneck for the maximum number of new connections and the maximum number of concurrent connections of the entire traffic forwarding network element, which is not easy to meet the application scenarios with a high number of new connections and a high number of concurrent connections, such as flash sales and online live streaming. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for adjusting the capacity of a traffic forwarding network element, which solves the problem that current traffic forwarding network elements have upper limits on indicators such as the maximum number of newly established connections and the maximum number of concurrent connections.

[0006] In a first aspect, to achieve the above objectives, embodiments of this application provide a capacity adjustment method for a traffic forwarding network element, applied to a control node, comprising:

[0007] adjusting a capacity of a slow path (SP) cluster of the traffic forwarding network element according to an operating state of the traffic forwarding network element;

[0008] updating a mapping relationship between a slot range and an SP node group stored by a distributed key-value data storage system according to the node information of the adjusted SP cluster; wherein the slot is related to a service request of a client.

[0009] Optionally, adjusting the capacity of the SP cluster of the traffic forwarding network element according to the operating state of the traffic forwarding network element comprises:

[0010] obtaining the operating state of the traffic forwarding network element, wherein the operating state comprises a new connection number and / or a concurrent connection number;

[0011] adjusting the capacity of the SP cluster according to the new connection number and / or the concurrent connection number, and an upper threshold value of the new connection number and a lower threshold value of the new connection number, and an upper threshold value of the concurrent connection number and a lower threshold value of the concurrent connection number.

[0012] Optionally, adjusting the capacity of the SP cluster according to the new connection number and / or the concurrent connection number, and an upper threshold value of the new connection number and a lower threshold value of the new connection number, and an upper threshold value of the concurrent connection number and a lower threshold value of the concurrent connection number comprises:

[0013] in a case where the new connection number is greater than or equal to the upper threshold value of the new connection number, and / or the concurrent connection number is greater than or equal to the upper threshold value of the concurrent connection number, adding at least one SP node group in the SP cluster;

[0014] sending a first session information migration instruction to a first SP node group master node, the first session information migration instruction being used to instruct migration of session information corresponding to a first sub-slot range to a second SP node group, wherein the first SP node group is an SP node group with the highest new connection number and / or concurrent connection number, the second SP node group is a newly added SP node group, and the first sub-slot range is a partial slot range of a first slot range corresponding to the first SP node group;

[0015] receiving a first session information migration completion instruction sent by the master node of the first SP node group.

[0016] Optionally, adjusting the capacity of the SP cluster according to the new connection number and / or the concurrent connection number, and an upper threshold value of the new connection number and a lower threshold value of the new connection number, and an upper threshold value of the concurrent connection number and a lower threshold value of the concurrent connection number comprises:

[0017] In a case that the new connection number is less than or equal to the lower threshold of the new connection number, and / or, the concurrent connection number is less than or equal to the lower threshold of the concurrent connection number, a third SP node group that needs to be removed is determined, the third SP node group being an SP node group with the lowest new connection number and / or concurrent connection number;

[0018] A second session information migration instruction is sent to a master node of the third SP node group, the second session information migration instruction being used to instruct the third SP node group to migrate locally stored session information to a fourth SP node group, wherein the fourth SP node group is an SP node group with the lowest new connection number and / or concurrent connection number except the third SP node group;

[0019] A second session migration completion instruction sent by the master node of the third SP node group is received.

[0020] The third SP node group is removed from the SP cluster.

[0021] Optionally, according to the adjusted node information of the SP cluster, a mapping relationship between slot ranges and SP node groups stored by a distributed key-value data storage system is updated, comprising:

[0022] In a case that the node information of at least one SP node group is added, node information of a first SP node group with the highest new connection number and / or concurrent connection number and node information of a newly added second SP node group are obtained;

[0023] According to the mapping relationship, a first slot range corresponding to the first SP node group is obtained;

[0024] A first sub-slot range in the first slot range is allocated to the second SP node group;

[0025] In the mapping relationship between the slot ranges and the SP node groups, the first slot range corresponding to the first SP node group is updated to a second sub-slot range, and a corresponding relationship between the second SP node group and the first sub-slot range is added; wherein the second sub-slot range is a slot range in the first slot range except the first sub-slot range.

[0026] Optionally, according to the adjusted node information of the SP cluster, a mapping relationship between slot ranges and SP node groups stored by a distributed key-value data storage system is updated, comprising:

[0027] In a case that the node information of at least one SP node group is reduced, node information of a third SP node group that is removed and node information of a fourth SP node group with the lowest new connection number and / or concurrent connection number are obtained;

[0028] According to the mapping relationship between the slot range and the SP node group, a second slot range corresponding to the third SP node group and a third slot range corresponding to the fourth SP node group are obtained;

[0029] In the mapping relationship between the slot range and the SP node group, the third slot range corresponding to the fourth SP node group is updated to a union set of the second slot range and the third slot range, and the corresponding relationship between the third SP node group and the second slot range is deleted.

[0030] In a second aspect, to achieve the above object, an embodiment of the present application provides a capacity adjustment method of a traffic forwarding network element, applied to a master node of an SP node group, comprising:

[0031] In a case where it is monitored that the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system changes, the mapping relationship between the slot range and the SP node group currently stored by the distributed key-value data storage system is read;

[0032] According to the read mapping relationship between the slot range and the SP node group, the locally stored mapping relationship between the slot range and the SP node group is updated.

[0033] Optionally, before the mapping relationship between the slot range and the SP node group currently stored by the distributed key-value data storage system is read, the method further comprises:

[0034] In a case where the master node of the SP node group is a master node of a first SP node group with the highest number of newly established connections and / or the highest number of concurrent connections in the SP cluster, a first session information migration instruction sent by a control node is received; wherein the first session information migration instruction is used to instruct migration of session information corresponding to a first sub-slot range to a second SP node group, wherein the second SP node group is a newly added SP node group;

[0035] Session information corresponding to the first sub-slot range is synchronized to the master node of the second SP node group, and session information corresponding to the first sub-slot range stored locally is cleared;

[0036] A first session information migration completion instruction is sent to the control node.

[0037] Optionally, before the mapping relationship between the slot range and the SP node group currently stored by the distributed key-value data storage system is read, the method further comprises:

[0038] In a case where the master node of the SP node group is a third SP node group master node that needs to be pruned, a second session information migration instruction sent by the control node is received, the second session information migration instruction being used to instruct migration of locally stored session information to a fourth SP node group, wherein the fourth SP node group is an SP node group that has the lowest number of newly built connections and / or the lowest number of concurrent connections other than the third SP node group;

[0039] According to the second session migration instruction, the locally stored session information is synchronized to the master node of the fourth SP node group, and the locally stored session information is cleared.

[0040] A second session migration completion instruction is sent to the control node.

[0041] Optionally, the method further comprises:

[0042] A first session query request sent by a fast path (FP) node is received, the first session query request carrying five tuple information;

[0043] According to the five tuple information and a mapping relationship between a locally stored slot range and an SP node group, a first session query result is sent to the FP node.

[0044] Optionally, according to the five tuple information and the mapping relationship between the locally stored slot range and the SP node group, the first session query result is sent to the FP node, comprising:

[0045] A slot value corresponding to the five tuple information is calculated;

[0046] Based on the mapping relationship between the locally stored slot range and the SP node group, node information of an SP node group corresponding to a slot range in which the slot value is located is found;

[0047] In a case where the found node information is node information of the SP node group, session information corresponding to the five tuple information is obtained;

[0048] The first session query result carrying the session information corresponding to the five tuple information is sent to the FP node.

[0049] Optionally, after the node information of the SP node group corresponding to the slot range in which the slot value is located is found based on the mapping relationship between the locally stored slot range and the SP node group, the method further comprises:

[0050] In a case where the found node information is not node information of the SP node group, the first session query result carrying the found node information is sent to the FP node.

[0051] In a third aspect, to achieve the above object, embodiments of the present application provide a capacity adjustment method of a traffic forwarding network element, applied to an FP node, comprising:

[0052] In the case where it is monitored that the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system changes, reading the mapping relationship between the slot range and the SP node group currently stored by the distributed key-value data storage system;

[0053] According to the read mapping relationship between the slot range and the SP node group, updating the locally stored mapping relationship between the slot range and the SP node group.

[0054] Optionally, the method further comprises:

[0055] Receiving a service request sent by a target client for the first time, the service request carrying five-tuple information;

[0056] In the case where it is determined according to the five-tuple information that the local storage does not store session information corresponding to the service request, sending a first session query request to a master node of a target SP node group according to the locally stored mapping relationship between the slot range and the SP node group;

[0057] Receiving a first session query result sent by the master node of the target SP node group;

[0058] According to the first session query result, forwarding the service request to a target server.

[0059] Optionally, sending the first session query request to the target SP node group according to the locally stored mapping relationship between the slot range and the SP node group comprises:

[0060] Taking the five-tuple information as a remainder of a hash operation to obtain a slot value corresponding to the five-tuple;

[0061] In the mapping relationship between the slot range and the SP node group, searching for an SP node group corresponding to a slot range in which the slot value is located; wherein the SP node group corresponding to the slot range in which the slot value is located is the target SP node group;

[0062] Sending the first session query request to the master node of the target SP node group.

[0063] Optionally, forwarding the service request to the target server according to the first session query result comprises:

[0064] In the case where the first session query result carries session information, forwarding the service request to the target server according to the session information.

[0065] Optionally, according to the session query result, the service request is forwarded to a target server, comprising:

[0066] In a case where the first session query result carries node information, according to the service request, a second session query request is sent to a master node of an SP node group corresponding to the node information;

[0067] A second session query result sent by the master node of the SP node group corresponding to the node information is received;

[0068] In a case where the second session query result carries session information, according to the session information carried in the second session query result, the service request is forwarded to a target server.

[0069] In a fourth aspect, to achieve the above object, an embodiment of the present application provides a capacity adjustment device of a traffic forwarding network element, applied to a control node, comprising:

[0070] An adjustment module is configured to adjust a capacity of a slow path (SP) cluster of the traffic forwarding network element according to an operating state of the traffic forwarding network element;

[0071] An update module is configured to update a mapping relationship between a slot range and an SP node group stored by a distributed key-value data storage system according to node information of the adjusted SP cluster; wherein the slot is related to a service request of a client.

[0072] In a fifth aspect, to achieve the above object, an embodiment of the present application provides a capacity adjustment device of a traffic forwarding network element, applied to a master node of an SP node group, comprising:

[0073] A reading module is configured to read a mapping relationship between a slot range and an SP node group currently stored by a distributed key-value data storage system in a case where it is monitored that the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system changes;

[0074] An update module is configured to update a mapping relationship between a slot range and an SP node group stored locally according to the read mapping relationship between the slot range and the SP node group.

[0075] In a sixth aspect, to achieve the above object, an embodiment of the present application provides a capacity adjustment device of a traffic forwarding network element, applied to an FP node, comprising:

[0076] A reading module is configured to read a mapping relationship between a slot range and an SP node group currently stored by a distributed key-value data storage system in a case where it is monitored that the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system changes;

[0077] an updating module, configured to update a mapping relationship between the slot range and the SP node group stored locally according to the read mapping relationship between the slot range and the SP node group.

[0078] In a seventh aspect, to achieve the above object, an embodiment of the present application provides a control node device, which comprises a transceiver, a processor, a memory, and a program stored in the memory and executable on the processor; and the processor implements the capacity adjustment method of the traffic forwarding network element according to the first aspect when executing the program.

[0079] In an eighth aspect, to achieve the above object, an embodiment of the present application provides a master node device of an SP node group, which comprises a transceiver, a processor, a memory, and a program stored in the memory and executable on the processor; and the processor implements the capacity adjustment method of the traffic forwarding network element according to the second aspect when executing the program.

[0080] In a ninth aspect, to achieve the above object, an embodiment of the present application provides an FP node device, which comprises a transceiver, a processor, a memory, and a program stored in the memory and executable on the processor; and the processor implements the capacity adjustment method of the traffic forwarding network element according to the third aspect when executing the program.

[0081] In a tenth aspect, to achieve the above object, an embodiment of the present application provides a readable storage medium, which stores a program or instructions; and the program or instructions are executable on a processor to implement the capacity adjustment method of the traffic forwarding network element according to the first aspect, or to implement the capacity adjustment method of the traffic forwarding network element according to the second aspect, or to implement the capacity adjustment method of the traffic forwarding network element according to the third aspect.

[0082] The above technical solutions of the present application have the following beneficial effects:

[0083] The capacity adjustment method of the traffic forwarding network element according to the embodiments of the present application first adjusts the capacity of the slow path SP cluster of the traffic forwarding network element according to the running state of the traffic forwarding network element, so as to realize the expansion and contraction of the traffic forwarding network element according to the service bandwidth demand; secondly, the control node updates the mapping relationship between the slot range and the SP node group stored in the distributed key-value data storage system according to the node information of the adjusted SP cluster; and the slot range is related to the service request of the client. In this way, after the expansion and contraction of the traffic forwarding network element, the SP node group corresponding to the service request can be found based on the mapping relationship, so as to realize the normal execution of the traffic forwarding process of the traffic forwarding network element, and solve the problem that the maximum new connection number, the maximum concurrent connection number and other indexes of the current traffic forwarding network element have upper limit bottlenecks. BRIEF DESCRIPTION OF DRAWINGS

[0084] Figure 1Architecture diagram of existing NFV session layer and forwarding layer on both sides;

[0085] Figure 2 Flow diagram of capacity adjustment method of traffic forwarding network element in an embodiment of the present application;

[0086] Figure 3 Flow diagram of capacity adjustment method of traffic forwarding network element in an embodiment of the present application;

[0087] Figure 4 Flow diagram of capacity adjustment method of traffic forwarding network element in an embodiment of the present application;

[0088] Figure 5 Architecture diagram of traffic forwarding network element applying the capacity adjustment method of traffic forwarding network element in an embodiment of the present application;

[0089] Figure 6 Timing diagram of traffic forwarding in an embodiment of the present application;

[0090] Figure 7 Mapping relationship diagram of slot and SP node group in an embodiment of the present application;

[0091] Figure 8 Timing diagram of capacity expansion and contraction of traffic forwarding network element in an embodiment of the present application;

[0092] Figure 9 Architecture diagram of capacity adjustment device of traffic forwarding network element in an embodiment of the present application;

[0093] Figure 10 Architecture diagram of capacity adjustment device of traffic forwarding network element in an embodiment of the present application;

[0094] Figure 11 Architecture diagram of capacity adjustment device of traffic forwarding network element in an embodiment of the present application;

[0095] Figure 12 Architecture diagram of control node device in an embodiment of the present application. DETAILED DESCRIPTION

[0096] To make the technical problems, technical solutions and advantages of the present application clearer, specific embodiments will be described in detail below with reference to the accompanying drawings.

[0097] It should be understood that every technical feature mentioned in the specification in connection with one embodiment can be combined with any other technical feature or combination of other technical features unless the disclosure or the context clearly dictates otherwise. It is emphasized that references herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Therefore, appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0098] In various embodiments of the present application, it should be understood that the size of the serial number of the following processes does not mean the order of execution, and the execution order of the processes should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0099] In addition, the terms "system" and "network" are often used interchangeably herein.

[0100] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that the determination of B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.

[0101] Before the embodiments of the present application are described, the related technical points are first described:

[0102] The traffic forwarding network element is specifically a virtualized network element with traffic forwarding function on the NFV platform, such as Figure 1 According to the foregoing, the existing traffic forwarding network element includes a session layer and a forwarding layer, wherein the session layer is responsible for the implementation of business logic, and creates and caches session information according to a business request. The forwarding layer is used for forwarding business traffic according to the session information, and the forwarding layer is stateless, and the number of cluster nodes thereof can be horizontally expanded according to the business needs. Next, taking an SLB business flow as an example, the traffic forwarding flow of the two-layer architecture is described in combination with Figure 1

[0103] Step 1: The user business request arrives at the FP node (the forwarding node of the forwarding layer) for the first time, and the FP processes the request traffic after receiving the request traffic, first queries the local session, and if the session information is not found, sends a session query message to the SP master node to query the session;

[0104] Step 2: After the SP master node receives the session query message, it is found that there is no session in the local machine, and the session new creation logic is executed;

[0105] Step 3: After the session new creation is completed, the SP master node sends the complete session information created to the FP node, and adds the session to be synchronized into a queue to wait for synchronization;

[0106] ​Step 4: FP obtains the session information, forwards the business request to the corresponding destination server based on the session information, and caches the session information locally;

[0107] Step 5: The SP master node polls the session synchronization queue, finds a session to be synchronized, encapsulates the session, and sends it to the SP backup node.

[0108] Step 6: After receiving the synchronization message, the SP backup node establishes a new session on the SP backup node.

[0109] Step 7: When the user's request traffic arrives at the FP network element for the second time, the FP queries its local cache to find the corresponding session information. At this point, it no longer queries the SP network element for session information, but directly forwards the traffic based on the local session information.

[0110] Because the SP nodes of the aforementioned traffic forwarding network elements adopt a master-slave architecture, they cannot be horizontally and elastically scaled, resulting in the traffic forwarding network elements being unable to meet application scenarios such as high number of newly established connections and large number of concurrent connections.

[0111] Based on the above problems, this application provides a method, apparatus, and device for adjusting the capacity of a traffic forwarding network element. The method for adjusting the capacity of a traffic forwarding network element according to this application will be described below with reference to the accompanying drawings.

[0112] like Figure 5 As shown, the traffic forwarding network element in this embodiment adds a control layer to the existing two-layer architecture of session layer and forwarding layer, and optimizes the forwarding layer and session layer. The control layer includes a control node and a distributed key-value storage system (such as an ETCD system). The control node is used to adjust the capacity of the session layer, and the ETCD is used to store relevant information within the traffic forwarding network element. The improvement to the session layer is to optimize the original master-slave architecture deployment method to a distributed deployment method. In addition, adaptive optimizations have been made to the forwarding layer.

[0113] Based on the architecture of the traffic forwarding network elements described above, such as Figure 2 As shown in the figure, this application embodiment provides a capacity adjustment method for a traffic forwarding network element. This method is applied to the above-mentioned control node and includes:

[0114] Step 201: Adjust the capacity of the SP cluster of the traffic forwarding network element according to its operating status. Specifically, this step involves horizontally scaling the SP cluster to flexibly adjust its capacity so that it can meet the operating requirements of the traffic forwarding network element.

[0115] In step 202, according to the node information of the adjusted SP cluster, a mapping relationship between a slot range stored by the distributed key-value data storage system and an SP node group is updated; wherein the slot is related to a service request of a client, so that in the process of traffic forwarding of the traffic forwarding network element based on the capacity adjustment, the SP node group corresponding to the service request can be accurately found, and the entire traffic forwarding process is completed.

[0116] In this step, the control node can monitor the change of the node information in the distributed key-value data storage system in real time, and when the change is monitored, the changed node information is obtained, and according to the node information before the change and the node information after the change, it is judged whether a node group is added or removed in the SP cluster, so as to update the mapping relationship between the slot range and the SP node group according to the specific node change.

[0117] The capacity adjustment method of the traffic forwarding network element of the embodiment of the application first adjusts the capacity of the slow path SP cluster of the traffic forwarding network element according to the running state of the traffic forwarding network element; secondly, the control node updates the mapping relationship between the slot range stored by the distributed key-value data storage system and the SP node group according to the node information of the adjusted SP cluster; wherein the slot is related to the service request of the client; in this way, the capacity of the traffic forwarding network element can meet the demand of the running state, and the traffic forwarding network element after the capacity adjustment can realize the forwarding of the service request based on the mapping information, which solves the problem that the existing traffic forwarding network element has an upper limit bottleneck of the maximum new connection number, the maximum concurrent connection number and the like, and makes the traffic forwarding network element applicable to application scenarios such as commodity killing, online live broadcast and the like with high new connection number and large concurrent connection number.

[0118] As an optional implementation manner, in step 201, the capacity of the slow path SP cluster of the traffic forwarding network element is adjusted according to the running state of the traffic forwarding network element, which includes:

[0119] The running state of the traffic forwarding network element is obtained, wherein the running state includes the new connection number and / or the concurrent connection number;

[0120] According to the new connection number and / or the concurrent connection number, and the upper limit threshold of the new connection number and the lower limit threshold of the new connection number, the upper limit threshold of the concurrent connection number and the lower limit threshold of the concurrent connection number, the capacity of the SP cluster is adjusted.

[0121] It should be noted that, since the existing traffic forwarding network element has the bottleneck problem of the number of new connections and the number of concurrent connections, the capacity of the traffic forwarding network element needs to be adjusted based on the two parameters in the embodiment of the application. Specifically, in the optional implementation manner, when the capacity of the SP cluster is adjusted, on the one hand, based on the pre-set upper limit threshold of the number of new connections / the upper limit threshold of the number of concurrent connections, the existing bottleneck problem can be solved, and on the other hand, based on the pre-set lower limit threshold of the number of new connections / the lower limit threshold of the number of concurrent connections, the waste of resources can be avoided.

[0122] As a specific implementation manner, the capacity of the SP cluster is adjusted according to the number of new connections and / or the number of concurrent connections, and the upper limit threshold of the number of new connections and the lower limit threshold of the number of new connections, and the upper limit threshold of the number of concurrent connections and the lower limit threshold of the number of concurrent connections, including:

[0123] In the case that the number of new connections is greater than or equal to the upper limit threshold of the number of new connections, and / or the number of concurrent connections is greater than or equal to the upper limit threshold of the number of concurrent connections, at least one SP node group is added in the SP cluster; that is, when the capacity of the traffic forwarding network element is insufficient to support the current service demand, the traffic forwarding network element is expanded (specifically, a new SP node group is added in the SP cluster to perform horizontal elastic expansion on the SP cluster) to meet the capacity requirement of the traffic forwarding network element for the current service demand, and solve the bottleneck problem of the number of new connections and / or the maximum number of concurrent connections of the existing traffic forwarding network element.

[0124] The first session information migration instruction is sent to the master node of the first SP node group, and the first session information migration instruction is used to instruct to migrate the session information corresponding to the first sub-slot range to the second SP node group, wherein the first SP node group is the SP node group with the highest number of new connections and / or the highest number of concurrent connections, and the second SP node group is the newly added SP node group; in this step, the first sub-slot range is part of the slot range corresponding to the first SP node group, and preferably, the first sub-slot range is 1 / 2 of the slot range corresponding to the first SP node group.

[0125] The first session information migration completion instruction sent by the master node of the first SP node group is received.

[0126] In the specific implementation, when the session capacity of the SP cluster cannot meet the current session demand, the horizontal elastic expansion of the SP cluster is implemented by adding an SP node group in the SP cluster. Further, after adding the SP node group in the SP cluster, part of the slot ranges in the slot range corresponding to the SP node group with the highest session quantity (the highest newly created connection number and / or the highest concurrent connection number) is allocated to the newly added SP node group, and the corresponding session information is migrated to the newly added SP node group, so that the traffic forwarding process when a subsequent client service request is implemented, so that the traffic forwarding unit can be applied to the application scenario with a high newly created connection number and / or a large concurrent connection number.

[0127] As another specific implementation, the capacity of the SP cluster is adjusted according to the newly created connection number and / or the concurrent connection number, and the upper threshold value and the lower threshold value of the newly created connection number and the upper threshold value and the lower threshold value of the concurrent connection number, including:

[0128] In a case where the newly created connection number is less than or equal to the lower threshold value of the newly created connection number, and / or the concurrent connection number is less than or equal to the lower threshold value of the concurrent connection number, a third SP node group that needs to be removed is determined, the third SP node group being an SP node group with the lowest newly created connection number and / or the lowest concurrent connection number;

[0129] A second session information migration instruction is sent to the master node of the third SP node group, the second session information migration instruction being used to instruct the third SP node group to migrate the locally stored session information to a fourth SP node group, wherein the fourth SP node group is an SP node group with the lowest newly created connection number and / or the lowest concurrent connection number except the third SP node group;

[0130] A second session migration completion instruction sent by the master node of the third SP node group is received.

[0131] The third SP node group is removed from the SP cluster.

[0132] That is, when the newly created connection number / concurrent connection number of the service borne by the traffic forwarding network element decreases to below the preconfigured lower threshold value, it indicates that the resource utilization rate of the cluster is low, and therefore, the session information of the node with a small newly created connection number / concurrent connection number can be migrated to other nodes, and the node can be removed, so as to save resources and avoid waste of cluster resources.

[0133] As an optional implementation, in step 202, the mapping relationship between the slot range and the SP node group stored in the distributed key-value data storage system is updated according to the node information of the adjusted SP cluster, including:

[0134] In the case that the node information of at least one SP node group is added in the node information, the node information of a first SP node group with the highest number of newly established connections and / or the highest number of concurrent connections is obtained, and the node information of a newly added second SP node group is obtained; in this step, if it is determined that the node group in the SP cluster changes to the newly added SP node group, it indicates that the capacity of the SP cluster cannot meet the current service demand, at this time, the slot range corresponding to each SP node group needs to be updated to adjust the slot range corresponding to each SP node group, and finally the load balancing of each node group in the SP cluster is realized.

[0135] According to the mapping relationship, the first slot range corresponding to the first SP node group is obtained;

[0136] The first sub-slot range in the first slot range is allocated to the second SP node group;

[0137] Through the above two steps, the slot range corresponding to the SP node group with the highest number of newly established connections / concurrent connections can be redistributed to realize the load balancing between the SP node groups.

[0138] In the mapping relationship between the slot range and the SP node group, the first slot range corresponding to the first SP node group is updated to the second sub-slot range, and the corresponding relationship between the second SP node group and the first sub-slot range is added; wherein the second sub-slot range is the slot range in the first slot range except the first sub-slot range. This step is based on the redistribution of the slot range to the SP node group, and the mapping relationship between the slot range and the SP node group is updated, which is convenient for the subsequent client to find the target SP node group corresponding to the service request to forward the service traffic.

[0139] As another optional implementation, in step 202, according to the adjusted node information of the SP cluster, the mapping relationship between the slot range and the SP node group stored by the distributed key-value data storage system is updated, including:

[0140] In the case that the node information of at least one SP node group is added in the node information, the node information of a first SP node group with the highest number of newly established connections and / or the highest number of concurrent connections is obtained, and the node information of a newly added second SP node group is obtained; in this step, if it is determined that the node group in the SP cluster changes to the newly added SP node group, it indicates that the capacity of the SP cluster cannot meet the current service demand, at this time, the slot range corresponding to each SP node group needs to be updated to adjust the slot range corresponding to each SP node group, and finally the load balancing of each node group in the SP cluster is realized.

[0141] According to the mapping relationship between the slot range and the SP node group, the second slot range corresponding to the third SP node group and the third slot range corresponding to the fourth SP node group are obtained;

[0142] The mapping relationship between the slot range and the SP node group is updated, the third slot range corresponding to the fourth SP node group is updated as the union of the second slot range and the third slot range, and the corresponding relationship between the third SP node group and the second slot range is deleted. In this step, the mapping relationship between the slot range and the SP node group is updated so that the relationship between each SP node group and the slot range in the SP cluster is consistent, so as to quickly query the session information corresponding to the service request of the client and forward the service request to the corresponding server.

[0143] As shown in Figure 3 The application embodiment provides a capacity adjustment method of a traffic forwarding network element, which is applied to a master node of an SP node group, the SP cluster to which the master node belongs adopts a distributed deployment manner, that is, the SP cluster can include a plurality of SP node groups, and the method includes the following steps:

[0144] In step 301, when it is monitored that the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system changes, the mapping relationship between the slot range and the SP node group currently stored in the distributed key-value data storage system is read.

[0145] In step 302, according to the read mapping relationship between the slot range and the SP node group, the mapping relationship between the slot range and the SP node group stored locally is updated.

[0146] In the application embodiment, the master node of each SP node group monitors the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system in real time, so that when it is monitored that the mapping relationship changes, the mapping relationship is read, and based on the read mapping relationship, the mapping relationship between the slot range and the SP node group stored locally is updated, so that the mapping relationship stored in each SP node group is consistent with the mapping relationship stored in the distributed key-value data storage system, that is, the slot range corresponding to each SP node group is consistent, so that when a service request forwarded by an FP node is received, corresponding session information can be quickly found, and finally the service request can be sent to a corresponding target server / destination server.

[0147] Further, as an optional implementation manner, before the mapping relationship between the slot range and the SP node group currently stored in the distributed key-value data storage system is read in step 301, the method further includes:

[0148] In a case where the master node of the SP node group is the master node of the first SP node group with the highest number of newly built connections and / or the highest number of concurrent connections in the SP cluster, the first session information migration instruction sent by the control node is received; the first session information migration instruction is used to instruct migration of session information corresponding to a first sub-slot range to a second SP node group, the second SP node group being a newly added SP node group; here, the first sub-slot range is a partial slot range of a first slot range corresponding to the first SP node group.

[0149] The session information corresponding to the first sub-slot range is synchronized to the master node of the second SP node group, and the locally stored session information corresponding to the first sub-slot range is cleared.

[0150] A first session information migration completion instruction is sent to the control node.

[0151] In this optional implementation, based on the first session migration instruction sent by the control node, the session migration between the first SP node group and the newly added second SP node group is completed, and load balancing between the SP node groups can be achieved.

[0152] As another optional implementation, before step 301 of reading the mapping relationship between the slot range currently stored by the distributed key-value data storage system and the SP node group, the method further includes:

[0153] In a case where the master node of the SP node group is the master node of a third SP node group that needs to be removed, a second session information migration instruction sent by the control node is received, the second session information migration instruction being used to instruct migration of locally stored session information to a fourth SP node group, the fourth SP node group being an SP node group with the lowest number of newly built connections and / or the lowest number of concurrent connections in the SP cluster except the third SP node group;

[0154] According to the second session migration instruction, the locally stored session information is synchronized to the master node of the fourth SP node group, and the locally stored session information is cleared.

[0155] A second session migration completion instruction is sent to the control node.

[0156] In this optional implementation, when the SP node group needs to be removed, the session information locally stored by the SP node group that needs to be removed is migrated to the SP cluster, and the SP node group with the smallest number of newly built connections / concurrent connections except the SP node group that needs to be removed, so as to ensure that each session information has a corresponding SP node group and achieve the effect of load balancing.

[0157] Further, as an optional implementation, the method further includes:

[0158] receive a first session query request sent by the FP node, the first session query request carrying five-tuple information; in this step, the five-tuple information includes a source IP address, a source port, a destination IP address, a destination port, and a protocol type.

[0159] send a first session query result to the FP node according to the five-tuple information and the mapping relationship between the locally stored slot range and the SP node group. For example, the first session query result includes queried session information, newly created session information, or node information.

[0160] As a specific implementation, sending the first session query result to the FP node according to the five-tuple information and the mapping relationship between the locally stored slot range and the SP node group includes:

[0161] calculate a slot value corresponding to the five-tuple information; the specific process of this step can be: performing hash calculation on the five-tuple information, and then taking the hash value modulo N to obtain the slot value (referred to as slot) corresponding to the five-tuple information, where N can be adjusted according to the actual business scale, such as N taking the value of 1024; that is: slot = hash(five-tuple) % 1024, so that each business request can be classified into different slots. Here, it should be noted that the value range of the slot is 0-1023.

[0162] based on the mapping relationship between the locally stored slot range and the SP node group, find node information of the SP node group corresponding to the slot range where the slot value is located;

[0163] in the case where the found node information is the node information of the SP node group, obtain session information corresponding to the five-tuple information; that is, if the slot value corresponding to the five-tuple in the business request belongs to the slot range corresponding to the SP node group, it indicates that the business logic of the business request should be implemented by the SP node group, therefore, the master node of the SP node group will locally obtain the session information corresponding to the business request.

[0164] Here, it should be noted that the obtaining of the session information corresponding to the five-tuple information in this step specifically includes searching for the session information corresponding to the five-tuple in the locally stored session information, if the session information corresponding to the five-tuple is found, the found session information is carried in the first session query result; if the session information corresponding to the five-tuple information is not found, the session information corresponding to the five-tuple information is newly created, and the newly created session information is carried in the first session query result, where in the case of newly created session information, the master node of the SP node group further sends the newly created session information to the session synchronization queue, and after the session is encapsulated, it is sent to the standby node of the SP node group.

[0165] The FP node is sent a first session query result carrying session information corresponding to the quintuple information, and by sending the session information corresponding to the quintuple information to the FP node, the FP node can forward the service request to a target server (destination server) to complete the service requested by the client.

[0166] Further, as an optional implementation, in the mapping relationship between the locally stored slot range and the SP node group, after the node information of the SP node group corresponding to the slot range in which the slot value is located is found, the method further includes:

[0167] In the case where the found node information is not the node information of the SP node group, the FP node is sent a first session query result carrying the found node information.

[0168] Here, it should be noted that one implementation scenario of the optional implementation is that the first session query request is received in the process of session migration of the SP node group, and the session information corresponding to the quintuple information in the session query request is migrated to another SP node group. That is, in the session information migration process, the FP node sends the first session query request to the master node of the SP node group based on the mapping relationship between the slot range and the SP node group before the update.

[0169] As shown in Figure 4 The application embodiment further provides a capacity adjustment method of a traffic forwarding network element, applied to an FP node, including:

[0170] Step 401, in the case where it is monitored that the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system changes, the mapping relationship between the slot range and the SP node group currently stored in the distributed key-value data storage system is read;

[0171] Step 402, according to the read mapping relationship between the slot range and the SP node group, the locally stored mapping relationship between the slot range and the SP node group is updated.

[0172] In the embodiments of the present application, each FP node monitors the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system in real time, so as to read the mapping relationship when the mapping relationship is monitored to change, and update the mapping relationship between the slot range and the SP node group stored locally based on the read mapping relationship, so that the mapping relationship stored in each FP node is consistent with the mapping relationship stored in the distributed key-value data storage system, so that when a service request sent by a client is received and it is determined that the session information corresponding to the service request is not cached locally, a first session query request is sent to the master node of the corresponding SP node group, so that the corresponding session information is quickly found, and finally the service request is sent to the corresponding target server / destination server.

[0173] Further, as an optional implementation, the method further comprises:

[0174] Receiving a service request sent by a target client for the first time, the service request carrying five-tuple information; as described above, the five-tuple information includes source IP address, source port, destination IP address, destination port, and protocol type.

[0175] In a case where it is determined according to the five-tuple information that the session information corresponding to the service request is not stored locally, a first session query request is sent to the master node of the target SP node group according to the mapping relationship between the slot range and the SP node group stored locally; here, the target SP node group is the slot range where the slot value corresponding to the session information is located, and the corresponding SP node group.

[0176] In addition, in a case where it is determined according to the five-tuple information that the session information corresponding to the service request is stored locally, the service request is directly forwarded to the target server / destination server based on the session information stored locally.

[0177] Receiving a first session query result sent by the master node of the target SP node group; for example, the first session query result includes the queried session information, newly created session information, or node information; specifically, when the slot range where the slot value corresponding to the five-tuple information is located matches the slot range corresponding to the target SP node group, the session information (queried session information or newly created session information) is carried in the first session query result; when the slot value corresponding to the five-tuple information is located in the slot range corresponding to the target SP node group, the node information is carried in the first session query result, and the slot value corresponding to the five-tuple information is located in the slot range corresponding to the node information.

[0178] Forwarding the service request to the target server according to the first session query result.

[0179] As a specific implementation, the first session query request is sent to the target SP node group according to the mapping relationship between the locally stored slot range and the SP node group, including:

[0180] The five-tuple information is hashed and taken modulo to obtain a slot value corresponding to the five-tuple. The implementation process of this step is similar to the process of calculating the slot value by the master node of the SP node group, which will not be repeated here.

[0181] In the mapping relationship between the slot range and the SP node group, the SP node group corresponding to the slot range where the slot value is located is found. The SP node group corresponding to the slot range where the slot value is located is the target SP node group.

[0182] The first session query request is sent to the master node of the target SP node group.

[0183] As a specific implementation, the service request is forwarded to the target server according to the first session query result, including:

[0184] In the case that the first session query result carries session information, the service request is forwarded to the target server according to the session information. That is, first, the target server is determined according to the content carried in the session information, for example, the port (port) corresponding to the real service in the back end; then, the service request is forwarded to the target server.

[0185] As another specific implementation, the service request is forwarded to the target server according to the session query result, including:

[0186] In the case that the first session query result carries node information, a second session query request is sent to the master node of the SP node group corresponding to the node information according to the service request;

[0187] The second session query result sent by the master node of the SP node group corresponding to the node information is received;

[0188] In the case that the second session query result carries session information, the service request is forwarded to the target server according to the session information carried in the second session query result.

[0189] That is, after sending the first session query request to the master node of the target SP node group, when the master node of the target SP node group determines that the slot value corresponding to the five-tuple information carried in the first session query request does not belong to the slot range corresponding to itself, the node information of the SP node group corresponding to the slot range where the slot value is located is fed back to the FP node, so as to send a second session query request to the feedback SP node group again, so as to query the session information corresponding to the five-tuple, and finally, based on the session information, the service request is forwarded to the target server.

[0190] Below, in conjunction with Figure 6 The traffic forwarding process in the embodiments of this application will be described as follows:

[0191] Step 1: When the SP node group is initialized, each node in the SP node group (master node and backup node) registers its own IP address with ETCD;

[0192] Step 2: The control node obtains all IP address information of the current SP cluster from ETCD;

[0193] Step 3: The control node, based on the number of SP nodes and the slot range, establishes a mapping table between the primary / backup SP nodes and the slots, and updates this mapping table to the ETCD; the relevant illustration of the mapping relationship is as follows. Figure 7 As shown;

[0194] Step 4: The FP node monitors the data changes of ETCD in real time. When it detects a change in the mapping relationship between slot and SP, the FP node will obtain the latest mapping relationship and cache it locally.

[0195] Step 5: SP nodes monitor ETCD data changes in real time. When a change in the mapping relationship between slot and SP is detected, the SP node will obtain the latest mapping relationship and cache it locally.

[0196] Step 6: The client initiates its first business request;

[0197] Step 7: The FP node queries its local cache but finds no session information.

[0198] Step 8: The FP node performs a hash modulo operation on the 5-tuple information of the request session to obtain the slot value; based on the slot value, it queries the local cache to obtain the IP of the SP node corresponding to the slot, such as SP1;

[0199] Step 9: The FP node initiates a session query request to the master node of the SP1 node group;

[0200] Step 10: The master node of the SP1 node group receives the session query request from the FP node, performs a hash modulo operation on the five-tuple information of the request to obtain the slot value of the request, and the master node of the SP1 node group verifies the slot value. If the slot is within the slot mapping range of the local machine, proceed to step 11; otherwise, proceed to step 18.

[0201] Step 11: If the master node of SP1 node group finds the corresponding session information in the local cache based on the request session information, then proceed to step 12; otherwise, proceed to step 14.

[0202] Step 12: According to the SP1 node group master node local session query result, the session query result is returned to the FP node;

[0203] Step 13: The FP node forwards the client request to the real server according to the session information, and completes the first request traffic forwarding;

[0204] Step 14: The SP1 node group master node creates a new session according to the request session information, and locally caches the session information;

[0205] Step 15: The SP1 node group master node returns the session information to the FP node according to the new session information;

[0206] Step 16: The FP node forwards the client request to the real server according to the session information, and completes the first request traffic forwarding;

[0207] Step 17: The SP1 node group master node sends the session information to the session synchronization queue, and sends the encapsulated session to the SP1 node group backup node;

[0208] Step 18: The SP1 node group master node queries the slot value after verification, which belongs to the SPN node group (N is a natural number, which refers to the Nth pair of SP nodes), and returns the SPN node group information to the FP node;

[0209] Step 19: The FP node re-initiates a session query request to the SPN node group master node according to the received SPN node information, and the subsequent process is the same as step 10, which will not be repeated here;

[0210] Step 20: The same client initiates a second service request to the FP node;

[0211] Step 21: The FP node obtains valid session information within the effective cache time by querying local cache information, that is, forwards the session to the real server according to the session information, and completes the second service traffic forwarding request. At this point, the NFV platform realizes the request forwarding process of the traffic forwarding network element.

[0212] Next, combined with Figure 8 , the expansion process of the traffic forwarding network element of the embodiment of the application is described, wherein Figure 8 The SP1 master and backup nodes in the step are nodes that exist at the initialization time, and the SP2 master and backup nodes are newly expanded SP master and backup nodes:

[0213] Steps 1-9, the client initiates a first request, and the FP node obtains new session information through the SP1 node group master node by calculating the slot and SP mapping relationship, and forwards the service request to the real server. This step is the same as the traffic forwarding timing diagram shown in Figure 7 , which will not be repeated here.

[0214] Step 10, when the number of new connections and the number of concurrent connections of the traffic forwarding network element (NFV traffic forwarding platform) carrying services increase and exceed the upper threshold of the SP cluster carrying capacity, the control node will apply to create a new SP master and backup node, such as SP2 master and backup node, to join the SP cluster. When the newly added SP2 master and backup node is initialized, it will register its IP address information to ETCD;

[0215] Step 11, the control node monitors the changes of the SP cluster node information in ETCD, obtains the latest SP node information to the local, and recalculates the mapping relationship between the slot and the SP cluster node. In this example, 1 / 2 of the slot range in SP1 node is divided to SP2;

[0216] Step 12, the control node sends an instruction to SP1 node to migrate the session information corresponding to 1 / 2 slot range to SP2 node;

[0217] Step 13, the SP1 master node receives the slot session information migration instruction, synchronizes the session information in the specified slot range to the SP2 master node, and clears the local cache session information.

[0218] Steps 14-16, if the SP1 master node receives a session query request from the FP node during slot migration, the session belongs to the migrated session information, and the SP1 master node returns the SP node information corresponding to the migrated slot to the FP node, such as SP2 node information in this example;

[0219] Steps 17-19, the FP reinitiates a session query request to the new node according to the node information of the slot returned by the SP1 master node, and forwards the traffic to the server;

[0220] Step 20, the SP1 master node returns a slot session information migration completion instruction to the control node;

[0221] Step 21, the control node receives the instruction that the SP1 master node has migrated, updates the slot and SP node mapping relationship to ETCD;

[0222] Steps 22-23, the FP node and the SP master node monitor the data changes of ETCD in real time, obtain the latest mapping relationship and cache it to the local;

[0223] Steps 24-27, when the Mth client request arrives at the FP node, the FP node caches the session aging time, and the FP sends the current session query request to the SP2 master node by querying the local latest slot and SP node corresponding relationship, and finally forwards the request to the corresponding real server.

[0224] In addition, the steps for elastic scaling down and scaling up of SP clusters are similar and will not be elaborated here.

[0225] Here, combined Figure 5 The functions of each functional module in the traffic forwarding network element corresponding to the scaling method of the traffic forwarding network element in the embodiments of this application are briefly described below:

[0226] The forwarding layer (FP) adds a mapping function between each request session and the session network element (SP). Specifically, in this embodiment, the five-tuple information of the service request (source IP address, source port, destination IP address, destination port, protocol type) is hashed and then modulo N (this value can be adjusted according to the actual business scale, such as taking the value 1024). The result is called a slot, i.e.: slot = hash(five-tuple) % 1024. In this embodiment, all service requests are uniformly classified into different slots. In the above example, the slot value ranges from 0 to 1023. In the newly added control layer, the ETCD cluster caches the mapping relationship between slots and SP node groups, such as slot1 corresponding to SP1, slot1023 corresponding to SP5. The FP monitors the changes in the mapping relationship between slots and SP nodes in the ETCD in real time and caches the latest mapping relationship in the FP's local memory.

[0227] When a user request first arrives at the FP node, the FP node first checks its local cache. If no relevant session information is found, it hashes the request's five-tuple information and takes the remainder to obtain the slot value. Based on the slot value, it checks its local cache to obtain the IP address of the SP node corresponding to that slot, and then initiates a session query request to that SP node.

[0228] The session layer SP adopts a distributed deployment approach, replacing the master-slave deployment method in the existing two-tier architecture. Specifically, the control node initializes the SP cluster based on the scale of business request volume. Each pair of nodes in the SP cluster uses a master-slave mode to achieve high availability. Each pair of master-slave SP nodes maps a slot range, meaning each pair of SP nodes handles business requests within its mapped slot range. All SP nodes in the SP cluster monitor changes in the slot-to-SP node mapping relationship in ETCD in real time and cache the latest mapping relationship in the SP's local memory.

[0229] When the FP node query session request arrives at the SP master node, the SP master node calculates the slot value of the service request and matches it with the local slot range. When the slot value matches, the SP master node queries the local cache to determine whether there is the session information, if not, a new session is created, and the session information is returned to the FP, and the session information is sent to the standby SP session synchronization queue. When the slot value does not match, the SP node information corresponding to the slot value range is queried, and the node information is returned to the FP node, so that the FP node initiates a session query request to the new SP node.

[0230] The control layer has the elastic expansion and contraction function of the session layer SP. Specifically, the control layer in the embodiment of the application includes a control node and an ETCD cluster. When the control node is initialized, according to the number of master and standby nodes in the SP cluster, the slot range is mapped to different SP master and standby nodes in the principle of equal division, and the mapping relationship is stored in the ETCD cluster. At this time, the SP cluster and the FP cluster monitor the change of the ETCD data, and obtain the latest slot and SP node mapping relationship to the local cache.

[0231] When the number of new connection and the number of concurrent connection of the service carried by the traffic forwarding cluster increase and exceed the upper threshold of the carrying capacity of the SP cluster, the control node will apply to create new SP master and standby nodes to join the SP cluster. And the slot range corresponding to the SP node with the highest number of sessions is redistributed, that is, part of the slot value of the SP node, such as 1 / 2 of the original slot range value, is remapped to the newly created master and standby SP nodes, the session information corresponding to the part of the slot is migrated from the original master and standby SP nodes to the newly created master and standby SP nodes, the slot is migrated, and the mapping relationship between the slot and the SP cluster in the ETCD database is updated. At this time, the SP cluster and the FP cluster monitor the change of the ETCD data, and obtain the latest slot and SP node mapping relationship to the local cache.

[0232] When the number of new connection and the number of concurrent connection of the service carried by the traffic forwarding cluster decrease and exceed the lower threshold of the carrying capacity of the SP cluster, the control node will remove the master and standby nodes with the lowest number of new connection and concurrent connection from the cluster, and migrate the slot information mapped on the removed master and standby nodes to the master and standby nodes with the least connection information at this time. The control node updates the mapping relationship between the latest slot and the master and standby nodes of the SP cluster to the ETCD, at this time, each master and standby node of the SP cluster and each node of the FP cluster monitors the change of the slot mapping relationship in the ETCD, and caches the latest slot and SP node mapping relationship to the local. Thus, the method of elastic expansion and contraction of the traffic forwarding network element in the embodiment of the application is realized.

[0233] The method for the distributed forwarding network element with elastic capacity expansion and contraction based on ETCD provided in the application proposal improves the total memory size of the SP server cluster through the elastic capacity expansion and contraction of the SP cluster, so that the maximum number of new connections that can be carried by the traffic forwarding network element is close to infinite expansion, and the demand of various application scenarios for the number of connections can be met. The method solves the problems in the existing traffic forwarding network element that the SP cluster adopts a master-slave architecture, the session capacity is limited by the server memory size and cannot be horizontally expanded, and the maximum number of new connections and the maximum number of concurrent connections in the traffic forwarding performance index have upper limit bottlenecks, and it is difficult to meet the application scenarios of high new connection number and large concurrent connection number.

[0234] As shown in Figure 9 The application embodiment provides a capacity adjustment device of a traffic forwarding network element, applied to a control node, comprising:

[0235] An adjustment module 901 is configured to adjust the capacity of a slow path (SP) cluster of the traffic forwarding network element according to the running state of the traffic forwarding network element.

[0236] An update module 902 is configured to update the mapping relationship between the slot range and the SP node group stored in the distributed key-value data storage system according to the node information of the adjusted SP cluster; wherein the slot is related to the service request of the client.

[0237] Optionally, the adjustment module 901 comprises:

[0238] A first acquisition sub-module is configured to acquire the running state of the traffic forwarding network element, wherein the running state comprises the number of new connections and / or the number of concurrent connections.

[0239] An adjustment sub-module is configured to adjust the capacity of the SP cluster according to the number of new connections and / or the number of concurrent connections, and the upper limit threshold of the number of new connections and the lower limit threshold of the number of new connections, and the upper limit threshold of the number of concurrent connections and the lower limit threshold of the number of concurrent connections.

[0240] Optionally, the adjustment sub-module comprises:

[0241] An adjustment unit is configured to add at least one SP node group in the SP cluster when the number of new connections is greater than or equal to the upper limit threshold of the number of new connections, and / or the number of concurrent connections is greater than or equal to the upper limit threshold of the number of concurrent connections.

[0242] The first sending unit is configured to send a first session information migration instruction to a master node of a first SP node group, where the first session information migration instruction is used to instruct migration of session information corresponding to a first sub-slot range to a second SP node group, the first SP node group is an SP node group with the highest number of new connections and / or the highest number of concurrent connections, the second SP node group is a newly added SP node group, and the first sub-slot range is a partial slot range of a first slot range corresponding to the first SP node group.

[0243] The first receiving unit is configured to receive a first session information migration completion instruction sent by the master node of the first SP node group.

[0244] Optionally, the adjusting sub-module includes:

[0245] The determining unit is configured to determine a third SP node group that needs to be removed in a case where the number of new connections is less than or equal to the lower threshold of the number of new connections, and / or the number of concurrent connections is less than or equal to the lower threshold of the number of concurrent connections, the third SP node group being an SP node group with the lowest number of new connections and / or the lowest number of concurrent connections.

[0246] The second sending unit is configured to send a second session information migration instruction to a master node of the third SP node group, where the second session information migration instruction is used to instruct the third SP node group to migrate locally stored session information to a fourth SP node group, and the fourth SP node group is an SP node group with the lowest number of new connections and / or the lowest number of concurrent connections except the third SP node group.

[0247] The second receiving unit is configured to receive a second session migration completion instruction sent by the master node of the third SP node group.

[0248] The removing unit is configured to remove the third SP node group from the SP cluster.

[0249] Optionally, the updating module 902 includes:

[0250] The second obtaining sub-module is configured to, in a case where the node information includes node information of at least one SP node group, obtain node information of a first SP node group with the highest number of new connections and / or the highest number of concurrent connections, and node information of a second SP node group that is newly added.

[0251] The third obtaining sub-module is configured to obtain a first slot range corresponding to the first SP node group according to the mapping relationship.

[0252] The allocating sub-module is configured to allocate a first sub-slot range in the first slot range to the second SP node group.

[0253] The first updating submodule is configured to update a first slot range corresponding to the first SP node group to a second sub-slot range in the mapping relationship between the slot range and the SP node groups, and add a corresponding relationship between the second SP node group and the first sub-slot range; the second sub-slot range is a slot range in the first slot range except the first sub-slot range.

[0254] Optionally, the updating module 902 comprises:

[0255] The fourth obtaining submodule is configured to, in a case where the node information of at least one SP node group is reduced, obtain node information of a third SP node group that is eliminated, and node information of a fourth SP node group with the lowest number of newly established connections and / or the lowest number of concurrent connections.

[0256] The fifth obtaining submodule is configured to obtain, according to the mapping relationship between the slot range and the SP node groups, a second slot range corresponding to the third SP node group and a third slot range corresponding to the fourth SP node group.

[0257] The second updating submodule is configured to update the third slot range corresponding to the fourth SP node group to a union set of the second slot range and the third slot range in the mapping relationship between the slot range and the SP node groups, and delete the corresponding relationship between the third SP node group and the second slot range.

[0258] As shown in Figure 10 The application embodiment further provides a capacity adjustment apparatus of a traffic forwarding network element, which is applied to a master node of an SP node group, and comprises:

[0259] The reading module 1001 is configured to, in a case where it is monitored that a mapping relationship between a slot range and SP node groups in a distributed key-value data storage system changes, read a mapping relationship between a slot range and SP node groups currently stored by the distributed key-value data storage system.

[0260] The updating module 1002 is configured to update a locally stored mapping relationship between a slot range and SP node groups according to the read mapping relationship between the slot range and the SP node groups.

[0261] Optionally, the apparatus further comprises:

[0262] The first receiving module is configured to, in a case where the master node of the SP node group is a master node of a first SP node group with the highest number of newly established connections and / or the highest number of concurrent connections in an SP cluster, receive a first session information migration instruction sent by a control node; the first session information migration instruction is used to instruct migration of session information corresponding to a first sub-slot range to a second SP node group; the second SP node group is a newly added SP node group.

[0263] a first synchronization module, configured to synchronize session information corresponding to the first sub-slot range to a master node of the second SP node group, and clear locally stored session information corresponding to the first sub-slot range;

[0264] a first sending module, configured to send a first session information migration completion instruction to the control node.

[0265] Optionally, the apparatus further includes:

[0266] a second receiving module, configured to receive a second session information migration instruction sent by the control node in a case where the master node of the SP node group is a third SP node group master node that needs to be eliminated, the second session information migration instruction being used to instruct migration of locally stored session information to a fourth SP node group, wherein the fourth SP node group is an SP node group that has the lowest number of newly built connections and / or the lowest number of concurrent connections, except for the third SP node group;

[0267] a second synchronization module, configured to synchronize, according to the second session migration instruction, the locally stored session information to a master node of the fourth SP node group, and clear the locally stored session information;

[0268] a second sending module, configured to send a second session migration completion instruction to the control node.

[0269] Optionally, the apparatus further includes:

[0270] a third receiving module, configured to receive a first session query request sent by a fast path (FP) node, the first session query request carrying five-tuple information;

[0271] a third sending module, configured to send, according to the five-tuple information and a mapping relationship between a locally stored slot range and an SP node group, a first session query result to the FP node.

[0272] Optionally, the third sending module includes:

[0273] a calculating sub-module, configured to calculate a slot value corresponding to the five-tuple information;

[0274] a searching sub-module, configured to search, based on a mapping relationship between a locally stored slot range and an SP node group, for node information of an SP node group corresponding to a slot range in which the slot value is located;

[0275] an obtaining sub-module, configured to obtain session information corresponding to the five-tuple information in a case where the searched node information is node information of the local SP node group.

[0276] The first sending sub-module is configured to send the first session query result to the FP node, wherein the first session query result carries session information corresponding to the five-tuple information.

[0277] Optionally, the third sending module further includes:

[0278] The second sending sub-module is configured to send the first session query result to the FP node in a case where the found node information is not node information of the SP node group, wherein the first session query result carries the found node information.

[0279] As shown in Figure 11 The present application also provides a capacity adjustment apparatus of a traffic forwarding network element, which is applied to an FP node and includes:

[0280] The reading module 1101 is configured to read a mapping relationship between slot ranges and SP node groups currently stored by the distributed key-value data storage system in a case where the mapping relationship between the slot ranges and the SP node groups is monitored to have changed.

[0281] The updating module 1102 is configured to update a locally stored mapping relationship between slot ranges and SP node groups according to the read mapping relationship between the slot ranges and the SP node groups.

[0282] Optionally, the apparatus further includes:

[0283] The first receiving module is configured to receive a service request sent by a target client for the first time, wherein the service request carries five-tuple information.

[0284] The first sending module is configured to send a first session query request to a master node of a target SP node group according to a locally stored mapping relationship between slot ranges and SP node groups in a case where it is determined according to the five-tuple information that the local storage does not store session information corresponding to the service request.

[0285] The second receiving module is configured to receive a first session query result sent by the master node of the target SP node group.

[0286] The second sending module is configured to forward the service request to a target server according to the first session query result.

[0287] Optionally, the first sending module includes:

[0288] The obtaining sub-module is configured to perform hash remainder operation on the five-tuple information to obtain a slot value corresponding to the five-tuple.

[0289] The finding submodule is configured to find, in the mapping relationship between the slot range and the SP node group, an SP node group corresponding to the slot range in which the slot value is located; the SP node group corresponding to the slot range in which the slot value is located is the target SP node group.

[0290] The first sending submodule is configured to send the first session query request to a master node of the target SP node group.

[0291] Optionally, the second sending module is specifically configured to: in a case where the first session query result carries session information, forward the service request to a target server according to the session information.

[0292] Optionally, the second sending module includes:

[0293] The second sending submodule is configured to: in a case where the first session query result carries node information, send a second session query request to a master node of an SP node group corresponding to the node information according to the service request.

[0294] The first receiving submodule is configured to receive a second session query result sent by the master node of the SP node group corresponding to the node information.

[0295] The third sending submodule is configured to: in a case where the second session query result carries session information, forward the service request to a target server according to the session information carried in the second session query result.

[0296] As shown in Figure 12 The application embodiment further provides a control node device, which comprises a transceiver 1210, a processor 1200, a memory 1220, and a program or instruction stored in the memory 1220 and executable on the processor 1200; the processor 1200 implements the above-mentioned method for expanding and shrinking the capacity of the traffic forwarding network element of the control node when executing the program or instruction.

[0297] The transceiver 1210 is configured to receive and send data under the control of the processor 1200.

[0298] In the method, the transceiver 1210 is configured to receive a first session query result returned by the master node of the target SP node group. Figure 12In particular embodiments, the bus architecture can include any number of interconnecting buses and bridges, depending on the specific application of the processor 1200 and the overall design constraints. The bus architecture can link together various circuits such as the processor 1200, represented by one or more processors, the memory 1220, represented by the various circuits of the memory, and various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore, not described further. The bus interface provides an interface to the transceiver 1210. The transceiver 1210 can be a plurality of elements including a transmitter and a receiver, providing a means of communicating with various other apparatus over a transmission medium. The processor 1200 is responsible for managing the bus architecture and generally carrying out the processes made by the processor 1200. The memory 1220 can store data used by the processor 1200 in executing its operations.

[0299] The embodiment of the present application further provides a master node device of an SP node group, comprising a transceiver, a processor, a memory, and a program stored in the memory and executable in the processor; the processor implements each process of the capacity adjustment method of the traffic forwarding network element applied to the master node of the SP node group when executing the program, and can achieve the same technical effects, and thus, details are not described herein again.

[0300] The embodiment of the present application further provides an FP node device, comprising a transceiver, a processor, a memory, and a program stored in the memory and executable in the processor; the processor implements each process of the capacity adjustment method of the traffic forwarding network element applied to the FP node when executing the program, and can achieve the same technical effects, and thus, details are not described herein again.

[0301] The embodiment of the present application further provides a readable storage medium, which stores a program or instructions, the program or instructions are executed in the processor to implement the capacity adjustment method of the traffic forwarding network element applied to the control node, or implement the capacity adjustment method of the traffic forwarding network element applied to the master node of the SP node group, or implement the capacity adjustment method of the traffic forwarding network element applied to the FP node, and can achieve the same technical effects, and thus, details are not described herein again.

[0302] The processor is the processor in each device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, etc.

[0303] The foregoing exemplary embodiments are described with reference made to the drawings which are provided for the purpose of explanation and illustration and are not intended to limit the scope of the application. Indeed, various modifications and variations that fall within the spirit and scope of the application can become apparent to those skilled in the art upon reading this specification, and it is to be understood that such modifications and variations are intended to fall within the scope of the application. Further, it is to be understood that the phraseology and terminology employed herein are for the purpose of description and explanation and are not intended to be limiting. The use of "including" and "comprising" and variations thereof is meant to encompass the items listed thereafter and equivalents thereof as well as additional items and equivalents thereof. Unless otherwise specified, a range of values includes the beginning and end points of the range and any sub-ranges therebetween.

[0304] The above description is considered that of the preferred embodiments of the application only. Modifications and alterations will occur to others upon reading the preceding description and it is intended to include all such modifications and alterations insofar as they come within the scope of the claims.

Claims

1. A method of capacity adjustment of a traffic forwarding network element, characterized in that, The traffic forwarding network element comprises a session layer, a forwarding layer and a control layer, the slow path (SP) cluster of the session layer is deployed in a distributed manner, the control layer comprises a control node and a distributed key-value storage system, a capacity adjustment method of the traffic forwarding network element is applied to the control node, and the method comprises: According to the running state of the traffic forwarding network element, the capacity of the SP cluster of the traffic forwarding network element is adjusted by horizontal expansion of the SP cluster. According to the node information of the adjusted SP cluster, the mapping relationship between the slot range and the SP node group stored in the distributed key-value data storage system is updated; wherein the slot is related to the service request of the client.

2. The method of claim 1, wherein, According to the running state of the traffic forwarding network element, the capacity of the slow path (SP) cluster of the traffic forwarding network element is adjusted, comprising: Obtaining the running state of the traffic forwarding network element, wherein the running state comprises the number of new connections and / or the number of concurrent connections; According to the number of new connections and / or the number of concurrent connections, and the upper threshold value of the number of new connections and the lower threshold value of the number of new connections, and the upper threshold value of the number of concurrent connections and the lower threshold value of the number of concurrent connections, the capacity of the SP cluster is adjusted.

3. The method of claim 2, wherein, According to the number of new connections and / or the number of concurrent connections, and the upper threshold value of the number of new connections and the lower threshold value of the number of new connections, and the upper threshold value of the number of concurrent connections and the lower threshold value of the number of concurrent connections, the capacity of the SP cluster is adjusted, comprising: In the case that the number of new connections is greater than or equal to the upper threshold value of the number of new connections, and / or the number of concurrent connections is greater than or equal to the upper threshold value of the number of concurrent connections, at least one SP node group is added in the SP cluster; Sending a first session information migration instruction to the master node of the first SP node group, the first session information migration instruction being used to instruct the migration of the session information corresponding to the first sub-slot range to a second SP node group, wherein the first SP node group is the SP node group with the highest number of new connections and / or concurrent connections, the second SP node group is the newly added SP node group, and the first sub-slot range is a part of the first slot range corresponding to the first SP node group; Receiving the first session information migration completion instruction sent by the master node of the first SP node group.

4. The method of claim 2, wherein, According to the number of new connections and / or the number of concurrent connections, and the upper threshold value of the number of new connections and the lower threshold value of the number of new connections, and the upper threshold value of the number of concurrent connections and the lower threshold value of the number of concurrent connections, the capacity of the SP cluster is adjusted, comprising: In the case that the number of new connections is less than or equal to the lower threshold value of the number of new connections, and / or the number of concurrent connections is less than or equal to the lower threshold value of the number of concurrent connections, determining a third SP node group to be removed, the third SP node group being the SP node group with the lowest number of new connections and / or concurrent connections; sending a second session information migration instruction to a master node of the third SP node group, the second session information migration instruction being used to instruct the third SP node group to migrate locally stored session information to a fourth SP node group, wherein the fourth SP node group is an SP node group with the lowest number of new connections and / or the lowest number of concurrent connections other than the third SP node group; receiving a second session migration completion instruction sent by the master node of the third SP node group; eliminating the third SP node group from the SP cluster.

5. The method of claim 1, wherein, According to the adjusted node information of the SP cluster, updating a mapping relationship between a slot range and an SP node group stored by a distributed key-value data storage system, comprising: In the case that the node information of at least one SP node group is added in the node information, obtaining the node information of a first SP node group with the highest number of new connections and / or the highest number of concurrent connections, and the node information of a newly added second SP node group; According to the mapping relationship, obtaining a first slot range corresponding to the first SP node group; allocating a first sub-slot range in the first slot range to the second SP node group; updating the first slot range corresponding to the first SP node group in the mapping relationship between the slot range and the SP node group to a second sub-slot range, and adding the corresponding relationship between the second SP node group and the first sub-slot range; wherein the second sub-slot range is a slot range in the first slot range other than the first sub-slot range.

6. The method of claim 1, wherein, According to the adjusted node information of the SP cluster, updating a mapping relationship between a slot range and an SP node group stored by a distributed key-value data storage system, comprising: In the case that the node information of at least one SP node group is added in the node information, obtaining the node information of a first SP node group with the highest number of new connections and / or the highest number of concurrent connections, and the node information of a newly added second SP node group; According to the mapping relationship, obtaining a first slot range corresponding to the first SP node group; updating the first slot range corresponding to the first SP node group in the mapping relationship between the slot range and the SP node group to a second sub-slot range, and adding the corresponding relationship between the second SP node group and the first sub-slot range; wherein the second sub-slot range is a slot range in the first slot range other than the first sub-slot range.

7. A method of capacity adjustment of a traffic forwarding network element, characterized in that, The traffic forwarding network element comprises a session layer, a forwarding layer and a control layer, a slow path SP cluster of the session layer is deployed in a distributed manner, the control layer comprises a control node and a distributed key-value storage system, and a capacity adjustment method of the traffic forwarding network element is applied to a master node of an SP node group of the SP cluster, comprising: In the case that a mapping relationship between a slot range and an SP node group in a distributed key-value data storage system is changed, reading a mapping relationship between a slot range and an SP node group currently stored by the distributed key-value data storage system; According to the read mapping relationship between the slot range and the SP node group, updating a locally stored mapping relationship between a slot range and an SP node group; The method further comprises: receiving a first session query request sent by a fast path (FP) node, the first session query request carrying five-tuple information; the five-tuple information including a source IP address, a source port, a destination IP address, a destination port, and a protocol type; sending a first session query result to the FP node according to the five-tuple information and a mapping relationship between a slot range and a SP node group stored locally, wherein the first session query result carries session information corresponding to the five-tuple information, newly created session information, and node information found.

8. The method of claim 7, wherein, Before reading the mapping relationship between the slot range and the SP node group stored currently by the distributed key-value data storage system, the method further comprises: in a case where the master node of the SP node group is a master node of a first SP node group with the highest number of newly created connections and / or the highest number of concurrent connections in the SP cluster, receiving a first session information migration instruction sent by a control node; wherein the first session information migration instruction is used to instruct migration of session information corresponding to a first sub-slot range to a second SP node group, and the second SP node group is a newly created SP node group; synchronizing the session information corresponding to the first sub-slot range to the master node of the second SP node group, and clearing the session information corresponding to the first sub-slot range stored locally; sending a first session information migration completion instruction to the control node.

9. The method of claim 8, wherein, Before reading the mapping relationship between the slot range and the SP node group stored currently by the distributed key-value data storage system, the method further comprises: in a case where the master node of the SP node group is a master node of a third SP node group that needs to be removed, receiving a second session information migration instruction sent by a control node, the second session information migration instruction being used to instruct migration of locally stored session information to a fourth SP node group, and the fourth SP node group being a SP node group with the lowest number of newly created connections and / or the lowest number of concurrent connections among the SP node groups other than the third SP node group; synchronizing the session information stored locally to the master node of the fourth SP node group according to the second session migration instruction, and clearing the session information stored locally; sending a second session migration completion instruction to the control node.

10. The method of claim 7, wherein, sending a first session query result to the FP node according to the five-tuple information and a mapping relationship between a slot range and a SP node group stored locally, comprises: calculating a slot value corresponding to the five-tuple information; finding node information of a SP node group corresponding to a slot range where the slot value is located based on the mapping relationship between the slot range and the SP node group stored locally; in a case where the found node information is node information of the local SP node group, obtaining session information corresponding to the five-tuple information; sending the first session query result to the FP node, the first session query result carrying the session information corresponding to the five-tuple information.

11. The method of claim 10, wherein, After finding node information of a SP node group corresponding to a slot range where the slot value is located based on the mapping relationship between the slot range and the SP node group stored locally, the method further comprises: In a case that the found node information is not node information of the SP node group, the first session query result is sent to the FP node, and the first session query result carries the found node information.

12. A method of capacity adjustment of a traffic forwarding network element, characterized by, The traffic forwarding network element includes a session layer, a forwarding layer, and a control layer. The slow path (SP) cluster of the session layer is deployed in a distributed manner. The control layer includes a control node and a distributed key-value data storage system. A capacity adjustment method of the traffic forwarding network element is applied to an FP node of the forwarding layer and includes the following steps. In a case that a mapping relationship between a slot range and an SP node group in the distributed key-value data storage system is changed, the mapping relationship between the slot range and the SP node group currently stored in the distributed key-value data storage system is read. According to the read mapping relationship between the slot range and the SP node group, the mapping relationship between the slot range and the SP node group stored locally is updated. The method further includes the following steps. A service request sent by a target client for the first time is received, and the service request carries five-tuple information. The five-tuple information includes a source IP address, a source port, a destination IP address, a destination port, and a protocol type. In a case that it is determined according to the five-tuple information that no session information corresponding to the service request is stored locally, a first session query request is sent to a master node of a target SP node group according to a mapping relationship between a slot range and an SP node group stored locally. A first session query result sent by the master node of the target SP node group is received. The first session query result carries session information corresponding to the five-tuple information, newly created session information, and found node information. The service request is forwarded to a target server according to the first session query result.

13. The method of claim 12, wherein, The first session query request is sent to the target SP node group according to the mapping relationship between the slot range and the SP node group stored locally, including the following steps. The five-tuple information is subjected to hash modulo operation to obtain a slot value corresponding to the five-tuple. In the mapping relationship between the slot range and the SP node group, an SP node group corresponding to a slot range in which the slot value is located is found. The SP node group corresponding to the slot range in which the slot value is located is the target SP node group. The first session query request is sent to the master node of the target SP node group.

14. The method of claim 12, wherein, The service request is forwarded to the target server according to the first session query result, including the following steps. In a case that the first session query result carries session information, the service request is forwarded to the target server according to the session information.

15. The method of claim 12, wherein, The service request is forwarded to the target server according to the session query result, including the following steps. In a case that the first session query result carries node information, a second session query request is sent to a master node of an SP node group corresponding to the node information according to the service request. A second session query result sent by the master node of the SP node group corresponding to the node information is received. In a case that the second session query result carries session information, the service request is forwarded to the target server according to the session information carried in the second session query result.

16. A capacity adjustment apparatus of a traffic forwarding network element, characterized by, The traffic forwarding network element comprises a session layer, a forwarding layer and a control layer, the slow path SP cluster of the session layer is deployed in a distributed manner, the control layer comprises a control node and a distributed key-value data storage system, and the capacity adjustment method of the traffic forwarding network element is applied to the control node and comprises the following steps: An adjustment module is configured to adjust the capacity of the SP cluster by horizontal expansion of the SP cluster of the traffic forwarding network element according to the running state of the traffic forwarding network element; An updating module is configured to update the mapping relationship between the slot range and the SP node group stored in the distributed key-value data storage system according to the node information of the adjusted SP cluster; wherein the slot is related to the service request of the client.

17. A capacity adjustment apparatus of a traffic forwarding network element, characterized by, The traffic forwarding network element comprises a session layer, a forwarding layer and a control layer, the slow path SP cluster of the session layer is deployed in a distributed manner, the control layer comprises a control node and a distributed key-value data storage system, and the capacity adjustment method of the traffic forwarding network element is applied to the control node and comprises the following steps: A reading module is configured to read the mapping relationship between the slot range and the SP node group currently stored in the distributed key-value data storage system in the case that the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system is changed; An updating module is configured to update the mapping relationship between the slot range and the SP node group stored locally according to the mapping relationship between the slot range and the SP node group read; A third receiving module is configured to receive a first session query request sent by a fast path FP node, the first session query request carrying five-tuple information; the five-tuple information comprises a source IP address, a source port, a destination IP address, a destination port and a protocol type; A third sending module is configured to send a first session query result to the FP node according to the five-tuple information and the mapping relationship between the slot range and the SP node group stored locally; wherein the first session query result carries session information corresponding to the five-tuple information, newly created session information and queried node information.

18. A capacity adjustment apparatus of a traffic forwarding network element, characterized by, The traffic forwarding network element comprises a session layer, a forwarding layer and a control layer, the slow path SP cluster of the session layer is deployed in a distributed manner, the control layer comprises a control node and a distributed key-value data storage system, and the capacity adjustment method of the traffic forwarding network element is applied to the control node and comprises the following steps: A reading module is configured to read the mapping relationship between the slot range and the SP node group currently stored in the distributed key-value data storage system in the case that the mapping relationship between the slot range and the SP node group in the distributed key-value data storage system is changed; An updating module is configured to update the mapping relationship between the slot range and the SP node group stored locally according to the mapping relationship between the slot range and the SP node group read; A first receiving module is configured to receive a service request sent by a target client for the first time, the service request carrying five-tuple information; the five-tuple information comprises a source IP address, a source port, a destination IP address, a destination port and a protocol type; The first sending module is configured to, in a case where it is determined according to the five-tuple information that local session information corresponding to the service request is not stored, send a first session query request to a master node of a target SP node group according to a mapping relationship between a slot range and the SP node group stored locally. The second receiving module is configured to receive a first session query result sent by the master node of the target SP node group, wherein the first session query result carries session information corresponding to the five-tuple information, newly created session information, and queried node information. The second sending module is configured to forward the service request to a target server according to the first session query result.

19. A control node device comprising a transceiver, a processor, a memory, and a program stored on the memory and executable on the processor; characterized in that, The processor implements the capacity adjustment method of the traffic forwarding network element according to any one of claims 1 to 6 when executing the program.

20. A master node device of a group of SP nodes, comprising a transceiver, a processor, a memory, and a program stored on the memory and executable on the processor; characterized in that, The processor implements the capacity adjustment method of the traffic forwarding network element according to any one of claims 7 to 11 when executing the program.

21. An FP node device comprising a transceiver, a processor, a memory, and a program stored on the memory and executable on the processor; characterized in that, The processor implements the capacity adjustment method of the traffic forwarding network element according to any one of claims 12 to 15 when executing the program.

22. A readable storage medium, on which a program or instructions are stored, characterized in that, The program or the instruction implements the capacity adjustment method of the traffic forwarding network element according to any one of claims 1 to 6, or the capacity adjustment method of the traffic forwarding network element according to any one of claims 7 to 11, or the capacity adjustment method of the traffic forwarding network element according to any one of claims 12 to 15 when executed by the processor.

Citation Information

Patent Citations

  • Data access method and device, medium, equipment and distributed storage system

    CN113986935A

  • State determination method, device and system and medium

    CN115878411A