CN109684081B - Distribution processing method for load balancing in cluster - Google Patents
Distribution processing method for load balancing in cluster Download PDFInfo
- Publication number
- CN109684081B CN109684081B CN201811509437.2A CN201811509437A CN109684081B CN 109684081 B CN109684081 B CN 109684081B CN 201811509437 A CN201811509437 A CN 201811509437A CN 109684081 B CN109684081 B CN 109684081B
- Authority
- CN
- China
- Prior art keywords
- request
- cluster
- service
- module
- load balancing
- 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title abstract description 6
- 238000000034 method Methods 0.000 claims description 14
- 230000004044 response Effects 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computer And Data Communications (AREA)
Abstract
A distribution processing method of load balancing in a cluster solves the problems that the connection of a client is insufficient to characterize the cluster establishment and load balancing under the condition of the workload of nodes in the cluster, the workload upper limit exists between the main application and the nodes in the cluster, and the network condition, the memory use and the CPU load of the nodes in the cluster cannot effectively characterize the running load of the current node.
Description
Technical Field
The invention relates to the technical field of computer networks, in particular to a distribution processing method for load balancing in a cluster.
Background
In the prior art, a main mode of providing cluster service by a plurality of devices is realized by using an external load balancing server or by establishing heartbeat connection by nodes in the cluster so as to keep communication among the nodes. In the prior art, the main application scenario provides services for short-connection communication, and the services are provided by software in the cluster nodes. Aiming at the use scene of providing encryption application to the outside of a cluster node, because the encryption and decryption service needs to keep the continuous use of key data and the performance of continuous use service, a long connection form is generally needed, and the connection request of a client is insufficient to provide enough load information of the cluster in the specific application scene so as to realize effective balance.
Disclosure of Invention
In order to solve the defects of the prior art, the invention provides a distribution processing method of load balancing in a cluster, which solves the problems that the connection of a client is insufficient to characterize the cluster establishment and load balancing under the condition of the workload of nodes in the cluster, the workload upper limit exists between the main application and the nodes of the cluster, and the network condition, the memory use and the CPU load of the nodes in the cluster cannot effectively characterize the running load of the current node.
The invention solves the technical proposal that the method for distributing and processing the load balance in the cluster comprises the following specific realization processes:
setting load balancing cluster, which is composed of computer server devices and connected to network, wherein the response of the cluster to the request is directly completed by the computer server, the cluster comprises a request receiving unit, a message analyzing unit and a service control unit,
the receiving request unit receives a request after the load balancing process is started;
the message analyzing unit analyzes the received request negatively, judges the type of the request and executes the corresponding branch;
the service control unit is responsible for providing a load balancing mechanism, integrally and jointly providing load balancing service for different equipment, and distributing requests to different load balancing equipment according to equipment states; the service control unit comprises an openalice request module, a heartbeat module, a total Session inquiry module, a total Device inquiry module and a starting password service module,
the workflow of the openalice request module is as follows: request-cluster inquiry-cluster detection-finding out the lowest load node-starting a password service request-returning the request;
the heartbeat module directly replies the request according to the protocol format after receiving the heartbeat inquiry request;
the total Session inquiry module inquires a Session use record table in a Redis database to obtain the total Session of which the current service port is opened;
the total Device inquiry module inquires a Device use record table in the Redis database to obtain the total Device number of the current service opening;
the starting password service module starts/multiplexes the password service after receiving the request; device number: if the Device of one server in the cluster with all service PORTs opened is not more than limit, one PORT is popped out from the Redis PORT pool table, the password service process is started, the parameters are the service PORT IP and the PORT obtained in the last part, and the message is replied according to the protocol after the completion; if the Device of opening all the service ports on one server in the cluster exceeds the limit, inquiring a Session use record table in the Redis database, and finding out the password service process with the least opened Session.
The beneficial effects of the invention are as follows: the distribution processing method for load balancing in the cluster achieves the beneficial effects that the cluster establishment and load balancing under the condition that the client connection is insufficient to represent the workload of the nodes in the cluster are achieved, the workload upper limit exists between the main application and the nodes in the cluster, and the network condition, the memory use and the CPU load of the nodes in the cluster cannot effectively represent the running load condition of the current node.
Drawings
Fig. 1 is a logical block diagram of the present invention.
The invention is further described below with reference to the accompanying drawings.
Detailed Description
The invention relates to a method for distributing and processing load balance in a cluster, which comprises the following steps:
setting load balancing cluster, which is composed of computer server devices and connected to network, wherein the response of the cluster to the request is directly completed by the computer server, the cluster comprises a request receiving unit, a message analyzing unit and a service control unit,
the receiving request unit receives a request after the load balancing process is started;
the message analyzing unit analyzes the received request negatively, judges the type of the request and executes the corresponding branch;
the service control unit is responsible for providing a load balancing mechanism, integrally and jointly providing load balancing service for different equipment, and distributing requests to different load balancing equipment according to equipment states; the service control unit comprises an openalice request module, a heartbeat module, a total Session inquiry module, a total Device inquiry module and a starting password service module,
the workflow of the openalice request module is as follows: request-cluster inquiry-cluster detection-finding out the lowest load node-starting a password service request-returning the request;
the heartbeat module directly replies the request according to the protocol format after receiving the heartbeat inquiry request;
the total Session inquiry module inquires a Session use record table in a Redis database to obtain the total Session of which the current service port is opened;
the total Device inquiry module inquires a Device use record table in the Redis database to obtain the total Device number of the current service opening;
the starting password service module starts/multiplexes the password service after receiving the request; device number: if the Device of one server in the cluster with all service PORTs opened is not more than limit, one PORT is popped out from the Redis PORT pool table, the password service process is started, the parameters are the service PORT IP and the PORT obtained in the last part, and the message is replied according to the protocol after the completion; if the Device of opening all the service ports on one server in the cluster exceeds the limit, inquiring a Session use record table in the Redis database, and finding out the password service process with the least opened Session.
The above-described embodiments are merely preferred embodiments of the present invention, which are provided to those skilled in the art to make and use the present invention, and various modifications and variations can be made to the above-described embodiments without departing from the spirit of the present invention, so that the scope of the present invention is not limited to the above-described embodiments, and any modifications or variations based on the spirit of the present invention are within the scope of the present invention.
Claims (1)
1. The method for distributing and processing load balance in a cluster comprises the following specific implementation processes:
setting load balancing cluster, which is composed of computer server devices and connected to network, wherein the response of the cluster to the request is directly completed by the computer server, the cluster comprises a request receiving unit, a message analyzing unit and a service control unit,
the receiving request unit receives a request after the load balancing process is started;
the message analyzing unit is in charge of analyzing the received request, judging the type of the request and executing a corresponding branch;
the service control unit is responsible for providing a load balancing mechanism, integrally and jointly providing load balancing service for different equipment, and distributing requests to different load balancing equipment according to equipment states; the service control unit comprises an openalice request module, a heartbeat module, a total Session inquiry module, a total Device inquiry module and a starting password service module,
the workflow of the openalice request module is as follows: request-cluster inquiry-cluster detection-finding out the lowest load node-starting a password service request-returning the request;
the heartbeat module directly replies the request according to the protocol format after receiving the heartbeat inquiry request;
the total Session inquiry module inquires a Session use record table in a Redis database to obtain the total Session of which the current service port is opened;
the total Device inquiry module inquires a Device use record table in the Redis database to obtain the total Device number of the current service opening;
the starting password service module starts/multiplexes the password service after receiving the request; device number: if the Device of one server in the cluster with all service PORTs opened is not more than limit, one PORT is popped out from the Redis PORT pool table, the password service process is started, the parameters are the service PORT IP and the PORT obtained in the last part, and the message is replied according to the protocol after the completion; if the Device of all the service ports on one server in the cluster is more than the limit, the Session use record table in the Redis database is queried, and the password service process 2 with the least opened Session is found.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811509437.2A CN109684081B (en) | 2018-12-11 | 2018-12-11 | Distribution processing method for load balancing in cluster |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811509437.2A CN109684081B (en) | 2018-12-11 | 2018-12-11 | Distribution processing method for load balancing in cluster |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109684081A CN109684081A (en) | 2019-04-26 |
CN109684081B true CN109684081B (en) | 2023-11-07 |
Family
ID=66187193
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811509437.2A Active CN109684081B (en) | 2018-12-11 | 2018-12-11 | Distribution processing method for load balancing in cluster |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109684081B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110995725B (en) * | 2019-12-11 | 2021-12-07 | 北京明略软件系统有限公司 | Data processing method and device, electronic equipment and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20120063662A (en) * | 2010-12-08 | 2012-06-18 | 텔코웨어 주식회사 | Load balancer and method for managing load balancing using this |
CN103475566A (en) * | 2013-07-10 | 2013-12-25 | 北京发发时代信息技术有限公司 | Real-time message exchange platform and distributed cluster establishment method |
CN107040589A (en) * | 2017-03-15 | 2017-08-11 | 西安电子科技大学 | The system and method for cryptographic service is provided by virtualizing encryption device cluster |
CN108063813A (en) * | 2017-12-15 | 2018-05-22 | 华中农业大学 | The method and system of cryptographic service network parallelization under a kind of cluster environment |
CN108768878A (en) * | 2018-06-06 | 2018-11-06 | 北京奇艺世纪科技有限公司 | A kind of SiteServer LBS, method, apparatus and load-balancing device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9444884B2 (en) * | 2011-12-31 | 2016-09-13 | Level 3 Communications, Llc | Load-aware load-balancing cluster without a central load balancer |
-
2018
- 2018-12-11 CN CN201811509437.2A patent/CN109684081B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20120063662A (en) * | 2010-12-08 | 2012-06-18 | 텔코웨어 주식회사 | Load balancer and method for managing load balancing using this |
CN103475566A (en) * | 2013-07-10 | 2013-12-25 | 北京发发时代信息技术有限公司 | Real-time message exchange platform and distributed cluster establishment method |
CN107040589A (en) * | 2017-03-15 | 2017-08-11 | 西安电子科技大学 | The system and method for cryptographic service is provided by virtualizing encryption device cluster |
CN108063813A (en) * | 2017-12-15 | 2018-05-22 | 华中农业大学 | The method and system of cryptographic service network parallelization under a kind of cluster environment |
CN108768878A (en) * | 2018-06-06 | 2018-11-06 | 北京奇艺世纪科技有限公司 | A kind of SiteServer LBS, method, apparatus and load-balancing device |
Non-Patent Citations (1)
Title |
---|
"云计算环境下资源负载均衡调度优化仿真";李春晖;《计算机仿真》;第第34卷卷(第第12期期);第420-425页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109684081A (en) | 2019-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018157439A1 (en) | Service processing method and device | |
WO2023000935A1 (en) | Data processing method, network element device, and readable storage medium | |
EP1558001A1 (en) | Method and apparatus for operating an open network having a proxy | |
CN106790420B (en) | A kind of more session channel method for building up and system | |
CN109933431B (en) | Intelligent client load balancing method and system | |
US12034766B2 (en) | Method and system for providing edge service, and computing device | |
WO2019237594A1 (en) | Session persistence method and apparatus, and computer device and storage medium | |
WO2004036344A2 (en) | System and method for the optimization of database | |
CN101459836B (en) | Service processing method and system for content distributing network of interactive network television | |
US7844708B2 (en) | Method and apparatus for load sharing and data distribution in servers | |
CN109831524A (en) | A kind of load balance process method and device | |
WO2016180188A1 (en) | Distributed link establishment method, apparatus and system | |
CN111541765B (en) | Method and system for multi-level routing scheduling | |
Park et al. | Smart base station-assisted partial-flow device-to-device offloading system for video streaming services | |
WO2023151264A1 (en) | Load balancing method and apparatus, node, and storage medium | |
WO2023000940A1 (en) | Data processing method and apparatus, and network element device, storage medium and program product | |
CN112968965A (en) | Metadata service method, server and storage medium for NFV network node | |
CN114666423A (en) | TCP stream adjusting method and system | |
CN110868323B (en) | Bandwidth control method, device, equipment and medium | |
CN115664989A (en) | Monitoring system and method of cloud desktop | |
CN109684081B (en) | Distribution processing method for load balancing in cluster | |
US20190036793A1 (en) | Network service implementation method, service controller, and communications system | |
CN101175038B (en) | Data stream information transmission method, communication system and equipment | |
CN109189542A (en) | A kind of remote desktop access method for O&M auditing system | |
CN113177179A (en) | Data request connection management method, device, equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |