Server multi-node load balancing method and system

By collecting the memory fragmentation distribution ratio and half-connection queue depth records of server nodes, and combining them with dual early warning benchmarks to filter out available nodes, the problem of memory fragmentation accumulation and response timeout in server nodes in existing technologies is solved, thereby improving the accuracy of load balancing and business continuity.

CN122137844APending Publication Date: 2026-06-02SHANGHAI JISUAN INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI JISUAN INFORMATION TECH CO LTD
Filing Date
2026-03-25
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing multi-node load balancing methods for servers fail to address the underlying resource health of server nodes in high-concurrency scenarios, leading to memory fragmentation and response timeout failures, which affect business continuity and computing cluster throughput performance.

Method used

By collecting the memory fragmentation distribution ratio and half-connection queue depth records of backend server nodes, and combining dual early warning benchmarks to filter out congested nodes, a set of available nodes is generated. Based on the queue backlog status, cross-comparison and sorting are performed to obtain the best host. The memory fragmentation distribution ratio is used as an evaluation dimension. Combined with the half-connection queue depth mining, the underlying hidden risks are explored. The surface connection number judgment mechanism is abandoned, and the header replacement is pushed to the hardware network card pin.

Benefits of technology

It achieves accurate characterization of the actual carrying capacity of server nodes, avoids response failures caused by server node fragmentation and overload, improves the distribution accuracy in concurrent scenarios, and ensures business continuity and computing cluster throughput performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137844A_ABST
    Figure CN122137844A_ABST
Patent Text Reader

Abstract

This invention relates to the field of load balancing technology, specifically to a method and system for multi-node load balancing of servers, comprising the following steps: collecting memory fragmentation ratio and half-connection queue depth, comparing with early warning benchmarks to obtain a congestion interception list, filtering to generate a set of available node addresses, sorting to establish transfer target node addresses, and replacing the header address to obtain a multi-node load balancing record for the server. In this invention, by introducing the server memory fragmentation distribution ratio as an evaluation dimension, combined with half-connection queue depth mining to uncover underlying hidden risks, and abandoning the surface connection count judgment mechanism, it achieves accurate characterization of the actual carrying capacity of server nodes. Based on dual early warning benchmarks, it filters out congested devices and constructs a set of available server nodes, performs cross-comparison sorting based on queue backlog status to obtain the best load-bearing entity, and completes header replacement and pushes it to the hardware network card pin, avoiding response failures caused by server node fragmentation accumulation and fullness, and improving the distribution accuracy in concurrent scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of load balancing technology, and in particular to a method and system for multi-node load balancing of servers. Background Technology

[0002] Load balancing technology involves the coordinated allocation of network requests across multiple computer hardware. It primarily utilizes scheduling mechanisms such as Network Address Translation (NAT) and reverse proxies to obtain network connection requests initiated by the front end and distributes these requests to various processing nodes within the cluster based on network layer or application layer packet header information. Specifically, multi-node server load balancing methods address traffic distribution across multiple server nodes in large-scale concurrent scenarios. These methods typically employ dedicated Layer 4 or Layer 7 proxy devices to extract the source Internet Protocol (IP) address, destination port number, and Uniform Resource Identifier (URI) from received client network packets. Then, a round-robin scheduling formula is used to calculate the corresponding target node index, or the number of active Transmission Control Protocol (TCP) connections maintained by each backend server is directly counted, and the node with the smallest value is selected. This allows for modification of the Media Access Control (MAC) address or target IP address of the network packet, and its physical forwarding to the corresponding backend physical server's network interface card (NIC).

[0003] In the current multi-node load balancing process, the distribution operation is mainly based on the number of active connections and the round-robin formula. This mechanism is limited to the surface network status statistics and fails to reach the underlying resource health dimension of the server nodes. When faced with a surge of high concurrency, server nodes judged to be idle based on the number of connections often have memory fragmentation. At the same time, the backlog characteristics of half-connection queues in the early stage of network establishment are difficult to capture, making the selected server nodes prone to response timeouts and resource exhaustion failures, which seriously disrupts business continuity and computing cluster throughput performance. Summary of the Invention

[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide a server multi-node load balancing method, comprising the following steps: To achieve the above objectives, the present invention adopts the following technical solution: a server multi-node load balancing method, comprising the following steps: S1: Collect the total number of isolated memory blocks stored inside the backend server node, calculate the total free memory capacity, reconstruct the ratio between the two, and output the memory fragmentation distribution ratio. S2: Collect the real-time half-connection queue depth record of the collection node, compare the memory fragmentation distribution ratio with the set fragmentation warning benchmark, compare the real-time half-connection queue depth record of the collection node with the set depth warning benchmark, mark the congested node and perform interception processing synchronously, and obtain the congestion interception list. S3: Calculate the distribution ratio of candidate memory fragments and the record of candidate half-connection queue depth of the remaining candidate nodes outside the congestion interception list, filter the corresponding network interconnection protocol addresses that do not exceed the set fragmentation warning benchmark and do not exceed the set depth warning benchmark, and generate a set of available node addresses. S4: Based on the set of available node addresses, extract the backlog records of the half-connection queues of all candidate nodes, perform cross-comparison of congestion levels and priority ranking, extract the record at the top of the sort, extract the network interconnection protocol address corresponding to the record, and establish the transfer target node address; S5: Based on the target node address of the transfer, obtain the target network interconnection protocol address in the header of the client request data packet, replace it with the target node address of the transfer, and push the client request data packet that has completed the replacement operation to the hardware network card pin to obtain the server multi-node load balancing record.

[0005] As a further aspect of the present invention, the congested node specifically refers to the backend server node that is selected when the memory fragmentation distribution ratio exceeds the set fragmentation warning benchmark or when the node's real-time half-connection queue depth record exceeds the set depth warning benchmark.

[0006] As a further aspect of the present invention, the memory fragmentation distribution ratio includes fragmented space share and contiguous storage availability; the congestion interception list includes overloaded host identification code and risk device isolation timestamp; the available node address set includes qualified device network number and healthy host routing bit; the transfer target node address includes preferred receiving end network segment and preferred physical machine port; and the server multi-node load balancing record includes packet rewriting log and hardware pin distribution status code.

[0007] As a further aspect of the present invention, the step of obtaining the memory fragmentation distribution ratio is as follows: S111: Collect node storage device ledgers, parse internal address mapping records, extract isolated storage segments, read built-in space boundary values, perform hierarchical splicing operations on the isolated storage segments, establish spatial distribution topology, and obtain the total volume of isolated segments; S112: Monitor the snapshot of the device's operating status, retrieve the free area flag, extract the available memory page table, read the corresponding spatial scale value, perform a span normalization splicing operation on the available memory page table, construct a global available reference base, and obtain the total free capacity of the server. S113: Align the overall scale of the isolated segment to the spatial dimension of the server's total free capacity, build a volume mapping map between the two, extract the corresponding mapping scale built into the volume mapping map, and generate the memory fragmentation distribution ratio.

[0008] As a further aspect of the present invention, the congestion blocking list acquisition step is as follows: S211: Collect real-time half-connection queue depth records, obtain a set fragmentation warning benchmark and a set depth warning benchmark, compare the real-time half-connection queue depth records with the set depth warning benchmark, compare the memory fragmentation distribution ratio with the set fragmentation warning benchmark, and obtain a state evaluation sequence. S212: Based on the state assessment sequence, retrieve the internal over-limit flag bit, filter the abnormal servers that exceed the set fragmentation warning benchmark or exceed the set depth warning benchmark, implement label coverage for the abnormal servers, extract address identifiers, and generate congestion nodes. S213: Issue an interception command to the traffic scheduling matrix, implement access blocking based on the built-in address identifier of the congested node, aggregate target address information, establish an isolation topology, and obtain a congestion interception list.

[0009] As a further aspect of the present invention, the step of obtaining the set of available node addresses is as follows: S311: Collect global node running snapshots, compare and remove the corresponding identifiers of the congestion interception list, filter the remaining devices, extract the corresponding candidate memory fragment distribution ratio, read the corresponding candidate half-connection queue depth record, perform a combined binding action on the two, and establish a candidate running status map. S312: For the candidate running status map, compare the candidate memory fragmentation distribution ratio with the set fragmentation warning benchmark value, compare the candidate half-connection queue depth record with the set depth warning benchmark value, filter the node identifiers that do not exceed the set fragmentation warning benchmark and do not exceed the set depth warning benchmark, and obtain a list of compliant nodes. S313: Based on the compliant node list, retrieve network communication configuration entries, extract the corresponding network interconnection protocol addresses, perform deduplication and merging operations on each network interconnection protocol address, establish an address connectivity mapping base, and generate a set of available node addresses.

[0010] As a further aspect of the present invention, the step of obtaining the target node address for transfer is as follows: S411: Based on the set of available node addresses, retrieve the internal mapping device base, extract all candidate node half-connection queue backlog records, perform pairwise numerical scale cross-comparison for the candidate node half-connection queue backlog records, distinguish the difference span of node backlog status, establish a congestion level comparison topology, and obtain a congestion evaluation matrix. S412: Based on the congestion assessment matrix, read the internal hierarchical assessment values, perform position rearrangement and sorting actions according to the numerical scale increasing from small to large, construct the overall state priority order sequence, decompose the distribution structure of the priority order sequence, extract the data item at the position of the minimum value, and obtain the first and first backlog records. S413: For the first backlog record, parse the underlying device binding identification information, extract the corresponding network interconnection protocol address, set the network interconnection protocol address as the data flow redirection endpoint, build a network link addressing guidance path, lock the business traffic hop direction, and establish the transfer target node address.

[0011] As a further aspect of the present invention, the step of obtaining the server multi-node load balancing record is as follows: S511: Based on the address of the target node for transfer, obtain the client request data packet built into the communication port, disassemble the header encapsulation structure of the client request data packet, extract the internal target network interconnection protocol address, and establish a header addressing and positioning identifier; S512: For the header addressing and positioning identifier, read the address of the transfer target node, strip the original network interconnection protocol address inside the header addressing and positioning identifier, overwrite the address of the transfer target node, trigger header update, and obtain the redirection request data packet; S513: Based on the redirection request data packet, combined with the underlying communication stack, the redirection request data packet is pushed to the hardware network card pin, the corresponding hardware network card pin status change log is captured, the flow record is summarized, the allocation base is constructed, and the server multi-node load balancing record is generated.

[0012] A multi-node server load balancing system includes: The node status extraction module collects the total number of isolated memory blocks inside the backend server node, calculates the total free memory capacity, reconstructs the proportional relationship between the two, and outputs the memory fragmentation distribution ratio. The threshold comparison and judgment module collects real-time half-connection queue depth records of nodes, compares the memory fragmentation distribution ratio with the set fragmentation warning benchmark, compares the real-time half-connection queue depth records of nodes with the set depth warning benchmark, marks congested nodes and performs interception processing synchronously, and obtains a congestion interception list. The idle node classification module counts the distribution ratio of candidate memory fragments and the record of candidate half-connection queue depths of other candidate nodes outside the congestion interception list, filters the corresponding network interconnection protocol addresses that do not exceed the set fragmentation warning benchmark and do not exceed the set depth warning benchmark, and generates a set of available node addresses. The deep optimization sorting module, based on the set of available node addresses, extracts the backlog records of the half-connection queues of all candidate nodes, performs cross-comparison of congestion levels and priority sorting, extracts the record at the top of the sort, extracts the network interconnection protocol address corresponding to the record, and establishes the transfer target node address; The underlying message dispatch module, based on the address of the transfer target node, obtains the target network interconnection protocol address in the header of the client request data packet, replaces it with the address of the transfer target node, and pushes the client request data packet that has completed the replacement operation to the hardware network card pin to obtain the server multi-node load balancing record.

[0013] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, by introducing the distribution ratio of server memory fragmentation as an evaluation dimension, and combining it with the deep mining of hidden risks in the underlying half-connection queue, the invention abandons the surface connection number judgment mechanism, thereby achieving an accurate characterization of the actual carrying capacity of server nodes. Based on the dual early warning benchmark, congested devices are screened out and a set of available server nodes is constructed. According to the queue backlog, cross-comparison sorting is performed to obtain the best receiving entity, and the head replacement is pushed to the hardware network card pin. This avoids response failures caused by server node fragmentation accumulation and fullness, and improves the distribution accuracy in concurrent scenarios. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 This is a flowchart of the process for obtaining the memory fragmentation distribution ratio in this invention; Figure 3 This is a flowchart of the congestion blocking list acquisition process of the present invention; Figure 4 This is a flowchart illustrating the process of obtaining the set of available node addresses in this invention. Figure 5 This is a flowchart illustrating the process of obtaining the target node address in this invention. Figure 6 This is a flowchart of the process for obtaining multi-node load balancing records in the server according to the present invention; Figure 7 This is a system module diagram of the present invention. Detailed Implementation

[0016] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0017] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0018] Please see Figure 1This invention provides a server multi-node load balancing method, including the following steps: S1: Collect the total number of isolated memory blocks stored inside the backend server node, calculate the total free memory capacity, reconstruct the ratio between the two, and output the memory fragmentation distribution ratio. S2: Collect the real-time half-connection queue depth records of the nodes, compare the memory fragmentation distribution ratio with the set fragmentation warning benchmark, compare the real-time half-connection queue depth records of the nodes with the set depth warning benchmark, filter the backend server nodes that exceed the set fragmentation warning benchmark or the set depth warning benchmark and mark them as congested nodes, and intercept them synchronously to obtain the congestion interception list. S3: Statistically analyze the distribution ratio of candidate memory fragments and the depth record of candidate half-connection queues for the remaining candidate nodes outside the congestion blocking list. Compare the distribution ratio of candidate memory fragments with the set fragmentation warning benchmark and the depth record of candidate half-connection queues with the set depth warning benchmark. Filter out the corresponding network interconnection protocol addresses that do not exceed the set fragmentation warning benchmark and do not exceed the set depth warning benchmark, and generate a set of available node addresses. S4: Based on the set of available node addresses, extract the backlog records of the half-connection queues of all candidate nodes, perform cross-comparison of congestion levels and priority ranking, extract the record at the top of the sort, extract the network interconnection protocol address corresponding to the record, and establish the transfer target node address; S5: Based on the target node address, obtain the target network protocol address in the header of the client request data packet, replace it with the target node address, and push the client request data packet that has completed the replacement operation to the hardware network card pin to obtain the server multi-node load balancing record.

[0019] The memory fragmentation distribution ratio includes fragmented space share and contiguous storage availability; the congestion blocking list includes overloaded host identification code and risk device isolation timestamp; the available node address set includes qualified device network number and healthy host routing bit; the transfer target node address includes preferred receiving end network segment and preferred physical machine port; the server multi-node load balancing record includes packet rewrite log and hardware pin distribution status code.

[0020] Please see Figure 2 The specific steps of S1 are as follows: S111: Collect node storage device ledgers, parse internal address mapping records, extract isolated storage segments, read built-in space boundary values, perform hierarchical splicing operations on isolated storage segments, establish spatial distribution topology, and obtain the total volume of isolated segments; The system reads the node storage device ledger through the underlying storage device interface to obtain a dataset containing information on the physical sector distribution. It then performs a line-by-line scan of the logical mapping table within the ledger to extract address mapping records. During address mapping record parsing, logical block addresses are compared one by one with physical block addresses to detect gaps between consecutive address blocks and extract isolated storage fragments not continuously allocated by the file system. The built-in space boundary values ​​of each isolated storage fragment are read, specifically including the start and end physical address values. For all extracted isolated storage fragments, a hierarchical concatenation operation is performed according to an ascending order of physical address. The boundary values ​​of each independent fragment are subtracted to obtain the size of a single fragment. All single fragment sizes are then summed to establish a spatial distribution topology reflecting the degree of fragmentation and storage connectivity.

[0021] Based on the spatial topology node distribution, the starting address of the first isolated segment is set to 1024, and the ending address to 2048. Subtracting 1024 from 2048 yields a segment size of 1024 megabytes. The starting address of the second isolated segment is set to 4096, and the ending address to 8192. Subtracting 4096 from 8192 yields a segment size of 4096 megabytes. Summing the extracted 1024 megabytes and 4096 megabytes gives a final total isolated segment size of 5120 megabytes. The values ​​of 1024 and 4096 were obtained through high-frequency polling of the SSD controller chip logs at 50 times per second. The total isolated segment size of 5120 megabytes represents the total fragmented space in the current physical medium that cannot be continuously occupied by large files. This value provides fundamental data support for subsequent assessment of memory fragmentation distribution ratios. The advantage of this operational logic is that by directly reading the underlying physical boundary values ​​and performing cumulative summation operations, it avoids the abstraction errors of the file system layer.

[0022] S112: Monitor the snapshot of the device's operating status, retrieve the free area flag, extract the available memory page table, read the corresponding spatial scale value, perform span normalization splicing for the available memory page table, construct a global available reference base, and obtain the total free capacity of the server; The system retrieves snapshots of the monitoring device's operational status via the memory management interface, analyzes the current memory page resident status recorded in the snapshot, and retrieves the free area flag from the status description field. It then extracts the available memory page table containing this flag and reads the spatial scale value recorded within the corresponding page table, which reflects the physical capacity of a single memory page. For the selected available memory page tables, a span normalization and concatenation operation is performed, merging and aligning the discretely distributed free page tables according to a fixed-size memory block standard to construct a global available reference plane. Finally, the spatial scale values ​​of all normalized available memory page tables are summed to obtain the total free capacity of the server. For example, if the spatial scale value of the first available memory page table is found to be 2048 megabytes in the operational status snapshot, and the spatial scale value of the second available memory page table is found to be 6144 megabytes, summing 2048 megabytes and 6144 megabytes yields a total free capacity of 8192 megabytes. The numerical result of 8192 megabytes here reflects the total free memory space currently available for direct allocation and scheduling by the device, directly forming the reference base for subsequent fragmentation ratio calculations. During this process, the free area flag is updated in real time via a hardware interrupt signal from the memory controller and fed back to the register.

[0023] S113: Align the overall volume scale of the isolated segment to the spatial dimension of the server's total free capacity, build a volume mapping map between the two, extract the corresponding mapping scale built into the volume mapping map, and generate the memory fragmentation distribution ratio. The total size of the isolated segments and the total free capacity of the server are extracted. The numerical scale of the total size of the isolated segments is aligned to the same spatial dimension as the total free capacity of the server, using megabytes as the unit of measurement. A size mapping map of the two is constructed. Within the map, the total size of the isolated segments is extracted as the numerator variable, and the total free capacity of the server is extracted as the denominator variable. By dividing the total size of the isolated segments by the total free capacity of the server, the corresponding mapping scale built into the map is extracted to generate the memory fragmentation distribution ratio. Specifically, the calculated total size of the isolated segments, 5120 megabytes, and the calculated total free capacity of the server, 8192 megabytes, are extracted. The ratio of 5120 to 8192 is calculated, yielding a memory fragmentation distribution ratio of 62.5%. This 62.5% result indicates that more than half of the available space of the current server is in a fragmented isolated state, meaning that large memory allocation requests will face an extremely high risk of failure. This result will directly serve as a core evaluation parameter for subsequent congestion assessment and abnormal device screening.

[0024] Please see Figure 3 The specific steps of S2 are as follows: S211: Collect real-time half-connection queue depth records, obtain the set fragmentation warning benchmark and the set depth warning benchmark, compare the real-time half-connection queue depth records with the set depth warning benchmark, compare the memory fragmentation distribution ratio with the set fragmentation warning benchmark, and obtain the state evaluation sequence. Real-time half-connection queue depth is collected via the listening port at the underlying layer of the network transmission control protocol. This record reflects the total number of connection requests currently in the incomplete synchronization handshake state. Configuration files are retrieved to obtain a set fragmentation warning baseline and a set depth warning baseline. The fragmentation warning baseline defines a safe threshold for the degree of memory fragmentation, while the depth warning baseline defines an extreme threshold for the number of backlogged half-connections. A comparison is performed between the real-time half-connection queue depth record and the set depth warning baseline to determine if the current backlog of requests exceeds the safe boundary. Simultaneously, a comparison is performed between the memory fragmentation distribution ratio and the set fragmentation warning baseline. A status evaluation sequence is generated based on the degree of exceedance or compliance of these two comparisons.

[0025] Table 1 Comparison of Early Warning Benchmarks and Real-time Monitoring Data Table 1, as shown in the comparison table between the set early warning benchmark and real-time monitoring data, details the status of each node. The aforementioned 50% fragmentation early warning benchmark and 500-node depth early warning benchmark were derived by averaging the peak and valley cycles of normal business traffic over a historical 30-day period, with an additional 20% safety redundancy. Comparing the memory fragmentation distribution ratio of Node 1 (62.5%) in Table 1 with the set fragmentation early warning benchmark of 50%, it was confirmed that 62.5% is greater than 50%. Simultaneously, comparing the real-time half-connection queue depth of 650 nodes with the set depth early warning benchmark of 500 nodes, it was confirmed that 650 is greater than 500. Based on the characteristic that both comparison results are greater than the benchmark, a double over-limit flag is written into the status evaluation sequence. The advantage of this operational logic is that it combines real-time comparison operations of memory status and network connectivity in two dimensions, eliminating misjudgments caused by fluctuations in a single indicator.

[0026] S212: Based on the state assessment sequence, retrieve the internal over-limit flag bit, filter the abnormal servers that exceed the set fragmentation warning benchmark or exceed the set depth warning benchmark, implement label coverage for the abnormal servers, extract address identifiers, and generate congestion nodes. Within the full state assessment sequence, each data object is searched to identify and match internal over-limit flags. If a flag exists in the state assessment sequence of a node, an anomaly determination is triggered. Abnormal servers exceeding the set fragmentation warning benchmark or the set depth warning benchmark are selected. For the extracted abnormal servers, a tag overwriting action is performed, injecting a control tag prohibiting allocation requests into the device communication registration table. The basic network configuration table of the abnormal server is parsed to extract the unique network interconnection protocol address identifier corresponding to the physical network card. The address identifiers of all devices with control tags are aggregated to generate a congested node set. Based on the example in Table 1, the assessment sequence corresponding to node 1 contains double over-limit flags, and 70.0% and 800% of the nodes corresponding to node 3 also exceed the benchmark. Therefore, nodes 1 and 3 are selected as abnormal servers. The corresponding address identifiers are extracted, such as 192.168.1.10 for node 1 and 192.168.1.12 for node 3. These address identifiers are packaged to generate a congested node. The judgment here establishes the problem node that urgently needs to be isolated, and prepares a precise addressing target for issuing the interception command.

[0027] S213: Send an interception command to the traffic scheduling matrix, implement access blocking based on the built-in address identifier of the congested node, aggregate target address information, establish an isolation topology, and obtain the congestion blocking list; The main routing device sends an interception command containing source address spoofing characteristics and target control characteristics to its traffic scheduling matrix. After parsing the interception command, the scheduling matrix initiates an internal access control list modification program. Network-level access blocking is implemented for the internal network interconnection protocol address identifiers of congested nodes; that is, external request packets pointing to that address identifier are forcibly dropped at the router's entry point. The blocked target address information is aggregated to establish an isolated topology consisting of all restricted nodes, and the address list in the topology is exported to obtain the final congestion blocking list. In the above example, the address identifiers 192.168.1.10 and 192.168.1.12 are used as blocking parameters input into the interception rule base of the scheduling matrix. After access blocking is completed, a congestion blocking list containing these two addresses is successfully constructed. The constructed list directly determines the scope of subsequent filtering of available nodes, ensuring that allocated traffic does not flow into high-risk devices.

[0028] Please see Figure 4 The specific steps of S3 are as follows: S311: Collect global node running snapshots, compare and remove corresponding identifiers from the congestion blocking list, filter the remaining devices, extract the corresponding alternative memory fragmentation distribution ratio, read the corresponding alternative half-connection queue depth record, perform combined binding actions on the two, and establish an alternative running status map. Retrieve a global node runtime snapshot from the global cluster management center. This snapshot records the current activity snapshot data of all registered nodes in the entire distributed system. Cross-reference each node identifier contained in the global node runtime snapshot with the congestion blocking list, removing data items with the corresponding identifiers from the congestion blocking list. Filter out the remaining normal communication devices after the comparison and removal process, extract the distribution ratio of candidate memory fragments uploaded by the remaining devices, and read the candidate half-connection queue depth record from their hardware registers. Perform a timestamp-based combination binding action on the two selected core indicator data to ensure that all data correspond to the same sampling time, and then establish a two-dimensional candidate runtime status map.

[0029] Table 2 Summary of the Operating Status of Candidate Nodes Referring to Table 2, the summary table of candidate node operating status, after removing nodes 1 and 3, the operating indicators of the remaining nodes 4 to 6 were extracted and a graph was created. For example, the candidate memory fragmentation distribution ratio of 30% for node 4 was combined with the candidate half-connection queue depth of 200. This combination and binding operation ensured the spatiotemporal consistency of node evaluation data, prevented indicator misalignment caused by data collection time differences, and provided multi-dimensional and accurate underlying support for subsequent screening of compliant nodes.

[0030] S312: For the candidate running status graph, compare the candidate memory fragmentation distribution ratio with the set fragmentation warning benchmark value, compare the candidate semi-connection queue depth record with the set depth warning benchmark value, filter the node identifiers that do not exceed the set fragmentation warning benchmark and do not exceed the set depth warning benchmark, and obtain a list of compliant nodes. For the candidate operational status graphs, the compliance of the indicators of each node within the graph is verified. The fragmentation distribution ratio of each candidate node is compared to the set fragmentation warning benchmark of 50%, and the half-connection queue depth records of each candidate node are compared to the set depth warning benchmark of 500. Through logical operations, nodes whose values ​​do not exceed the set fragmentation warning benchmark and depth warning benchmark are selected, and nodes meeting all conditions are included in the compliant node list. Using the data from Table 2, for node 4, its fragmentation distribution ratio of 30% is compared to the benchmark of 50%, and its half-connection depth of 200 is compared to the benchmark of 500, and it also does not exceed the benchmark. Node 4 meets the requirements. For node 5, both 45% and 480% do not exceed the corresponding benchmarks, so node 5 meets the requirements. For node 6, 60% exceeds the 50% fragmentation warning benchmark and is therefore deemed non-compliant. The results are summarized to obtain the final compliant node list including nodes 4 and 5. This process successfully removed node 6, a device with localized vulnerabilities, greatly improving the reliability of devices that subsequently handled business traffic.

[0031] S313: Based on the list of compliant nodes, retrieve network communication configuration entries, extract the corresponding network interconnection protocol addresses, perform deduplication and merging actions on each network interconnection protocol address, establish an address connectivity mapping base, and generate a set of available node addresses; Based on a list of compliant nodes containing only nodes 4 and 5, network communication configuration entries are retrieved from the local name resolution cache. All network interconnection protocol address data bound to the physical entities corresponding to nodes 4 and 5 are extracted. Since a single physical machine may have multiple virtual network cards, lexicographical comparison and deduplication are performed on each extracted network interconnection protocol address to remove duplicate and invalid internal loopback addresses. The deduplicated valid external communication addresses are arranged in order to establish an address connectivity mapping base under the multi-node network interconnection architecture, generating a set of usable node addresses without conflicts. For example, the address of node 4 is extracted as 10.0.0.4, and the primary address and backup address of node 5 are extracted as 10.0.0.5 and 10.0.0.5, respectively. After deduplication to remove duplicate backup addresses, a set of usable node addresses containing only the two elements 10.0.0.4 and 10.0.0.5 is generated. The deduplication and merging operation avoids retry loops caused by address redundancy in the subsequent routing distribution mechanism.

[0032] Please see Figure 5 The specific steps of S4 are as follows: S411: Based on the set of available node addresses, retrieve the internal mapping device base, extract all candidate node half-connection queue backlog records, perform pairwise numerical scale cross-comparison for candidate node half-connection queue backlog records, distinguish the difference span of node backlog status, establish congestion level comparison topology, and obtain congestion assessment matrix. Based on the set of available node addresses, the kernel-maintained internal mapping device base is queried, and instructions are sent to the corresponding nodes 4 and 5 to extract the half-connection queue backlog records of all candidate nodes. For the extracted and returned candidate node half-connection queue backlog records, a pairwise cross-subtraction comparison is performed to determine the magnitude of the backlog. The difference is used to distinguish the range of backlog differences between compliant nodes, establishing a multi-level congestion hierarchy comparison topology, and obtaining a congestion assessment matrix that comprehensively reflects the relative idle levels among available nodes.

[0033] Table 3. Evaluation Matrix of Available Node Backlog Records Based on the data processing steps shown in Table 3 (which displays the available node backlog record evaluation matrix), 200 backlog records for node 4 and 480 backlog records for node 5 are extracted. A pairwise cross-comparison is performed between 200 and 480. Subtracting 480 from 200 yields a difference span of -280, and subtracting 200 from 480 yields a difference span of +280. These differences are then filled into the corresponding slots in the congestion evaluation matrix. The advantage of this cross-subtraction calculation logic is that it intuitively quantifies the severity of uneven load distribution among nodes within the cluster, providing a relative difference standard for subsequent position rearrangement.

[0034] S412: Based on the congestion assessment matrix, read the internal hierarchical assessment values, perform position rearrangement and sorting actions according to the numerical scale increasing from small to large, construct the overall state priority sequence, decompose the distribution structure of the priority sequence, extract the data item at the position of the minimum value, and obtain the first and first backlog records. Based on the congestion assessment matrix, the internally filled-in hierarchical assessment values ​​and the original backlog records of each node are read. Following a strict ascending order of the original numerical values, all available nodes are rearranged to construct a priority sequence reflecting the overall state. The distribution structure of this priority sequence is deconstructed, and the data item at the position of the minimum value (i.e., the first position in the sequence) is directly read and extracted using array indexes. All business attribute parameters attached to this data item are extracted to obtain the first backlog record. According to the example data, node 4 has 200 backlog values, and node 5 has 480 backlog values. Following the ascending order, node 4 is ranked first in the sequence, and node 5 is ranked second. Deconstructing and extracting the data item at the first position of the minimum value yields the first backlog record of node 4 with 200 records. This minimum value extraction operation ensures that the server with the lightest current load is forcibly and accurately selected from among many available servers.

[0035] S413: For the first backlog record, parse the underlying device binding identification information, extract the corresponding network interconnection protocol address, set the network interconnection protocol address as the data flow redirection endpoint, build a network link addressing guidance path, lock the business traffic hop direction, and establish the transfer target node address; For the first backlog record belonging to node 4, the underlying system device binding identification information of this record is parsed. The corresponding absolute network interconnection protocol address 10.0.0.4 is extracted from the associated network segment of the system device binding identification information. This network interconnection protocol address is set as the data flow redirection endpoint in the load balancer's forwarding table entry. A point-to-point network link addressing and guidance path is established based on the set endpoint and source address. By writing the guidance path rule, the static direction of the service traffic migration to node 4 is locked, and the final transfer target node address is established and issued in the routing daemon process. Here, 10.0.0.4 is written as the finally established unique transfer target node address into the dynamic host register. Through the above parameter transformation, the abstract optimal node evaluation result is effectively transformed into a specific address path that the underlying network can recognize and route, completely opening up the execution channel of the redirection mechanism.

[0036] Please see Figure 6 The specific steps of S5 are as follows: S511: Based on the target node address, obtain the client request data packet built into the communication port, disassemble the header encapsulation structure of the client request data packet, extract the internal target network interconnection protocol address, and establish a header addressing and positioning identifier; Based on the established destination node address, the edge gateway service process is invoked to obtain the client request data packets embedded in the external communication port in real time. After obtaining the data packet, the deep packet inspection module is invoked to disassemble the header encapsulation structure of the client request data packet at the transport layer, reading the source address field, destination address field, and checksum field bit by bit. The previously set invalid or congested target network protocol addresses are extracted and isolated to the buffer area, while the source address information is retained. Based on this, a header addressing and positioning identifier is established to identify the data packet's destination. For example, if the original destination address of the data packet is found to be the congested 192.168.1.10, this address is retained as the positioning reference to generate the header addressing and positioning identifier. This disassembly accurately strips away the routing layer of the data packet, providing a lossless operating environment for subsequent address replacement.

[0037] S512: For the header addressing and positioning identifier, read the address of the target node to be transferred, strip the original network interconnection protocol address inside the header addressing and positioning identifier, overwrite the target node address to be transferred, trigger the header update, and obtain the redirection request data packet; For the header addressing and positioning identifier, the storage channel is invoked to read the transfer target node address, 10.0.0.4, determined in step S413. In the header modifier, the original network interconnection protocol address 192.168.1.10 within the header addressing and positioning identifier is completely stripped and deleted. Then, an overwrite instruction is used to directly overwrite the transfer target node address 10.0.0.4 at the original offset position. After overwriting, a recalculation and update operation of the header cyclic redundancy check (CRC) is triggered. The recalculated checksum, along with the new address information, is encapsulated to obtain a compliant and complete redirection request data packet. This stripping and overwrite operation achieves seamless migration of business requests, directly directing client intent to a healthy node and completely eliminating the constraints of the original congested link.

[0038] S513: Based on the redirection request data packet, combined with the underlying communication stack, the redirection request data packet is pushed to the hardware network card pin, the corresponding hardware network card pin status change log is captured, the flow record is summarized, the distribution base is built, and the server multi-node load balancing record is generated. Based on redirection request packets, and in conjunction with the underlying operating system's transmission control communication stack driver, the redirection request packets are pushed as a byte stream to the output pins of the underlying physical hardware network interface card (NIC). During the push process, an interrupt capture program mounted in the kernel continuously monitors changes in pin levels, capturing the transmission status change logs generated by the corresponding hardware NIC pins. The flow record formed by summarizing the packet number, transmission timestamp, and final delivery address in the NIC logs is used to construct an allocation base mapping the distribution trajectory, thereby generating a server multi-node load balancing record with complete traceability. This execution process not only completes the physical layer transmission of packets but also forms closed-loop monitoring credentials by summarizing the NIC-level status change logs, ensuring that every traffic scheduling action has solid evidence and a benchmark for subsequent analysis.

[0039] Please see Figure 7 A multi-node server load balancing system, including: The node status extraction module is used to execute S1: collect the total number of isolated memory blocks stored inside the backend server node, calculate the total free memory capacity, reconstruct the ratio between the two, and output the memory fragmentation distribution ratio; The threshold comparison and judgment module is used to execute S2: collect the real-time half-connection queue depth records of the nodes, compare the memory fragmentation distribution ratio with the set fragmentation warning benchmark, compare the real-time half-connection queue depth records of the nodes with the set depth warning benchmark, mark the congested nodes and perform interception processing synchronously, and obtain the congestion interception list. The idle node classification module is used to perform S3: statistically analyze the distribution ratio of candidate memory fragments and the record of candidate half-connection queue depth of other candidate nodes outside the congestion interception list, filter the corresponding network interconnection protocol addresses that do not exceed the set fragmentation warning benchmark and do not exceed the set depth warning benchmark, and generate a set of available node addresses; The deep optimization sorting module is used to execute S4: Based on the set of available node addresses, extract the backlog records of all candidate node half-connection queues, perform cross-comparison of congestion levels and priority sorting, extract the record at the top of the sort, extract the network interconnection protocol address corresponding to the record, and establish the transfer target node address; The underlying message dispatch module is used to execute S5: based on the destination node address, it obtains the target network protocol address in the header of the client request data packet, replaces it with the destination node address, and pushes the client request data packet that has completed the replacement operation to the hardware network card pin to obtain the server multi-node load balancing record.

[0040] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection of the described technical solutions.

Claims

1. A server multi-node load balancing method, characterized in that, Includes the following steps: S1: Collect the total number of isolated memory blocks stored inside the backend server node, calculate the total free memory capacity, reconstruct the ratio between the two, and output the memory fragmentation distribution ratio. S2: Collect the real-time half-connection queue depth record of the collection node, compare the memory fragmentation distribution ratio with the set fragmentation warning benchmark, compare the real-time half-connection queue depth record of the collection node with the set depth warning benchmark, mark the congested node and perform interception processing synchronously, and obtain the congestion interception list. S3: Calculate the distribution ratio of candidate memory fragments and the record of candidate half-connection queue depth of the remaining candidate nodes outside the congestion interception list, filter the corresponding network interconnection protocol addresses that do not exceed the set fragmentation warning benchmark and do not exceed the set depth warning benchmark, and generate a set of available node addresses. S4: Based on the set of available node addresses, extract the backlog records of the half-connection queues of all candidate nodes, perform cross-comparison of congestion levels and priority ranking, extract the record at the top of the sort, extract the network interconnection protocol address corresponding to the record, and establish the transfer target node address; S5: Based on the target node address of the transfer, obtain the target network interconnection protocol address in the header of the client request data packet, replace it with the target node address of the transfer, and push the client request data packet that has completed the replacement operation to the hardware network card pin to obtain the server multi-node load balancing record.

2. The server multi-node load balancing method according to claim 1, characterized in that: The congested node specifically refers to the backend server node whose memory fragmentation distribution ratio exceeds the set fragmentation warning benchmark or whose real-time half-connection queue depth record exceeds the set depth warning benchmark.

3. The server multi-node load balancing method according to claim 1, characterized in that: The memory fragmentation distribution ratio includes fragmented space share and contiguous storage availability; the congestion interception list includes overloaded host identification code and risk device isolation timestamp; the available node address set includes qualified device network number and healthy host routing bit; the transfer target node address includes preferred receiving end network segment and preferred physical machine port; the server multi-node load balancing record includes packet rewriting log and hardware pin distribution status code.

4. The server multi-node load balancing method according to claim 1, characterized in that, The steps for obtaining the memory fragmentation distribution ratio are as follows: S111: Collect node storage device ledgers, parse internal address mapping records, extract isolated storage segments, read built-in space boundary values, perform hierarchical splicing operations on the isolated storage segments, establish spatial distribution topology, and obtain the total volume of isolated segments; S112: Monitor the snapshot of the device's operating status, retrieve the free area flag, extract the available memory page table, read the corresponding spatial scale value, perform a span normalization splicing operation on the available memory page table, construct a global available reference base, and obtain the total free capacity of the server. S113: Align the overall scale of the isolated segment to the spatial dimension of the server's total free capacity, build a volume mapping map between the two, extract the corresponding mapping scale built into the volume mapping map, and generate the memory fragmentation distribution ratio.

5. The server multi-node load balancing method according to claim 1, characterized in that, The steps for obtaining the congestion blocking list are as follows: S211: Collect real-time half-connection queue depth records, obtain a set fragmentation warning benchmark and a set depth warning benchmark, compare the real-time half-connection queue depth records with the set depth warning benchmark, compare the memory fragmentation distribution ratio with the set fragmentation warning benchmark, and obtain a state evaluation sequence. S212: Based on the state assessment sequence, retrieve the internal over-limit flag bit, filter the abnormal servers that exceed the set fragmentation warning benchmark or exceed the set depth warning benchmark, implement label coverage for the abnormal servers, extract address identifiers, and generate congestion nodes. S213: Issue an interception command to the traffic scheduling matrix, implement access blocking based on the built-in address identifier of the congested node, aggregate target address information, establish an isolation topology, and obtain a congestion interception list.

6. The server multi-node load balancing method according to claim 1, characterized in that, The steps for obtaining the set of available node addresses are as follows: S311: Collect global node running snapshots, compare and remove the corresponding identifiers of the congestion interception list, filter the remaining devices, extract the corresponding candidate memory fragment distribution ratio, read the corresponding candidate half-connection queue depth record, perform a combined binding action on the two, and establish a candidate running status map. S312: For the candidate running status map, compare the candidate memory fragmentation distribution ratio with the set fragmentation warning benchmark value, compare the candidate half-connection queue depth record with the set depth warning benchmark value, filter the node identifiers that do not exceed the set fragmentation warning benchmark and do not exceed the set depth warning benchmark, and obtain a list of compliant nodes. S313: Based on the compliant node list, retrieve network communication configuration entries, extract the corresponding network interconnection protocol addresses, perform deduplication and merging operations on each network interconnection protocol address, establish an address connectivity mapping base, and generate a set of available node addresses.

7. The server multi-node load balancing method according to claim 1, characterized in that, The steps for obtaining the target node address for the transfer are as follows: S411: Based on the set of available node addresses, retrieve the internal mapping device base, extract all candidate node half-connection queue backlog records, perform pairwise numerical scale cross-comparison for the candidate node half-connection queue backlog records, distinguish the difference span of node backlog status, establish a congestion level comparison topology, and obtain a congestion evaluation matrix. S412: Based on the congestion assessment matrix, read the internal hierarchical assessment values, perform position rearrangement and sorting actions according to the numerical scale increasing from small to large, construct the overall state priority order sequence, decompose the distribution structure of the priority order sequence, extract the data item at the position of the minimum value, and obtain the first and first backlog records. S413: For the first backlog record, parse the underlying device binding identification information, extract the corresponding network interconnection protocol address, set the network interconnection protocol address as the data flow redirection endpoint, build a network link addressing guidance path, lock the business traffic hop direction, and establish the transfer target node address.

8. The server multi-node load balancing method according to claim 1, characterized in that, The steps for obtaining the server multi-node load balancing record are as follows: S511: Based on the address of the target node for transfer, obtain the client request data packet built into the communication port, disassemble the header encapsulation structure of the client request data packet, extract the internal target network interconnection protocol address, and establish a header addressing and positioning identifier; S512: For the header addressing and positioning identifier, read the address of the transfer target node, strip the original network interconnection protocol address inside the header addressing and positioning identifier, overwrite the address of the transfer target node, trigger header update, and obtain the redirection request data packet; S513: Based on the redirection request data packet, combined with the underlying communication stack, the redirection request data packet is pushed to the hardware network card pin, the corresponding hardware network card pin status change log is captured, the flow record is summarized, the allocation base is constructed, and the server multi-node load balancing record is generated.

9. A server multi-node load balancing system, characterized in that, The system is used to implement the method according to any one of claims 1-8, comprising: The node status extraction module collects the total number of isolated memory blocks inside the backend server node, calculates the total free memory capacity, reconstructs the proportional relationship between the two, and outputs the memory fragmentation distribution ratio. The threshold comparison and judgment module collects real-time half-connection queue depth records of nodes, compares the memory fragmentation distribution ratio with the set fragmentation warning benchmark, compares the real-time half-connection queue depth records of nodes with the set depth warning benchmark, marks congested nodes and performs interception processing synchronously, and obtains a congestion interception list. The idle node classification module counts the distribution ratio of candidate memory fragments and the record of candidate half-connection queue depths of other candidate nodes outside the congestion interception list, filters the corresponding network interconnection protocol addresses that do not exceed the set fragmentation warning benchmark and do not exceed the set depth warning benchmark, and generates a set of available node addresses. The deep optimization sorting module, based on the set of available node addresses, extracts the backlog records of the half-connection queues of all candidate nodes, performs cross-comparison of congestion levels and priority sorting, extracts the record at the top of the sort, extracts the network interconnection protocol address corresponding to the record, and establishes the transfer target node address; The underlying message dispatch module, based on the address of the transfer target node, obtains the target network interconnection protocol address in the header of the client request data packet, replaces it with the address of the transfer target node, and pushes the client request data packet that has completed the replacement operation to the hardware network card pin to obtain the server multi-node load balancing record.