Search

CN-121984973-A - Distributed service node load balancing system and method

CN121984973ACN 121984973 ACN121984973 ACN 121984973ACN-121984973-A

Abstract

The invention discloses a distributed service node load balancing system and a distributed service node load balancing method, which relate to the technical field of computer nodes and comprise a load balancing unit, a service node cluster, a central control unit and an abnormality monitoring and feedback unit; the invention obtains a service request from a client, analyzes characteristic parameters according to the service request, provides a service node cluster consisting of a plurality of heterogeneous service nodes, calculates a real-time load index of each service node through a dynamic weight model, selects a target service node from the service node cluster according to a preset scheduling strategy, establishes a load prediction model according to an LSTM neural network, outputs a load prediction value according to the load prediction model, obtains a load threshold of each target service node, calculates a load evaluation coefficient according to the load prediction value, evaluates the service state of each target service node according to a preset overload judgment threshold, and realizes communication requirements based on the target service nodes meeting evaluation standards.

Inventors

  • QIAO GUILI

Assignees

  • 福州市麦丰云服科技有限公司

Dates

Publication Date
20260505
Application Date
20260121

Claims (7)

  1. 1. The distributed service node load balancing system is characterized by comprising a load balancing unit, a service node cluster, a central control unit and an abnormality monitoring and feedback unit; The load balancing unit comprises a request acquisition module and a demand distribution module, wherein the request acquisition module is used for providing a request entry, acquiring a service request from a client, analyzing characteristic parameters according to the service request and sending the service request to the demand distribution unit; The service node cluster consists of a plurality of heterogeneous service nodes, and a node state monitoring module and a load threshold self-adaptive adjusting module are configured for each heterogeneous service node; The node state monitoring module is used for reporting CPU utilization rate, memory occupancy rate, concurrent connection number and response delay of the service node in real time; The load threshold self-adaptive adjustment module is used for acquiring the real-time load index of the service node, judging the node bearing state according to the historical load data, and automatically and dynamically correcting the maximum bearing threshold of the node when the node bearing state is overloaded; The demand distribution unit acquires and processes the characteristic parameters, calculates the real-time load index of each service node through a dynamic weight model, selects a target service node from the service node cluster according to a preset scheduling strategy, marks the target service node, integrates the target service node to obtain a node set, and sends the node set to the central control unit; The central control unit comprises a resource evaluation module and a communication execution module, wherein the resource allocation module is used for establishing a load prediction model according to an LSTM neural network, outputting a load prediction value according to the load prediction model, acquiring a load threshold value of each target service node, calculating a load evaluation coefficient according to the load prediction value, evaluating the service state of each target service node according to a preset overload judgment threshold value, generating allocation instructions and execution instructions according to the service state, and sending the allocation instructions to the communication execution module; The communication execution module is used for receiving and processing the execution command, communicating with the load balancing unit and all the service nodes, periodically collecting node state data and updating the global load view, and triggering a transverse capacity expansion instruction and requesting a migration flow when detecting that the real-time load of the service nodes exceeds a preset load threshold.
  2. 2. The distributed service node load balancing system of claim 1, wherein the anomaly monitoring and feedback unit comprises a detection marking module and a fault feedback module, wherein: the detection marking module is used for periodically sending a heartbeat packet to the service node and verifying service availability, and if the error code and the timeout rate returned by the service node are monitored, the corresponding service node is marked as an abnormal node; the fault feedback module performs flow fusing on the abnormal nodes, pauses new request distribution, and simultaneously enables the standby node pool to take over fault node service.
  3. 3. The distributed service node load balancing system according to claim 1, wherein the specific process of integrating the node set is as follows: S101, acquiring a real-time load index of each service node, wherein the real-time load index comprises a current CPU utilization rate Ci, node average response time Ti and active connection number Ni; s102, calculating a real-time load index Wi of each service node according to the dynamic weight model sampling weighted minimum connection number algorithm: wherein alpha, beta and gamma are preset weight coefficients, and the alpha+beta+gamma=1 is satisfied, cmax is the current CPU load threshold, tc is the node fastest response time, and the real-time load index is used for reflecting the load state of the service node; s103, a service request sent by a client arrives at a request acquisition module through an HTTP protocol, and characteristic parameters in the service request are extracted, wherein the characteristic parameters comprise a request path, query parameters, a request body and a Cookie identifier; s104, acquiring a preset scheduling strategy, which specifically comprises the following steps: realizing request viscosity based on IP and Cookie identification of the client; preferentially selecting service nodes with the distance from the geographic position of the client being smaller than the node selection radius; Distributing a special high-priority node pool based on the query parameters of the client; S105, obtaining the IP of the client and the real-time position of the client based on the request path analysis, defining a node selection area according to the preset node selection radius and the real-time position of the client, screening a high-priority node pool in the node selection area based on the query parameters, further screening target nodes from the high-priority node pool according to Cookie identification, and integrating to obtain a node set.
  4. 4. The distributed service node load balancing system according to claim 1, wherein the specific process of outputting the load prediction value according to the load prediction model is as follows: S201, constructing a load prediction model based on an LSTM neural network, and acquiring historical data, wherein the historical data comprises historical flow requirements, holiday factors and promotion activity marks, the historical data is used as training samples, and the generated training samples are divided into training sets and test sets according to a ratio of 8:2; s202, downloading a weight file and loading the weight file onto a corresponding network, initializing migration network parameters, and determining the hidden layer node number of the BP neural network model according to the number of samples in a training set; S203, modifying the last full-connection layer of the network, keeping the input unchanged, setting the output as a load prediction value, initializing the weight of the last layer, learning by using a gradient descent algorithm, optimizing training parameters by adopting fixed step attenuation, and retraining the whole network to obtain a load prediction model; s204, randomly and repeatedly extracting small batches of training samples from the training set in the training process, wherein all the training samples in the training set are extracted as a training period, and iterating to a certain period to finish training, so that the effect of the load prediction model is estimated by using the test set; s205, acquiring the real-time flow demand of the client, the updated holiday factor and the promotion activity mark, inputting the real-time flow demand, the updated holiday factor and the promotion activity mark into a load prediction model, and outputting a load prediction value.
  5. 5. The distributed service node load balancing system according to claim 1, wherein the specific process of generating deployment instructions and executing instructions is as follows: S301, acquiring a load threshold of each target service node, wherein the load threshold comprises a CPU load threshold Cmax, a memory use threshold Bmax, a disk load threshold Dmax and a service response time threshold Tmax; s302, obtaining a load predicted value, wherein the load predicted value comprises CPU load data Cn, memory use data Bn, disk load data Dn and service response time data Tn, and calculating a load evaluation coefficient according to the following formula: Wherein e1, e2, e3 and e4 are all preset weight coefficients, the load evaluation coefficients are used for judging the satisfaction degree of the service node for the service request, the larger the load evaluation coefficient is, the service node is difficult to satisfy the service request, and the smaller the load evaluation coefficient is, the more suitable the service node is for the service request; S303, acquiring a preset overload judgment threshold, and if the load evaluation coefficient is smaller than the overload judgment threshold, generating an execution instruction and sending the execution instruction to a communication execution module; and if the load evaluation coefficient is greater than or equal to the overload judgment threshold value, generating a deployment instruction.
  6. 6. The distributed service node load balancing system according to claim 1, wherein the node state monitoring module is configured to report, in real time, a CPU utilization rate, a memory occupancy rate, a concurrent connection number, and a response delay of the service node; The load threshold self-adaptive adjustment module is used for acquiring the real-time load index of the service node, judging the node bearing state according to the historical load data, and automatically and dynamically correcting the maximum bearing threshold of the node when the node bearing state is overloaded.
  7. 7. The distributed service node load balancing method is characterized by comprising the following steps of: step one, providing a request entry, acquiring a service request from a client, and analyzing characteristic parameters according to the service request; Step two, providing a service node cluster formed by a plurality of heterogeneous service nodes, and configuring a node state monitoring module and a load threshold self-adaptive adjustment module for each heterogeneous service node; calculating a real-time load index of each service node through a dynamic weight model, selecting a target service node from the service node cluster according to a preset scheduling strategy, marking the target service node, and integrating the marked target service node to obtain a node set; Establishing a load prediction model according to the LSTM neural network, outputting a load prediction value according to the load prediction model, acquiring a load threshold of each target service node, calculating a load evaluation coefficient according to the load prediction value, evaluating the service state of each target service node according to a preset overload judgment threshold, and generating a deployment instruction and an execution instruction according to the service state; And fifthly, receiving an execution command to execute communication among the service nodes, periodically collecting node state data and updating the global load view, and triggering a transverse capacity expansion instruction and requesting a migration flow when detecting that the real-time load of the service nodes exceeds a preset load threshold.

Description

Distributed service node load balancing system and method Technical Field The present invention relates to the field of computer node technologies, and in particular, to a distributed service node load balancing system and method. Background Distributed service nodes refer to a plurality of computing units (such as servers, virtual machines, containers, etc.) connected through a network in a distributed system, and each node is responsible for a certain service function. The distributed service nodes cooperate to complete an overall task. Communication, data sharing, load balancing and the like are usually performed between the two. The distributed service node is a basic component for realizing the technologies of distributed systems, micro-service architecture, big data processing, cloud computing and the like. The reasonable design and deployment of the nodes are key to the construction of an efficient and reliable system; The distributed service nodes can support concurrent requests of a large number of users in sales promotion activities and shopping peak periods, provide functions such as load balancing and fault tolerance, ensure high availability and quick response of a system, meanwhile, the E-commerce platform also needs to push information to each user side, push service needs to use a plurality of push service nodes, and whether the push service nodes are matched with push tasks or not can cause waste or deficiency of resources, so that big data is introduced, a big data analysis technology can help an administrator to better know the performance of the nodes, such as the best performance of which node and the worst performance of which node, but the existing load balancing technology is mostly based on static configuration or simple polling strategies, and has the problems of uneven load distribution, lag in node fault response, insufficient dynamic expansion capacity, and the like, so that the overall resource utilization rate of the system is low and the service quality fluctuates; in view of the technical drawbacks described above, solutions are now proposed. Disclosure of Invention The method and the system aim at outputting a load predicted value according to a load predicted model, acquiring a load threshold of each target service node, evaluating the service state of each target service node according to a preset overload judging threshold by combining the load predicted value and calculating a load evaluating coefficient, and realizing communication requirements based on the target service nodes meeting evaluation standards so as to avoid the problems of uneven load distribution and delayed node fault response. In order to achieve the aim, the distributed service node load balancing system adopts the following technical scheme that the distributed service node load balancing system comprises a load balancing unit, a service node cluster, a central control unit and an abnormality monitoring and feedback unit; The load balancing unit comprises a request acquisition module and a demand distribution module, wherein the request acquisition module is used for providing a request entry, acquiring a service request from a client, analyzing characteristic parameters according to the service request and sending the service request to the demand distribution unit; The service node cluster consists of a plurality of heterogeneous service nodes, and a node state monitoring module and a load threshold self-adaptive adjusting module are configured for each heterogeneous service node; The node state monitoring module is used for reporting CPU utilization rate, memory occupancy rate, concurrent connection number and response delay of the service node in real time; The load threshold self-adaptive adjustment module is used for acquiring the real-time load index of the service node, judging the node bearing state according to the historical load data, and automatically and dynamically correcting the maximum bearing threshold of the node when the node bearing state is overloaded. The demand distribution unit acquires and processes the characteristic parameters, calculates the real-time load index of each service node through a dynamic weight model, selects a target service node from the service node cluster according to a preset scheduling strategy, marks the target service node, integrates the target service node to obtain a node set, and sends the node set to the central control unit; The central control unit comprises a resource evaluation module and a communication execution module, wherein the resource allocation module is used for establishing a load prediction model according to an LSTM neural network, outputting a load prediction value according to the load prediction model, acquiring a load threshold value of each target service node, calculating a load evaluation coefficient according to the load prediction value, evaluating the service state of each target service node according to a preset over