CN113742066A - Load balancing system and method for server cluster - Google Patents

Load balancing system and method for server cluster Download PDF

Info

Publication number
CN113742066A
CN113742066A CN202110909283.1A CN202110909283A CN113742066A CN 113742066 A CN113742066 A CN 113742066A CN 202110909283 A CN202110909283 A CN 202110909283A CN 113742066 A CN113742066 A CN 113742066A
Authority
CN
China
Prior art keywords
service
server
node
service node
flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110909283.1A
Other languages
Chinese (zh)
Inventor
文建良
杨冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Unicom Woyuedu Technology Culture Co Ltd
Original Assignee
Unicom Woyuedu Technology Culture Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Unicom Woyuedu Technology Culture Co Ltd filed Critical Unicom Woyuedu Technology Culture Co Ltd
Priority to CN202110909283.1A priority Critical patent/CN113742066A/en
Publication of CN113742066A publication Critical patent/CN113742066A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3433Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment for load management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a load balancing system and a method for a server cluster, wherein the system comprises a strategy adjustment service unit, a load balancing service unit and at least one service server, and each service server is provided with at least one service node; the load balancing service unit receives an external flow request, distributes the external flow request according to the service weight of each service node, and updates the current service weight and/or the online state of at least one service node according to a strategy adjusting instruction; the service node is used for processing an external flow request and acquiring server state data according to a preset period; the policy adjustment service unit is configured to receive server state data reported by each service node, read traffic data, and generate the policy adjustment instruction according to the server state data and the traffic data.

Description

Load balancing system and method for server cluster
Technical Field
The invention relates to the technical field of Internet. And more particularly, to a load balancing system and method for a cluster of servers.
Background
A server cluster refers to a collection of servers that together provide the same service, appearing to a client as if there is only one server. The cluster can use a plurality of computers to perform parallel computation so as to obtain higher computation speed, and can also use a plurality of computers to perform backup so as to ensure that any one machine damages the whole system or can normally run. Load balancing refers to a service for carrying out traffic distribution on a plurality of servers, and the availability of an application system can be improved by expanding the external service capacity of the application system through traffic distribution and eliminating single-point faults.
In the current server cluster management process, unexpected and sudden situations of large fluctuation of request flow are likely to exist, and as a fixed service deployment scheme has an upper limit threshold value for processing capacity and request acceptance, if a flow fluctuation peak value is a long-time overtime threshold value and no effective personnel intervenes in a strong-force scene, the operation condition of the whole server is affected, and further adverse effects are generated on production and operation. The present invention is directed to a load balancing system and method for a server cluster that overcomes at least one of the problems in the prior art.
Disclosure of Invention
The present invention is directed to a load balancing system and method for a server cluster to solve at least one of the problems of the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a load balancing system for a server cluster in a first aspect, comprising:
the system comprises a strategy adjustment service unit, a load balancing service unit and at least one service server, wherein each service server is provided with at least one service node;
the load balancing service unit is used for receiving an external flow request, distributing the external flow request according to the service weight of each service node, and updating the current service weight and/or the online state of at least one service node according to a strategy adjusting instruction sent by the strategy adjusting service unit;
the service node is used for processing an external flow request and acquiring server state data comprising the central processor utilization rate, the disk utilization rate, the central processor load and the current service weight of the service server according to preset time granularity;
the policy adjustment service unit is configured to receive server status data reported by each of the service nodes, read traffic data, and generate the policy adjustment instruction including a current service weight, an online instruction, and an offline instruction of each of the service nodes according to the server status data and the traffic data reported by each of the service nodes.
The policy adjustment service unit comprises a cluster server state monitoring module, a flow log analysis module and an expansion module which are in communication connection with each other;
the cluster server state monitoring module monitors server state data of each business service node, counts the server state data and performs service early warning on abnormal business service nodes;
the flow log analysis module records flow data in a log dotting mode, monitors flow peak values and analyzes flow changes in different periods to obtain flow log analysis results;
and the capacity expansion module judges capacity expansion requirements according to the flow log analysis result, generates a node adjustment instruction, and starts a standby service node to reduce the load pressure of each service node.
Further, the policy adjustment module further comprises a health check module,
the health check module receives server state data of each business service node, sends a node offline instruction of a corresponding business service node to the strategy adjustment unit if the server state data is not received after overtime, receives a node adjustment instruction sent by the capacity expansion module and sends the node adjustment instruction to the load balancing service unit.
Further, the traffic data includes total traffic information and distribution traffic information distributed to each of the service nodes; when the traffic log analysis module monitors and/or predicts that the total traffic exceeds a total traffic threshold, the traffic log analysis result indicates that capacity expansion service needs to be performed, and when the distribution traffic exceeds a distribution traffic threshold of the corresponding service node, the traffic log analysis result indicates that the current service weight of the corresponding service node is reduced.
Further, the cluster server state monitoring module establishes a long connection with each of the service nodes using a socket communication protocol to receive server state data of each of the service nodes.
Furthermore, the load balancing service unit distributes traffic to the service nodes according to an ip _ hash weighting strategy, and the service weight of each service node is determined according to the server operation parameter and/or the server performance parameter to which the service node belongs;
the ip _ hash takes the ip address of the user client as a hash key, so that the user request of the same ip is always on the same server to establish stable session control.
Furthermore, the service node reserves at least one port for starting a standby service node.
The second aspect of the present invention provides a method for a load balancing service unit of a server cluster, including:
receiving an external flow request, distributing the external flow request according to the service weight of each service node, updating the current service weight and/or the online state of at least one service node according to a strategy adjusting instruction sent by a strategy adjusting service unit, and firstly filtering illegal requests after receiving the external flow request;
the policy adjustment service unit receives server state data and flow data from the service nodes, performs policy adjustment according to the server state data and the flow data, and generates the policy adjustment instruction and the node adjustment instruction, where the node adjustment instruction is used to turn on or turn off a standby service node of each service node.
A third aspect of the invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method provided by the second aspect of the invention when executing the program.
The invention has the following beneficial effects:
according to the scheme provided by the application, the flow of all service nodes of the server is counted, the flow peak value is monitored, and the flow change in different periods is analyzed; the method monitors the service conditions of the internal memory and the disk of the server, carries out early warning on the abnormity, carries out dynamic strategy adjustment according to the flow and the server state, carries out IP distribution on the flow, ensures the optimal operation of the service, and solves the problem of service paralysis caused by unexpected sudden increase of the flow in the field of server clusters without manual intervention of personnel.
Drawings
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
FIG. 1 illustrates an exemplary system architecture diagram in which an embodiment of the present invention may be applied.
Fig. 2 is a structural diagram illustrating a load balancing service unit system for a server cluster according to an embodiment of the present invention.
Fig. 3 shows a schematic structure diagram of a policy adjustment service unit.
Fig. 4 is a schematic diagram illustrating a load balancing service method for a server cluster according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a computer device implementing the apparatus provided by the embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the present invention, the present invention will be further described with reference to the following examples and the accompanying drawings. Similar parts in the figures are denoted by the same reference numerals. It is to be understood by persons skilled in the art that the following detailed description is illustrative and not restrictive, and is not to be taken as limiting the scope of the invention.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and servers 105, 106. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the servers 105, 106. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the servers 105, 106 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as an image recognition application, a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting text input, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The servers 105, 106 may be servers that provide various services, such as any module of a policy adjustment service unit, a load balancing service unit, and/or one or more traffic service nodes.
The servers 105 and 106 may be hardware or software. When the servers 105 and 106 are hardware, they may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the cluster server state monitoring module, the traffic log analysis module, the capacity expansion module and the health check module in the present invention are not necessarily deployed on the same server.
Each server may deploy both a business service node and individual service units simultaneously.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any suitable number of terminal devices, networks, and servers, as desired for implementation.
Further, as shown in fig. 2, an embodiment of the present invention provides a load balancing system for a server cluster, including:
the system comprises a load balancing service unit, a strategy adjusting service unit and at least one service server, wherein each service server is provided with at least one service node;
the load balancing service unit is used for receiving an external flow request, distributing the external flow request according to the service weight of each service node, and updating the current service weight and/or the online state of at least one service node according to a strategy adjusting instruction sent by the strategy adjusting service unit;
the service node is used for processing an external flow request and acquiring server state data comprising the central processor utilization rate, the disk utilization rate, the central processor load and the current service weight of the service server according to preset time granularity;
the policy adjustment service unit is configured to receive server status data reported by each of the service nodes, read traffic data, and generate the policy adjustment instruction including a current service weight, a node online instruction, and a node offline instruction of each of the service nodes according to the server status data and the traffic data reported by each of the service nodes.
It should be noted that the policy adjustment unit is connected to each service node, which is not shown in the figure.
In a specific embodiment, as shown in fig. 3, the policy adjustment service unit 200 includes a cluster server state monitoring module, a traffic log analysis module, a health check module, and a capacity expansion module, which are communicatively connected to each other; in the figure, 001 represents the load balancing service unit, and 002 represents each service node
The cluster server state monitoring module monitors server state data of each business service node 002, reports the server state data and performs service early warning on abnormal business service nodes, and sends a distribution stopping instruction to the load balancing service unit if the number of times that the cluster server state monitoring module does not receive the server state data exceeds a preset number of times;
the flow log analysis service module records flow data in a log dotting mode, monitors flow peak values and analyzes flow changes in different periods to obtain flow log analysis results;
the capacity expansion module judges capacity expansion requirements according to the flow log analysis result, generates a node adjustment instruction, and starts a standby service node to reduce the load pressure of each service node;
the health check module receives server state data of each business service node, if the server state data is not received after overtime, a node offline instruction of the corresponding business service node is sent to the strategy adjustment unit, and a node adjustment instruction sent by the capacity expansion module is received and the node adjustment instruction is sent to the load balancing service unit;
the traffic data comprises total traffic information and distribution traffic information distributed to each of the service nodes; when the traffic log analysis module monitors and/or predicts that the total traffic exceeds a total traffic threshold, the traffic log analysis result indicates that capacity expansion service needs to be performed, and when the distribution traffic exceeds a distribution traffic threshold of the corresponding service node, the traffic log analysis result indicates that the current service weight of the corresponding service node is reduced.
In one possible implementation, the cluster server status monitoring module establishes a long connection with each of the service nodes using a socket communication protocol to receive server status data of each of the service nodes.
In a possible implementation manner, the load balancing service unit performs traffic distribution on the service nodes according to an ip _ hash weighting policy, and a service weight of each service node is determined according to a server operation parameter and/or a server performance parameter of the service node;
the ip _ hash takes the ip address of the user client as a hash key, so that the user request of the same ip is always on the same server to establish stable session control.
In a possible implementation manner, the service node reserves at least one port for starting the standby service node.
In a possible implementation manner, the traffic log analysis module reads total traffic consumed in different network systems and distributed traffic distributed to different service nodes from the load balancing service unit log to obtain traffic information, and performs statistics according to different time granularities, for example, performs statistics once per minute, so as to determine peak traffic at each time point; setting a total flow threshold and each distribution flow threshold based on the statistical data, sending a flow analysis result of capacity expansion service when the statistical value exceeds the total flow threshold or each distribution flow threshold, and reducing the current service weight of the corresponding service node to avoid service interruption or even down when the analysis result of the flow log is the analysis result when the distribution flow exceeds the distribution flow threshold of the corresponding service node.
The cluster server state monitoring module receives server state data containing the CPU utilization rate and the disk utilization rate, counts peak values of different values in different time periods according to different time granularities, collects all statistical data, can set a CPU and a disk threshold value to judge whether application nodes can be added on the current server or not by taking the statistical data as a basis, and sends an early warning notice under the condition of overload, so that service interruption and even downtime are avoided.
In a specific embodiment, the capacity expansion module receives the flow log analysis result, determines whether capacity expansion is needed, if capacity expansion is needed, the cluster server state monitoring module obtains state data of each server, a service server with the highest current service weight is preferentially selected according to the weight for capacity expansion, if the service weights are the same, a server with the lowest cpu utilization and disk utilization is selected for capacity expansion, when the cpu or the disk reaches a threshold value, a server with a lower weight is selected downwards step by step, a user quickly expands the capacity of an application program to reduce the load pressure of each node, a capacity expansion node is constructed by using a system self-contained command, and a standby service node is started by using a reserved standby port in advance.
In a specific embodiment, each business service node can calculate the cpu usage and the disk usage of the current server through the system self-contained command and sends the current server cpu usage and the disk usage to the health check module at regular time, when the health check module monitors that a certain service node is abnormal, a offline instruction is sent to inform the load balancing service unit to take the service node offline, that is, no external traffic request is distributed to the server, each service node periodically sends a status instruction, if the status information of the server is received, the server is normal, otherwise, the server is marked as abnormal, and sending an offline instruction to inform the load balancing service unit to remove the distribution queue, sending an early warning short message to the corresponding service node, sending an online instruction to the newly online service node, and informing the load balancing device to add the new node into the distribution queue after the provider receives the instruction.
The following combination cases will be described in detail:
the method comprises the following steps: three linux centros 74 core 8G servers are named as C41, C42 and C43 respectively, and one linux centros 72 core 4G server is named as C21; c41 is set to deploy a load balancing service unit, a flow log analysis module and a cluster server state monitoring module; c42 deploys a capacity expansion module, a health check module and an application service node s1, and 8001 and 8100 ports are reserved as standby application service nodes; c43 deploys an application service node s2, and 8001 and 8100 ports are reserved as standby application service nodes; c21 deploys an application service node s3, and 8001 and 8100 ports are reserved as standby application service nodes; c42 and C43 single-machine application node maximum concurrency number b1 is 2K, b2 is 2K, and C21 single-machine application node maximum concurrency b3 is 1K;
setting a scene: server traffic was ramped up from 1000 seconds to 1W in 5 minutes.
The implementation case comprises the following steps:
when a request arrives at the load balancing service unit, the load balancing service unit redistributes the traffic to s1, s2 and s3 according to ip and weight by proportion of 2:2: 1.
Setting a cluster server state monitoring module and a flow monitoring service to synchronously report statistical data every minute;
the capacity expansion module calculates the second concurrency according to the reported flow data, calculates the concurrency b of the application service as b1+ b2+ b3 according to the maximum concurrency number of all the current nodes, and triggers the capacity expansion service when the current second concurrency is larger than the system concurrency. And preferentially selecting a server with the highest weight for capacity expansion according to the weight according to the state data reported by the server state monitoring program, selecting a server with the lowest CPU utilization rate and a server with the lowest disk utilization rate according to the same weight for capacity expansion, and selecting the server with the lower weight downwards step by step when the CPU or the disk reaches a threshold value. In this case, since C42 and C43 have the same configuration, but more programs are deployed on C42, the C43 server is preferably selected as a capacity expansion server and a new node s4 is enabled;
when the new node is started, an online instruction is sent to the health check module program, and the health check module informs the load balancing service unit to add the new node s4 to the distribution queue.
When a certain node is abnormally off-line, the health check module informs the load balancing service unit to off-line the node;
as shown in fig. 4, another embodiment of the present invention provides a load balancing method for a server cluster, including:
receiving an external flow request and filtering illegal requests;
distributing the external flow request according to the service weight of each service node, and updating the current service weight and/or the online state of at least one service node according to a strategy adjusting instruction sent by a strategy adjusting service unit;
and the strategy adjusting service unit receives the server state data and the flow data from the service node, performs strategy adjustment according to the server state data and the flow data, and generates the strategy adjusting instruction.
It should be noted that the principle and the working flow of the load balancing method for the server cluster provided in this embodiment are similar to those of the load balancing apparatus for the server cluster, and reference may be made to the above description for relevant points, which are not described herein again.
As shown in fig. 5, another embodiment of the present invention provides a schematic structural diagram of a computer device. The computer device 40 shown in fig. 5 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present invention.
As shown in FIG. 5, computer device 40 is embodied in the form of a general purpose computing device. The components of computer device 40 may include, but are not limited to: one or more processors or processing units 41, a system memory 47, and a bus 43 that couples various system components including the system memory 47 and the processing unit 41.
Bus 43 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 47 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)44 and/or cache memory 45. The computer device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 46 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 43 by one or more data media interfaces. Memory 47 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 52 having a set (at least one) of program modules 47 may be stored, for example, in memory 47, such program modules 47 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 47 generally perform the functions and/or methodologies of the described embodiments of the invention.
Computer device 40 may also communicate with one or more external devices 48 (e.g., keyboard, pointing device, display 49, etc.), with one or more devices that enable a user to interact with computer device 40, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 40 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 50. Also, computer device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via network adapter 51. As shown in FIG. 5, network adapter 51 communicates with the other modules of computer device 40 via bus 43. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with computer device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor unit 41 executes various functional applications and data processing by executing programs stored in the system memory 47, for example, to implement a skeleton action diagram generation method provided by an embodiment of the present invention.
In the description of the present invention, it should be noted that the terms "upper", "lower", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, which are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and operate, and thus, should not be construed as limiting the present invention. Unless expressly stated or limited otherwise, the terms "mounted," "connected," and "connected" are intended to be inclusive and mean, for example, that they may be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
It is further noted that, in the description of the present invention, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It should be understood that the above-mentioned embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention, and it will be obvious to those skilled in the art that other variations and modifications can be made on the basis of the above description, and all embodiments cannot be exhaustive, and all obvious variations and modifications belonging to the technical scheme of the present invention are within the protection scope of the present invention.

Claims (10)

1. A load balancing system for a cluster of servers, comprising:
the system comprises a strategy adjustment service unit, a load balancing service unit and at least one service server, wherein each service server is provided with at least one service node;
the load balancing service unit is used for receiving an external flow request, distributing the external flow request according to the service weight of each service node, and updating the current service weight and/or the online state of at least one service node according to a strategy adjusting instruction sent by the strategy adjusting service unit;
the service node is used for processing an external flow request and acquiring server state data comprising the central processor utilization rate, the disk utilization rate, the central processor load and the current service weight of the service server according to preset time granularity;
the policy adjustment service unit is configured to receive server status data reported by each of the service nodes, read traffic data, and generate the policy adjustment instruction including a current service weight, an online instruction, and an offline instruction of each of the service nodes according to the server status data and the traffic data reported by each of the service nodes.
2. The system of claim 1,
the policy adjustment service unit comprises a cluster server state monitoring module, a flow log analysis module and an expansion module which are in communication connection with each other;
the cluster server state monitoring module monitors server state data of each business service node, counts the server state data and performs service early warning on abnormal business service nodes;
the flow log analysis module records flow data in a log dotting mode, monitors flow peak values and analyzes flow changes in different periods to obtain flow log analysis results;
and the capacity expansion module judges capacity expansion requirements according to the flow log analysis result, generates a node adjustment instruction, and starts a standby service node to reduce the load pressure of each service node.
3. The system of claim 2,
the policy adjustment module further comprises a health check module,
the health check module receives server state data of each business service node, sends a node offline instruction of a corresponding business service node to the strategy adjustment unit if the server state data is not received after overtime, receives a node adjustment instruction sent by the capacity expansion module and sends the node adjustment instruction to the load balancing service unit.
4. The system of claim 2,
the traffic data comprises total traffic information and distribution traffic information distributed to each of the service nodes; when the traffic log analysis module monitors and/or predicts that the total traffic exceeds a total traffic threshold, the traffic log analysis result indicates that capacity expansion service needs to be performed, and when the distribution traffic exceeds a distribution traffic threshold of the corresponding service node, the traffic log analysis result indicates that the current service weight of the corresponding service node is reduced.
5. The system of claim 2,
the cluster server state monitoring module establishes long connection with each business service node by using a socket communication protocol so as to receive server state data of each business service node.
6. The system of claim 1,
and the load balancing service unit distributes the flow to the service nodes according to an ip _ hash weighting strategy, and the service weight of each service node is determined according to the operation parameters and/or the performance parameters of the server to which the service node belongs.
7. The system of claim 6,
the ip _ hash takes the ip address of the user client as a hash key, so that the user request of the same ip is always on the same server to establish stable session control.
8. The system according to any one of claims 1 to 6,
and reserving at least one port for starting a standby service node by the service node.
9. A load balancing method for a server cluster, comprising:
receiving an external flow request, distributing the external flow request according to the service weight of each service node, updating the current service weight and/or the online state of at least one service node according to a strategy adjusting instruction sent by a strategy adjusting service unit, and firstly filtering illegal requests after receiving the external flow request;
the policy adjustment service unit receives server state data and flow data from the service nodes, performs policy adjustment according to the server state data and the flow data, and generates the policy adjustment instruction and the node adjustment instruction, where the node adjustment instruction is used to turn on or turn off a standby service node of each service node.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method as claimed in claim 9 when executing the program.
CN202110909283.1A 2021-08-09 2021-08-09 Load balancing system and method for server cluster Pending CN113742066A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110909283.1A CN113742066A (en) 2021-08-09 2021-08-09 Load balancing system and method for server cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110909283.1A CN113742066A (en) 2021-08-09 2021-08-09 Load balancing system and method for server cluster

Publications (1)

Publication Number Publication Date
CN113742066A true CN113742066A (en) 2021-12-03

Family

ID=78730394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110909283.1A Pending CN113742066A (en) 2021-08-09 2021-08-09 Load balancing system and method for server cluster

Country Status (1)

Country Link
CN (1) CN113742066A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039983A (en) * 2021-12-06 2022-02-11 神思电子技术股份有限公司 Server equalization method, equipment and medium for video call
CN114205361A (en) * 2021-12-08 2022-03-18 聚好看科技股份有限公司 Load balancing method and server
CN114615141A (en) * 2022-03-11 2022-06-10 贝壳找房网(北京)信息技术有限公司 Communication control method
CN114844893A (en) * 2022-04-26 2022-08-02 广州华多网络科技有限公司 Independent site distributed system, and independent site data management method and device
CN115225579A (en) * 2022-06-09 2022-10-21 深圳金融电子结算中心有限公司 Flow limiting method, system, application server and readable storage medium
CN117579959A (en) * 2023-10-31 2024-02-20 三峡智控科技有限公司 Sensor data distribution method and device based on chip
CN117955985A (en) * 2024-03-26 2024-04-30 佛山科学技术学院 Node pressure optimizing method based on parallel computing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027862A1 (en) * 2003-07-18 2005-02-03 Nguyen Tien Le System and methods of cooperatively load-balancing clustered servers
CN108667654A (en) * 2018-04-19 2018-10-16 北京奇艺世纪科技有限公司 The automatic expansion method of server cluster and relevant device
CN111131451A (en) * 2019-12-23 2020-05-08 武汉联影医疗科技有限公司 Service processing system and service processing method
CN112711479A (en) * 2019-10-25 2021-04-27 北京沃东天骏信息技术有限公司 Load balancing system, method and device of server cluster and storage medium
CN112866132A (en) * 2020-12-31 2021-05-28 网络通信与安全紫金山实验室 Dynamic load balancer and method for massive identification

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027862A1 (en) * 2003-07-18 2005-02-03 Nguyen Tien Le System and methods of cooperatively load-balancing clustered servers
CN108667654A (en) * 2018-04-19 2018-10-16 北京奇艺世纪科技有限公司 The automatic expansion method of server cluster and relevant device
CN112711479A (en) * 2019-10-25 2021-04-27 北京沃东天骏信息技术有限公司 Load balancing system, method and device of server cluster and storage medium
CN111131451A (en) * 2019-12-23 2020-05-08 武汉联影医疗科技有限公司 Service processing system and service processing method
CN112866132A (en) * 2020-12-31 2021-05-28 网络通信与安全紫金山实验室 Dynamic load balancer and method for massive identification

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039983A (en) * 2021-12-06 2022-02-11 神思电子技术股份有限公司 Server equalization method, equipment and medium for video call
CN114205361A (en) * 2021-12-08 2022-03-18 聚好看科技股份有限公司 Load balancing method and server
CN114205361B (en) * 2021-12-08 2023-10-27 聚好看科技股份有限公司 Load balancing method and server
CN114615141A (en) * 2022-03-11 2022-06-10 贝壳找房网(北京)信息技术有限公司 Communication control method
CN114844893A (en) * 2022-04-26 2022-08-02 广州华多网络科技有限公司 Independent site distributed system, and independent site data management method and device
CN115225579A (en) * 2022-06-09 2022-10-21 深圳金融电子结算中心有限公司 Flow limiting method, system, application server and readable storage medium
CN117579959A (en) * 2023-10-31 2024-02-20 三峡智控科技有限公司 Sensor data distribution method and device based on chip
CN117579959B (en) * 2023-10-31 2024-06-07 三峡智控科技有限公司 Sensor data distribution method and device based on chip
CN117955985A (en) * 2024-03-26 2024-04-30 佛山科学技术学院 Node pressure optimizing method based on parallel computing
CN117955985B (en) * 2024-03-26 2024-06-07 佛山科学技术学院 Node pressure optimizing method based on parallel computing

Similar Documents

Publication Publication Date Title
CN113742066A (en) Load balancing system and method for server cluster
US8191068B2 (en) Resource management system, resource information providing method and program
US20040267930A1 (en) Slow-dynamic load balancing method and system
CN105471671A (en) Method for customizing monitoring rules of cloud platform resources
US20130212257A1 (en) Computer program and monitoring apparatus
US8305911B2 (en) System and method for identifying and managing service disruptions using network and systems data
CN106027328A (en) Cluster monitoring method and system based on application container deployment
US6963828B1 (en) Metafarm sizer configuration optimization method for thin client sizing tool
CN111200526B (en) Monitoring system and method of network equipment
CN113704052B (en) Operation and maintenance system, method, equipment and medium of micro-service architecture
CN110677274A (en) Event-based cloud network service scheduling method and device
CN107426033B (en) Method and device for predicting state of access terminal of Internet of things
WO2011105001A1 (en) Throughput maintenance support system, device, method, and program
CN110727508A (en) Task scheduling system and scheduling method
CN111865817A (en) Load balancing control method, device and equipment for remote measuring collector and storage medium
CN114844809B (en) Multi-factor arbitration method and device based on network heartbeat and kernel disk heartbeat
CN112437145A (en) Server cluster management method and device and related components
CN101677278A (en) Method and system for monitoring availability of network information system
CN113326100A (en) Cluster management method, device and equipment and computer storage medium
CN117579651A (en) Internet of things system
CN112910743A (en) Block chain performance detection system
JP2001202318A (en) Data distribution system
CN116032932A (en) Cluster management method, system, equipment and medium for edge server
CN115379019A (en) Service scheduling method, device, equipment and storage medium
CN110213364B (en) Express cabinet monitoring method, system, storage medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination