CN-121985020-A - Load balancing-oriented session connection construction method and table item self-learning method
Abstract
The invention provides a session connection construction method and a table self-learning method for load balancing, wherein the session connection construction is carried out by a control plane, and the method comprises the steps of receiving a service session connection request forwarded by a data plane, determining a target server end corresponding to the service session connection request by the control plane based on a prestored full-volume session table and current load balancing weight information of each server end, forming a table entry adding data packet corresponding to the service session connection request, and sending the table entry adding data packet to the data plane, so that the data plane updates the session table by utilizing the table entry adding data packet based on a missing time adding mechanism, wherein the table entry adding data packet comprises identification information of the target server end, a client end and the control plane. The method provided by the invention can improve the resource utilization rate in the service session connection process and reduce the delay.
Inventors
- PAN TIAN
- YANG DAILING
- GE CHENLIN
- YANG ZHAOKUN
- LIU YINGJIANG
- ZHANG JIAO
- HUANG TAO
Assignees
- 北京邮电大学
Dates
- Publication Date
- 20260505
- Application Date
- 20260227
Claims (10)
- 1. The session connection construction method for load balancing is characterized in that the method is executed by a control plane and comprises the following steps: Receiving a service session connection request forwarded by a data plane under the condition that session connection corresponding to the service session connection request does not exist in a session table prestored by the data plane, wherein the service session connection request is generated by a client and sent to the data plane and comprises identification information of the client and control plane; Searching a session connection corresponding to the service session connection request in a full session table prestored in a control plane, and determining a target server side corresponding to the service session connection request based on current load balancing weights of all server sides under the condition that the session connection does not exist in the full session table; After determining a target server side corresponding to a service session connection request, forming an entry addition data packet corresponding to the service session connection request and sending the entry addition data packet to a data plane, so that the data plane updates the session table based on the entry addition data packet, wherein the entry addition data packet comprises identification information of the target server side, a client side and a control plane.
- 2. The method of claim 1, further comprising changing identification information of a control plane in the service session connection request to identification information of a target server side corresponding to the session connection in the case that a session connection corresponding to the service session connection request exists in a session table pre-stored in the data plane, and forwarding the changed service session connection request to the target server side.
- 3. The method of claim 1, wherein each server side corresponds to a traffic port and a telemetry traffic port on a data plane; The control plane maintains the utilization condition of the computing resource of each server end, and the utilization condition of the computing resource of each server end is actively fed back to the control plane by the server end through the corresponding telemetry flow port under the condition that telemetry session connection exists among the data plane, the control plane and the server end, and The method further includes the control plane periodically counting the number of input data packets and the number of output data packets of the connected service traffic ports on the data plane, and determining the port bandwidth utilization of the data plane based on the counting result.
- 4. A method according to claim 3, wherein the current load balancing weights for each server side are determined by: periodically calculating target weights of all server sides based on the calculation resource utilization condition and the port bandwidth utilization condition; updating the current load balancing weight of each server based on a preset smoothing strategy under the condition that the calculated target weight is stable; the preset smoothing strategy comprises the following steps: If the stable target weight is greater than the current load balancing weight before updating, the current load balancing weight after updating is greater than the current load balancing weight before updating, if the stable target weight is equal to the current load balancing weight before updating, the current load balancing weight after updating is equal to the current load balancing weight before updating, and if the stable target weight is less than the current load balancing weight before updating, the current load balancing weight after updating is less than the current load balancing weight before updating.
- 5. The method of claim 1, wherein communication is effected between the data plane and the control plane via a transmission control protocol; the forming the table entry corresponding to the service session connection request adds a data packet and sends the data packet to a data plane, including: writing the identification information of the client and the control plane into a TCP Option field of the service session connection request, changing the destination information in the service session connection request from the identification information of the control plane to the identification information of the target server, and adding a data packet as an entry to the changed service session connection request and sending the data packet to the data plane.
- 6. A method according to claim 3, wherein the infrastructure programming framework develops a suite for an infrastructure programmer; The data flow direction of the telemetry session connection is sequentially a server side, a data plane and a control plane, and the telemetry session connection is constructed based on gRPC network management interfaces; ports on the data plane are vHost-User.
- 7. The method is characterized by being executed by a data plane and comprises the following steps: Receiving a service session connection request from a client, wherein the service session connection request comprises identification information of the client and a control plane; Forwarding a service session connection request to a control plane and receiving an entry addition data packet corresponding to the service session connection request from the control plane under the condition that no entry corresponding to the service session connection request exists in a session table prestored in the data plane, wherein the entry addition data packet comprises identification information of a target server side, a client side and the control plane; based on the adding mechanism in the missing, the table entry is added with the identification information of the client side and the control plane in the data packet as keys, and the identification information of the target server side is used as a value, so that the formed key value pair is used as a new table entry to be added into a session table pre-stored in the data plane, and the self-learning of the table entry of the data plane is realized.
- 8. The method of claim 7, wherein the data plane includes a traffic port and a telemetry traffic port, wherein communication between the data plane and the control plane is accomplished via a transmission control protocol; After the data plane receives the data packet, the method further comprises: And under the condition that the data plane receives the data packet through the service flow port, if the data packet is determined to be directly sent by the client according to the destination information and/or the TCP Option field, determining that the data packet is a service session connection request, and if the data packet is determined to be directly sent by the control plane according to the destination information and/or the TCP Option field, determining that the data packet is an entry added data packet.
- 9. The method of claim 7, wherein the pre-stored session table of the data plane is in the form of a bucket hash; Each bucket is composed of a plurality of slots, each slot stores a key value pair and validity period information of the slot, and The entry corresponding to the service session connection request refers to a slot that is in the validity period and stores a key that matches the service session connection request.
- 10. An electronic device comprising a processor, a memory and computer programs/instructions stored on the memory, characterized in that the processor is adapted to execute the computer programs/instructions, which device, when executed, implements the steps of the method of any of claims 1-9.
Description
Load balancing-oriented session connection construction method and table item self-learning method Technical Field The invention relates to the technical field of software defined networks, in particular to a session connection construction method and a table self-learning method for load balancing. Background With the explosion of cloud computing, edge computing and AI big models, data centers grow exponentially in east-west traffic (e.g., traffic between clients and server backend), and to cope with bursty traffic, programmable data plane techniques have been introduced to accommodate traffic variations. For example, when a data plane is built based on P4 (Programming Protocol-INDEPENDENT PACKET Processors, a network data Packet processing logic programming language, whose core feature is protocol independence), and data exchange between a control plane and the P4 data plane adopts an industry standard interface P4 run-time interface (P4 program Runtime interface, which can provide a communication channel between the control plane and the data plane, and generally implement issuing and management of flow table entries based on gRPC), a flow table issuing flow based on the P4 run-time during a session connection process may specifically be that In an existing load balancing scenario, when the data plane receives a session connection request (e.g. synchronization sequence number (Synchronize Sequence Numbers, SYN)) but when the P4 flow table searches for a miss, the miss event is sent to the control plane through a Packet-In, and after the control plane makes a decision, the corresponding flow table entry is issued to the data plane through a remote procedure call technology (e.g. gRPC), see RPC scheme In fig. 1. However, the session connection establishment scheme described above requires repeated transmission of data packets, and although P4run time provides a standardized abstraction independent of hardware, it is still difficult to achieve low latency in the case of millions of new connections (Connections Per Second, CPS, representing the number of new TCP/UDP connections that the system can establish per second), and its performance drawbacks are mainly manifested in the two aspects of ① remote procedure call (Remote Procedure Call, RPC) mechanism inherent software stack overhead that can lead to non-negligible latency. Each time the control plane issues a flow table using the P4run time protocol, complex objects need to be serialized into a Protobuf binary flow, and the data plane is de-serialized after arrival, which consumes a lot of CPU cycles when processing millions of requests per second, and RPC calls involve multiple data copies and context switches of the operating system between User Space and kernel Space (KERNEL SPACE) environments. Experiments prove that the end-to-end installation delay of a single flow table under an RPC mechanism is usually in the order of 10ms to 50ms, which leads to the fact that the forwarding of a first packet is significantly delayed from the forwarding of a subsequent data packet, the retransmission of the data packet is easy to be initiated, and serious long-tail delay (TAIL LATENCY) is easy to occur when a network shakes, so that the time-sensitive service experience is influenced. ② The strongly coupled data plane-control plane architecture based on RPC calls easily results In weak burst resistance, especially when faced with micro burst traffic (Microburst), massive Packet-In requests can instantaneously fill the buffer of the control channel. Because the processing capacity of the control plane CPU is far lower than the forwarding capacity of the data plane, the backlogged RPC request can cause overload of the control plane and generate a queue head blocking phenomenon, newly arrived session connection requests can be discarded once a queue element exceeds a processing threshold value which can be born by the control plane, so that connection failure is caused, meanwhile, high-frequency RPC interaction can continuously occupy a large amount of CPU resources of the control plane, occupy calculation resources for executing control strategies such as core scheduling strategies, health check and the like, and influence the high availability of resources of the control plane. Therefore, how to establish a service session connection with higher resource utilization and lower latency in a high-concurrency data center network scenario is a problem to be solved. Disclosure of Invention In view of this, the embodiment of the invention provides a load balancing-oriented session connection construction method and a table item self-learning method, which can establish service session connection with higher resource utilization rate and lower delay under a high concurrency scene. One aspect of the present invention provides a load balancing-oriented session connection construction method, which is executed by a control plane, comprising the steps of: receiving a service