CN102984184A - A method and a device for service load balancing for a distributed system - Google Patents

A method and a device for service load balancing for a distributed system Download PDF

Info

Publication number
CN102984184A
CN102984184A CN 201110259333 CN201110259333A CN102984184A CN 102984184 A CN102984184 A CN 102984184A CN 201110259333 CN201110259333 CN 201110259333 CN 201110259333 A CN201110259333 A CN 201110259333A CN 102984184 A CN102984184 A CN 102984184A
Authority
CN
China
Prior art keywords
service
network interface
main
load
server
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.)
Granted
Application number
CN 201110259333
Other languages
Chinese (zh)
Other versions
CN102984184B (en
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.)
Shanghai Left Bank Investment Management Co ltd
Shanghai Kelu Software Co Ltd
Original Assignee
Shanghai Kelu Software 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 Shanghai Kelu Software Co Ltd filed Critical Shanghai Kelu Software Co Ltd
Priority to CN201110259333.2A priority Critical patent/CN102984184B/en
Publication of CN102984184A publication Critical patent/CN102984184A/en
Application granted granted Critical
Publication of CN102984184B publication Critical patent/CN102984184B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention discloses a method and a device for service load balancing for a distributed system. Relative to the prior art in which load balancing is performed only according to the network port traffic, based on the method and the device of the present invention, after service load condition and load condition of the server where the service located, and traffic of each network port corresponding to the service are comprehensively considered, how busy the service is decided on, and the suitability of continued use of the service is determined, and master/slave service switch is performed according to the determining result. One-sidedness resulted from determining the availability of a service or a server only based on the traffic can be effectively prevented, the busy and applicability extent of a service can be more accurately determined, and the probability of occurrence of system overload can be effectively controlled. Also, according to the present invention, only master/alternate service switch is performed to all overloaded master services and alternate services instead of performing switch to the entire server, so more efficient use of hardware resources can be ensured, and better flexible deployment of various services on the server is achieved.

Description

A kind of service load balancing method of distributed system and device
Technical field
The present invention relates to a kind of load-balancing technique, relate in particular to the service load balancing technology under a kind of distributed environment.
Background technology
Further extension and development along with industrial control system need to provide more powerful disposal ability, in order to can process more in time the user's visit capacity that grows with each passing day and process request.Generally by being set, come a series of servers that the same services content is provided the processing request of customer in response end to form server cluster.After the processing request of receiving from client, need to carry out load balancing and calculate to determine that should ask specifically mail to which station server processes.
Distributed system provides a rich in natural resources set to the user, thereby used day by day widely and be subject to people's attention, in the prior art, generally the network interface flow according to each computer in the cluster or server carries out load balancing calculating, judges the load state of each computer or server.Yet along with deeply carrying out of research, the present inventor finds, only uses the network interface flow to carry out load balancing and calculates, and at some constantly, the load of some services is very heavy and the load other service is very light in the distributed system.And then the present inventor's size of finding flow has very large one-sidedness for the embodiment of the load of server or computer, although the information on services that has is few alternately, and calculation of complex.In view of there being individual performance difference between each station server, and service the difference in expensive source, only relying on the network interface flow to carry out load balancing calculates, can't realize real adaptive load balancing service deployment mechanism, can not efficiently utilize all hardware resource, effectively the probability of happening of control system overload.
And, prior art generally all is based on server and carries out load balancing, namely in the load balancing process, server integral body is carried out active and standby switching, yet in the practical application, at synchronization, the running load of each service is not identical on the server, switches if carry out integral body based on server, then all normal or extra-heavy services on this server all can be switched on another server, cause easily the busy of another station server.And only enable in the active/standby server one at synchronization, do not take full advantage of existing hardware resource.
In order to address the above problem, in distributed system, a kind of new service load balancing method arises at the historic moment thus.
Summary of the invention
The technical problem that the present invention mainly solves provides a kind of service load balancing method and device of distributed system, make it possible to more reasonable, judge the busy extent of Services in Distributed System exactly, the probability of happening of effective control system overload, and can more effectively utilize all hardware resource in the distributed system, realize the flexible deployment between each service on the server.
In order to solve the problems of the technologies described above, the invention provides a kind of service load balancing method of distributed system, each service distribution is in each server of different industrial networks in the system, and a service distribution provides same services by a plurality of servers on a plurality of servers, carry out Backup service, one of them service is main service, and all the other are backup services, and each serves corresponding a plurality of network interface, carry out network backup, the method includes the steps of:
Preservation is respectively served the corresponding relation between the resource object that uses with service and is respectively served corresponding network interface; Load in main service exceeds default thresholding, or the load of main service place server exceeds default thresholding, or in each network interface corresponding to main service at least n network interface flow be lower than minimum normal value, or main the service when m network interface flow exceeds the maximum limit value at least in each corresponding network interface, this master's service is carried out active and standby switching with service for subsequent use, wherein, m, n are more than or equal to 1, less than or equal to all network interface quantity corresponding to this service;
When the service request of receiving from client, according to service name and the resource object title in the request, find the main service of current correspondence, each network interface flow corresponding to this master's service selected, therefrom select a plurality of idle network interfaces, the access address that idle network interface is corresponding returns to client; Client is obtained the service of asking from access address.
As improvement of the technical scheme, this service load can comprise: the number of threads of service; This server load can comprise: cpu load and/or memory usage.
As improvement of the technical scheme, this master service and service for subsequent use are carried out can also comprising following steps: the information on load of information on load of each main service of timing acquisition, this master service place server and each network interface flow that this master serves correspondence before the step of active and standby switching.
As improvement of the technical scheme, according to service name and the resource object title in the request, find the main service of current correspondence, before the step that each network interface flow of this master service correspondence is selected, can also further comprise following steps:
Each service in the system is registered the corresponding relation between the resource object that the service of preserving and this service are used, the corresponding relation between the corresponding relation between service and network interface, service and place server, main information on services in respectively serving;
According to service name and the resource object title in the request, find the main service of current correspondence, in the step that each network interface flow corresponding to this master service selected, find current main service of asking and should master serve the network interface of correspondence according to the corresponding relation of registration.
As improvement of the technical scheme, this master service and service for subsequent use are carried out comprising following steps: upgrade the main information on services after switching in log-on message after the step of active and standby switching.
As improvement of the technical scheme, each network interface flow corresponding to this master's service selected, therefrom select in the step of a plurality of idle network interfaces, select a primary idle network interface and an idle network interface for subsequent use;
The access address that this network interface is corresponding returns in the step of client, and the access address that returns comprises at least: the IP address of Service name, primary network interface IP address+port numbers, network interface for subsequent use.
The present invention also provides a kind of service load balancing device of distributed system, each service distribution is in each server of different industrial networks in the system, a service distribution is on a plurality of servers, provide same services by a plurality of servers, carry out Backup service, one of them service is main service, all the other are backup services, each serves corresponding a plurality of network interface, carries out network backup, and this device comprises:
Memory module is used for preservation and respectively serves the corresponding relation between the resource object that uses with service and respectively serve corresponding network interface; Active and standby handover module is used for carrying out active and standby switching between main service and service for subsequent use; Monitoring module, be used for exceeding default thresholding at the load of main service, or the load of main service place server exceeds default thresholding, or in each network interface corresponding to main service at least n network interface flow be lower than minimum normal value, or main the service when m network interface flow exceeds the maximum limit value at least in each corresponding network interface, indicate active and standby handover module that this master's service is carried out active and standby switching with service for subsequent use, wherein, m, n are more than or equal to 1, less than or equal to all network interface quantity corresponding to this service; Network interface is selected module, is used for according to service name and the resource object title in the request, finding the main service of current correspondence when the service request of receiving from client, and each network interface flow of this master service correspondence is selected, and therefrom selects a plurality of idle network interfaces; Entrance returns module, is used for access address corresponding to idle network interface that network interface selects module to select returned to client, and the indication client is obtained the service of asking from access address.
As improvement of the technical scheme, the service load can comprise: the number of threads of service; And server load can comprise: cpu load and/or memory usage.
As improvement of the technical scheme, this device can also comprise: the acquisition of information module is used for the information on load of each main information on load of serving of timing acquisition, this main service place server and should mainly serves each corresponding network interface flow.
As improvement of the technical scheme, this device can also further comprise: Registering modules, for respectively being served, system registers, and will serve and resource object that this service is used between corresponding relation, corresponding relation between service and network interface, corresponding relation between service and the place server, main information on services is stored in the described memory module in each service;
Network interface selects module to find main service corresponding to current institute request service and network interface corresponding to this master service according to the corresponding relation of preserving in the memory module.
As improvement of the technical scheme, Registering modules also is used for upgrade the main information on services after switching, and the main information on services after will upgrading being kept in the memory module after active and standby handover module carries out active and standby switching.
As improvement of the technical scheme, network interface selects further to comprise in the module following submodule:
Select the submodule of a primary idle network interface;
Select the submodule of an idle network interface for subsequent use;
Entrance returns the access address that module returns and can comprise: the IP address of Service name, primary network interface IP address+port numbers, network interface for subsequent use.
Embodiment of the present invention compared with prior art, the main distinction and effect thereof are: in distributed system, with each service distribution in each server of different industrial networks, a service distribution provides same services by a plurality of servers on a plurality of servers, carry out Backup service, one of them service is main service, all the other are backup services, and each serves corresponding a plurality of network interface, are used for carrying out network backup.And the load of serving as the master exceeds default thresholding, or the load of main service place server exceeds default thresholding, or the flow of each network interface of main service correspondence is lower than minimum normal value, or the flow of each network interface corresponding to main service carries out active and standby switching to this master service and service for subsequent use when exceeding the maximum limit value.When the service request of receiving from client, according to service name and the resource object title in the request, find the main service of current correspondence, each network interface flow corresponding to this master's service selected, therefrom select a plurality of idle network interfaces, the access address that idle network interface is corresponding returns to client, and client is obtained the service of asking from access address.Only carry out load balancing according to the network interface flow with respect to prior art, embodiment of the present invention has been considered the load condition of serving synthetically, behind the load condition of this service place server and each network interface flow of this service correspondence, just determine the busy extent of this service, judge whether to be fit to continue to use this service, and carry out the switching of principal and subordinate service according to judged result, thereby can effectively avoid because only depending on uninterrupted to determine the one-sidedness that the availability of service or server causes, prevent partial information mutual less but the erroneous judgement of the service of calculation of complex, and can judge more exactly the busy of service, how appropriate, the effectively probability of happening of control system overload.And, prior art is generally carried out load balancing based on server, namely in the load balancing process, server integral body is carried out active and standby switching, yet in the practical application, at synchronization, the running load of each service is not identical on the server, if carrying out integral body based on server switches, then all normal or extra-heavy services on this server all can be switched on another server, cause easily the busy of another station server, and, only enable in the active/standby server one at synchronization, do not take full advantage of existing hardware resource.And in embodiment of the present invention, only all extra-heavy main services on the server are carried out active and standby switching with service for subsequent use, thus can guarantee more effectively to utilize all hardware resource, and can dispose flexibly each service on the server better.
Description of drawings
Below in conjunction with the drawings and specific embodiments the present invention is described in further detail.
Fig. 1 is the judgement switching flow figure of the active and standby service in the service load balancing method of distributed system of first embodiment of the invention;
Fig. 2 is the selection flow chart of service network interface in the service load balancing method of distributed system of first embodiment of the invention;
Fig. 3 is the service load balancing structure drawing of device of the distributed system of second embodiment of the invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing embodiments of the present invention are described in further detail.
First embodiment of the invention relates to a kind of service load balancing method of distributed system, in distributed system, each service distribution is in each server of different industrial networks, a service distribution provides same services by a plurality of servers on a plurality of servers, carry out Backup service, one of them service is main service, all the other are backup services, and each serves corresponding a plurality of network interface, are used for carrying out network backup.
Each service need to be registered in the distributed system, when carrying out service registry, corresponding relation between the resource object of the service of need preserving and this service use, corresponding relation between service and network interface, corresponding relation between service and the place server, and main information on services in each service, all can be kept in the registration table.The preservation of main information on services can have various forms, is main service as come top service in this corresponding relation.
The service load balancing method of concrete distributed system comprises that active and standby service is judged and switches and the service network interface is selected two parts, the wherein judgement of active and standby service and switching flow, as shown in Figure 1.
In step 101, the information on load of each main service of timing acquisition, this master serve the information on load of place server and are somebody's turn to do each network interface flow of main service correspondence.
Wherein, the mode of each information of timing acquisition master service can have multiple, as: can be by each main service active reporting; Also can initiatively be asked for to each main service by the server that carries out load balancing; Perhaps, a service operation platform (be used for management service) can also be set, regularly collect the service operation state, and regularly report.These several final effects that report mode all not affect present embodiment.
The load of main service can comprise: the information such as the number of threads of service.Specifically, the service load balancing device can be determined load according to the number of threads that this service reports.For example, real-time data base can be determined load according to subscription.And server load can comprise: the information such as cpu load, memory usage.For example, each main service just reported the information such as the cpu load of this service place server and memory usage every ten minutes.
The information that the service load balancing device reports according to each main service is monitored load and each network interface flow corresponding to main service of load of each main service, main service place server in real time, such as step 102 to shown in the step 105.
In step 102, judge whether the load of main service exceeds default thresholding.If the load of main service exceeds default thresholding, then enter step 106; If the load of main service does not exceed default thresholding, then enter step 103.The load of main service exceeds default thresholding and can comprise: the number of threads of main service exceeds default thresholding etc.
In step 103, judge whether the load of main service place server exceeds default thresholding.If the load of main service place server exceeds default thresholding, then enter step 106; If the load of main service place server does not exceed default thresholding, then enter step 104.
Specifically, server load can comprise: cpu load and memory usage.And the load of the server at main service place exceeds default thresholding and also can comprise multiple situation, exceeds default thresholding such as the cpu load of main service place server; The memory usage of main service place server exceeds default thresholding etc.Wherein, when server satisfies above-mentioned arbitrary situation, the load that all is identified as this server exceeds default thresholding.
Whether in step 104, judging has at least in each network interface corresponding to this master service that n network interface flow is lower than minimum normal value, and namely whether network is obstructed.If have above n(in each network interface corresponding to this master service and contain n) individual network interface flow is lower than minimum normal value, and then the decision network fault enters step 106; If the network interface quantity that flow is lower than minimum normal value in each network interface corresponding to this master service is less than n, then decision network is normal, enters in the step 105.Wherein n can be according to the actual conditions setting, and n is more than or equal to 1, less than or equal to all network interface quantity corresponding to this service.Suppose that n is 1, as long as then have a network interface flow to be lower than minimum normal value in each network interface of main service correspondence, namely think to enter step 106 by its network failure; Otherwise think that network is normal, enters step 105.
Whether in step 105, judging has at least in each network interface corresponding to this master service that m network interface flow exceeds the maximum limit value, and namely whether network is excessively busy.If have above m(and contain m) individual network interface flow exceeds the maximum limit value, illustrates that then network is excessively busy, is not suitable for increasing new service again, enters step 106; Be less than m if exceed the network interface quantity of maximum limit value in each network interface, think that then network is normal, return step 101, again in real time the information on load of each main service, information on load and each network interface flow corresponding to this master service of this master's service place server are carried out circularly monitoring.Wherein m can be according to the actual conditions setting, and m is more than or equal to 1, less than or equal to all network interface quantity corresponding to this service.Suppose that m is 3, then have in each network interface corresponding to main service (to contain 3) more than 3 the network interface flow exceeds the maximum limit value, think that just this server network is excessively busy, enter step 106; Otherwise think that network is normal, returns step 101.
In step 106, this master's service is carried out active and standby service with service for subsequent use switch.After active and standby switching is carried out in service, in log-on message, upgrade the main information on services after switching.Then return step 101, real-time information on load, this master that each master is served serves the information on load of place server and is somebody's turn to do each network interface flow continuation circularly monitoring that the master serves correspondence again.
As seen, by above-mentioned flow process, when the server at some services or its place in the system goes wrong, service load balancing equipment can automatically detect and respective service is switched to service for subsequent use, stop service request being distributed to the service of this fault, and continue to provide this service by other services working properly.
Only carry out load balancing according to the network interface flow with respect to prior art, present embodiment has been considered the load condition of serving synthetically, behind the load condition of this service place server and each network interface flow of this service correspondence, just determine the busy extent of this service, judge whether to be fit to continue to use this service, and carry out the switching of principal and subordinate's service according to judged result.Thereby can effectively avoid because only depending on uninterrupted to determine the one-sidedness that the availability of service causes, prevent partial information mutual less but the erroneous judgement of the service of calculation of complex, and can judge more exactly busy, the how appropriate of service, effectively the probability of happening of control system overload.And prior art is generally carried out load balancing based on server, namely in the load balancing process, server integral body is carried out active and standby switching, and present embodiment is carried out active and standby switching based on service, only all overburdens on the server (are comprised the service overburden, the server overburden, excessive or the suspension of network interface flow that service is corresponding) main service is carried out active and standby switching with service for subsequent use, the former server that front place is switched in service still can provide other not extra-heavy services, thereby can guarantee more effectively to utilize all hardware resource, realize the flexible deployment to each service on the server.
The below describes the selection of service network interface in the service load balancing:
When the service request of receiving from client, according to service name and the resource object title in the request, find the main service of current correspondence, each network interface flow corresponding to this master's service selected, therefrom select idle network interface, the access address that idle network interface is corresponding returns to client, and client is obtained the service of asking from this access address.The selection flow process of service network interface in the service load balancing method of concrete distributed system, as shown in Figure 2.
In step 201, receive the service request from client.
In step 202, according to the service name in this service request and resource object title, and the corresponding relation of preserving in the registration table, find main service corresponding to requested service and each network interface corresponding to this master service.
In step 203, each network interface flow corresponding to this master's service judged, and therefrom selected idle network interface.
Specifically, can set in advance a threshold value, when a network interface flow was lower than this threshold value, this network interface namely was identified as idle network interface.Determine a plurality of idle network interfaces according to this threshold value, and therefrom select a primary idle network interface and an idle network interface for subsequent use.
In step 204, the access address that this network interface is corresponding returns to client.Wherein, the access address that returns can comprise: the IP address of Service name, primary network interface IP address+port numbers, network interface for subsequent use etc.Afterwards, client can be obtained the service of asking from this access address.
Second embodiment of the invention relates to a kind of service load balancing device of distributed system, as shown in Figure 3, each service distribution is in each server of different industrial networks in the system, and a service distribution provides same services by a plurality of servers on a plurality of servers, carry out Backup service, one of them service is main service, and all the other are backup services, and each serves corresponding a plurality of network interface, carry out network backup, this device comprises:
Memory module is used for preservation and respectively serves the corresponding relation between the resource object that uses with service and respectively serve corresponding network interface; Active and standby handover module is used for carrying out active and standby switching between main service and service for subsequent use; Monitoring module, be used for exceeding default thresholding at the load of main service, or the load of main service place server exceeds default thresholding, or in each network interface corresponding to main service at least n network interface flow be lower than minimum normal value, or main the service when m network interface flow exceeds the maximum limit value at least in each corresponding network interface, this master's service is carried out active and standby switching with service for subsequent use, wherein, m, n are more than or equal to 1, less than or equal to all network interface quantity corresponding to this service; Network interface is selected module, is used for according to service name and the resource object title in the request, finding the main service of current correspondence when the service request of receiving from client, and each network interface flow of this master service correspondence is selected, and therefrom selects a plurality of idle network interfaces; Entrance returns module, is used for access address corresponding to idle network interface that network interface selects module to select returned to client, and the indication client is obtained the service of asking from access address.
As further improvement, the service load can comprise: the number of threads of service; And server load can comprise: cpu load and/or memory usage.
As further improvement, this device can also comprise: the acquisition of information module is used for the information on load of each main information on load of serving of timing acquisition, this main service place server and should mainly serves each corresponding network interface flow.Registering modules, be used for to system each service and register, and will serve corresponding relation between the resource object with this service use, serve and network interface between corresponding relation, corresponding relation between service and the place server, main information on services is stored in the memory module in each service; Network interface selects module to find main service corresponding to current institute request service and network interface corresponding to this master service according to the corresponding relation of preserving in the memory module.
As further improvement, Registering modules also is used for upgrade the main information on services after switching, and the main information on services after will upgrading being kept in the memory module after active and standby handover module carries out active and standby switching.
As further improvement, network interface is selected can further comprise following submodule in the module: the submodule of selecting a primary idle network interface; Select the submodule of an idle network interface for subsequent use; Wherein, entrance returns the access address that module returns and comprises: the IP address of Service name, primary network interface IP address+port numbers, network interface for subsequent use.
In sum, in the present embodiment, when main load of serving exceeds default thresholding, or the load of main service place server exceeds default thresholding, or the flow of each network interface of main service correspondence is lower than minimum normal value, or the flow of each network interface corresponding to main service then carries out active and standby switching to this master service and service for subsequent use when exceeding the maximum limit value.When the service request of receiving from client, according to service name and the resource object title in the request, find the main service of current correspondence, each network interface flow corresponding to this master's service selected, therefrom select a plurality of idle network interfaces, the access address that idle network interface is corresponding returns to client, and client is obtained the service of asking from access address.Only carry out load balancing according to the network interface flow with respect to prior art, present embodiment has been considered the load condition of serving synthetically, behind the load condition of this service place server and each network interface flow of this service correspondence, just determine the busy extent of this service, judge whether to be fit to continue to use this service, and carry out the switching of principal and subordinate service according to judged result, thereby can effectively avoid because only depending on uninterrupted to determine the one-sidedness that the availability of service or server causes, prevent partial information mutual less but the erroneous judgement of the service of calculation of complex, and can judge more exactly the busy of service, how appropriate, the effectively probability of happening of control system overload.And, prior art is generally carried out load balancing based on server, namely in the load balancing process, server integral body is carried out active and standby switching, yet in the practical application, at synchronization, the running load of each service is not identical on the server, if carrying out integral body based on server switches, then all normal or extra-heavy services on this server all can be switched on another server, cause easily the busy of another station server, and, only enable wherein one of active/standby server at synchronization, do not take full advantage of existing hardware resource.And in the present embodiment, only all extra-heavy main services on the server are carried out active and standby switching with service for subsequent use, thus can guarantee more effectively to utilize all hardware resource, realize the flexible deployment to each service on the server.
Although pass through with reference to some of the preferred embodiment of the invention, the present invention is illustrated and describes, but those of ordinary skill in the art should be understood that and can do various changes to it in the form and details, and without departing from the spirit and scope of the present invention.

Claims (12)

1. the service load balancing method of a distributed system, it is characterized in that, each service distribution is in each server of different industrial networks in the system, and a service is distributed on two servers at least, provides same services by described at least two servers, carry out Backup service, one of them service is main service, and all the other are backup services, at least two network interfaces of each service correspondence, carry out network backup, the method includes the steps of:
Preservation is respectively served the corresponding relation between the resource object that uses with service and is respectively served corresponding network interface;
Load in described main service exceeds default thresholding, or the load of described main service place server exceeds default thresholding, or in each network interface corresponding to described main service at least n network interface flow be lower than minimum normal value, or described main the service when m network interface flow exceeds the maximum limit value at least in each corresponding network interface, this master's service is carried out active and standby switching with service for subsequent use, wherein, m, n are more than or equal to 1, less than or equal to all network interface quantity corresponding to this service;
When the service request of receiving from client, according to service name and the resource object title in the request, find the main service of current correspondence, each network interface flow corresponding to this master's service selected, therefrom select at least one idle network interface, access address corresponding to described idle network interface returned to described client;
Described client is obtained the service of asking from described access address.
2. the service load balancing method of distributed system according to claim 1 is characterized in that, described service load comprises at least: the number of threads of described service;
It is one of following that described server load comprises at least: cpu load and/or memory usage.
3. the service load balancing method of distributed system according to claim 2 is characterized in that, described this master service and service for subsequent use is carried out also comprising following steps before the step of active and standby switching:
The information on load of each main service of timing acquisition, this master serve the information on load of place server and are somebody's turn to do each network interface flow of main service correspondence.
4. the service load balancing method of distributed system according to claim 2, it is characterized in that, described according to service name and resource object title in the request, find the main service of current correspondence, before the step that each network interface flow corresponding to this master service selected, also comprise following steps:
Each service in the described system is registered the corresponding relation between the resource object that the service of preserving and this service are used, the corresponding relation between the corresponding relation between service and network interface, service and place server, main information on services in respectively serving;
Described according to service name and resource object title in the request, find the main service of current correspondence, in the step that each network interface flow corresponding to this master service selected, find current main service of asking and should master serve the network interface of correspondence according to the corresponding relation of described registration.
5. the service load balancing method of distributed system according to claim 4 is characterized in that, described this master service and service for subsequent use is carried out comprising following steps after the step of active and standby switching:
In log-on message, upgrade the main information on services after switching.
6. the service load balancing method of distributed system according to claim 2, it is characterized in that, described each network interface flow to this master's service correspondence is selected, and therefrom selects in the step of at least one idle network interface, selects a primary idle network interface and an idle network interface for subsequent use;
The described access address that this network interface is corresponding returns in the step of described client, and the access address that returns comprises at least: the IP address of Service name, primary network interface IP address+port numbers, network interface for subsequent use.
7. the service load balancing device of a distributed system, it is characterized in that, each service distribution is in each server of different industrial networks in the system, and a service is distributed on two servers at least, provides same services by described at least two servers, carry out Backup service, one of them service is main service, and all the other are backup services, at least two network interfaces of each service correspondence, carry out network backup, this device comprises:
Memory module is used for preservation and respectively serves the corresponding relation between the resource object that uses with service and respectively serve corresponding network interface;
Active and standby handover module is used for carrying out active and standby switching between main service and service for subsequent use;
Monitoring module, be used for exceeding default thresholding at the load of described main service, or the load of described main service place server exceeds default thresholding, or in each network interface corresponding to described main service at least n network interface flow be lower than minimum normal value, or described main the service when m network interface flow exceeds the maximum limit value at least in each corresponding network interface, indicate described active and standby handover module that this master's service is carried out active and standby switching with service for subsequent use, wherein, m, n are more than or equal to 1, less than or equal to all network interface quantity corresponding to this service;
Network interface is selected module, be used for when the service request of receiving from client, according to service name and the resource object title in the request, finding the main service of current correspondence, each network interface flow corresponding to this master's service selected, therefrom selected at least one idle network interface;
Entrance returns module, is used for access address corresponding to idle network interface that described network interface selects module to select returned to described client, indicates described client to obtain the service of asking from described access address.
8. the service load balancing device of distributed system according to claim 7 is characterized in that, described service load comprises at least: the number of threads of described service;
It is one of following that described server load comprises at least: cpu load and/or memory usage.
9. the service load balancing device of distributed system according to claim 8 is characterized in that, this device also comprises:
The acquisition of information module is used for the information on load of each main information on load of serving of timing acquisition, this main service place server and should mainly serves each corresponding network interface flow.
10. the service load balancing device of distributed system according to claim 8 is characterized in that, this device also comprises:
Registering modules, be used for to described system each service and register, and will serve corresponding relation between the resource object with this service use, serve and network interface between corresponding relation, corresponding relation between service and the place server, main information on services is stored in the described memory module in each service;
Described network interface selects module to find main service corresponding to current institute request service and network interface corresponding to this master service according to the corresponding relation of preserving in the described memory module.
11. the service load balancing device of distributed system according to claim 10, it is characterized in that, described Registering modules also is used for after described active and standby handover module carries out active and standby switching, upgrade the main information on services after switching, and the main information on services after will upgrading is kept in the described memory module.
12. the service load balancing device of the distributed system according to claim 8 is characterized in that, described network interface selects further to comprise in the module following submodule:
Select the submodule of a primary idle network interface;
Select the submodule of an idle network interface for subsequent use;
Described entrance returns the access address that module returns and comprises at least: the IP address of Service name, primary network interface IP address+port numbers, network interface for subsequent use.
CN201110259333.2A 2011-09-05 2011-09-05 The service load balancing method and device of a kind of distributed system Active CN102984184B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110259333.2A CN102984184B (en) 2011-09-05 2011-09-05 The service load balancing method and device of a kind of distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110259333.2A CN102984184B (en) 2011-09-05 2011-09-05 The service load balancing method and device of a kind of distributed system

Publications (2)

Publication Number Publication Date
CN102984184A true CN102984184A (en) 2013-03-20
CN102984184B CN102984184B (en) 2017-09-19

Family

ID=47857926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110259333.2A Active CN102984184B (en) 2011-09-05 2011-09-05 The service load balancing method and device of a kind of distributed system

Country Status (1)

Country Link
CN (1) CN102984184B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581048A (en) * 2013-11-08 2014-02-12 国家电网公司 Method for having control over overload of distributed resources of electric power communication network
CN104023088A (en) * 2014-06-28 2014-09-03 山东大学 Storage server selection method applied to distributed file system
CN105376317A (en) * 2015-11-19 2016-03-02 网宿科技股份有限公司 Load balancing control method and load balancing control device
WO2016101751A1 (en) * 2014-12-27 2016-06-30 北京奇虎科技有限公司 Master and slave balancing method and device in distributed storage system
CN108307206A (en) * 2017-12-25 2018-07-20 北京奇艺世纪科技有限公司 A kind of distribution method and device of live streaming encoding tasks
CN108848479A (en) * 2018-07-19 2018-11-20 北京车联天下信息技术有限公司 Car networking service load balancing method, device and equipment
CN110855465A (en) * 2018-08-21 2020-02-28 华为技术有限公司 Message processing method and device
CN111158915A (en) * 2019-12-31 2020-05-15 厦门快商通科技股份有限公司 Master-slave relationship switching method, slave server, master server and system
CN114338688A (en) * 2021-12-28 2022-04-12 中国农业银行股份有限公司 Data management method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6704278B1 (en) * 1999-07-02 2004-03-09 Cisco Technology, Inc. Stateful failover of service managers
US6954877B2 (en) * 2001-11-29 2005-10-11 Agami Systems, Inc. Fault tolerance using logical checkpointing in computing systems
FR2872605B1 (en) * 2004-06-30 2006-10-06 Meiosys Sa METHOD FOR MANAGING SOFTWARE PROCESS, METHOD AND SYSTEM FOR REDISTRIBUTION OR CONTINUITY OF OPERATION IN MULTI-COMPUTER ARCHITECTURE
CN100341298C (en) * 2005-10-13 2007-10-03 华中科技大学 Expandable dynamic fault-tolerant method for cooperative system
US8799446B2 (en) * 2006-08-18 2014-08-05 Microsoft Corporation Service resiliency within on-premise products
CN101645918B (en) * 2009-03-20 2012-08-15 中国科学院声学研究所 Internode collaboration method in P2P system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581048A (en) * 2013-11-08 2014-02-12 国家电网公司 Method for having control over overload of distributed resources of electric power communication network
CN103581048B (en) * 2013-11-08 2016-04-13 国家电网公司 A kind of distributed resource overload controlling method of powerline network
CN104023088A (en) * 2014-06-28 2014-09-03 山东大学 Storage server selection method applied to distributed file system
CN104023088B (en) * 2014-06-28 2017-04-19 山东大学 Storage server selection method applied to distributed file system
WO2016101751A1 (en) * 2014-12-27 2016-06-30 北京奇虎科技有限公司 Master and slave balancing method and device in distributed storage system
CN105376317A (en) * 2015-11-19 2016-03-02 网宿科技股份有限公司 Load balancing control method and load balancing control device
CN108307206A (en) * 2017-12-25 2018-07-20 北京奇艺世纪科技有限公司 A kind of distribution method and device of live streaming encoding tasks
CN108848479A (en) * 2018-07-19 2018-11-20 北京车联天下信息技术有限公司 Car networking service load balancing method, device and equipment
CN110855465A (en) * 2018-08-21 2020-02-28 华为技术有限公司 Message processing method and device
CN111158915A (en) * 2019-12-31 2020-05-15 厦门快商通科技股份有限公司 Master-slave relationship switching method, slave server, master server and system
CN114338688A (en) * 2021-12-28 2022-04-12 中国农业银行股份有限公司 Data management method and device
CN114338688B (en) * 2021-12-28 2024-02-23 中国农业银行股份有限公司 Data management method and device

Also Published As

Publication number Publication date
CN102984184B (en) 2017-09-19

Similar Documents

Publication Publication Date Title
CN102984184A (en) A method and a device for service load balancing for a distributed system
CN102891868A (en) Load balancing method and device for distributed system
CN105187249B (en) A kind of fault recovery method and device
US8095935B2 (en) Adapting message delivery assignments with hashing and mapping techniques
CN109167674B (en) Service node scoring method, Domain Name System (DNS) scheduling method and server
CN102685237B (en) Method for requesting session maintaining and dispatching in cluster environment
CN104836819A (en) Dynamic load balancing method and system, and monitoring and dispatching device
CN106656533B (en) A kind of the load processing monitoring method and device of group system
CN105516347A (en) Method and device for load balance allocation of streaming media server
CN110445662B (en) Method and device for adaptively switching OpenStack control node into computing node
CN109802986B (en) Equipment management method, system, device and server
CN113268351A (en) Load balancing method and device for gateway service
CN106658559B (en) A kind of Mobile QoS keeping method based on context-prediction
CN112261133A (en) CDN node control method, device, server and storage medium
US20150381498A1 (en) Network system and its load distribution method
CN113703950A (en) System, method and device for realizing server cluster flow scheduling processing, processor and computer readable storage medium thereof
CN106936926B (en) Method and system for accessing data node
CN112468310B (en) Streaming media cluster node management method and device and storage medium
EP1867081B1 (en) Distributed redundancy capacity licensing in a telecommunication network element
CN114338670B (en) Edge cloud platform and network-connected traffic three-level cloud control platform with same
CN103546331B (en) Acquisition methods, the apparatus and system of monitoring information
CN111786846B (en) Method, device, equipment and storage medium for determining monitoring machine
CN103973811A (en) High-availability cluster management method capable of conducting dynamic migration
JP2014230234A (en) Network management device and network management method
CN102014029A (en) Method for detecting abnormal conditions of external service network in dual active

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 201203 403d, building 5, No. 3000, Longdong Avenue, Pudong New Area, Shanghai

Patentee after: Shanghai Kelu Software Co.,Ltd.

Address before: 201203 Shanghai city Pudong New Area road 887 Lane 82 Zuchongzhi Building No. two North

Patentee before: Shanghai Kelu Software Co.,Ltd.

CP02 Change in the address of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20231107

Address after: 201203 north, 2nd floor, No.82, Lane 887, Zuchongzhi Road, Pudong New Area, Shanghai

Patentee after: Shanghai Kelu Software Co.,Ltd.

Patentee after: Shanghai Left Bank Investment Management Co.,Ltd.

Address before: 201203 403D 5, 3000 Longdong Avenue, Pudong New Area, Shanghai.

Patentee before: Shanghai Kelu Software Co.,Ltd.

TR01 Transfer of patent right