CN109218341A - For monitoring server and for the load-balancing method and device of server - Google Patents
For monitoring server and for the load-balancing method and device of server Download PDFInfo
- Publication number
- CN109218341A CN109218341A CN201710513211.9A CN201710513211A CN109218341A CN 109218341 A CN109218341 A CN 109218341A CN 201710513211 A CN201710513211 A CN 201710513211A CN 109218341 A CN109218341 A CN 109218341A
- Authority
- CN
- China
- Prior art keywords
- server
- processing request
- load
- forwarding
- terminal
- 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
Links
Classifications
-
- 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/1029—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
-
- 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/1012—Server selection for load balancing based on compliance of requirements or conditions with available server resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Multi Processors (AREA)
Abstract
This application discloses for monitoring server and for the load-balancing method and device of server.One specific embodiment of this method includes: the processing request of the Overloaded Servers forwarding reception self terminal in monitoring server cluster;Determine whether default underloading condition meets, wherein the default underloading condition includes that the load capacity of each server is less than the default underloading threshold value of each server;In response to determining that default underloading condition meets, according to the load capacity of each server, the load balance information of each server is determined;Identified load balance information is sent to terminal, the server being sent to according to the load balance information selection received to which request will be handled for terminal.The embodiment enriches the mode of load balancing.
Description
Technical field
This application involves field of computer technology, and in particular to Internet technical field, more particularly, to monitoring service
Device and load-balancing method and device for server.
Background technique
With the development of internet technology, the demand of network service also increasingly increases.Due to the processing energy of single server
Power is limited, typically now includes the server cluster of multiple servers using deployment, to provide high performance network clothes for user
Business.Network is provided using server cluster, there is distribution network request (load), are supported in server cluster respectively to realize
The problem of a server evenly distributes, that is, realizes load balancing.
However, existing load balancing mode, is usually received the net of user by the management server in server cluster
Network request, then the server for being sent to network request is determined using scheduled selection strategy, it accordingly, there are load balancing side
The more single problem of formula.
Summary of the invention
The purpose of the application is to propose a kind of improved for monitoring server and the load balancing side for server
Method and device, to solve the technical issues of background section above is mentioned.
In a first aspect, the embodiment of the present application provides a kind of load-balancing method for monitoring server, above-mentioned monitoring
For server for multiple servers in monitoring server cluster, the above method includes: the mistake in the monitoring server cluster
Carry the processing request that server forwarding receives self terminal;Determine whether default underloading condition meets, wherein above-mentioned default underloading item
Part includes that the load capacity of each server is less than the default underloading threshold value of each server;In response to determining that default underloading condition is full
Foot, according to the load capacity of each server, determines the load balance information of each server;By identified load balance information
It is sent to terminal, the server being sent to according to the load balance information selection received to which request will be handled for terminal.
Second aspect, the embodiment of the present application provide a kind of load-balancing method for server, and above-mentioned server is
Server in server cluster including multiple servers, the server in above-mentioned server cluster are communicated with monitoring server
Connection, above-mentioned monitoring server are used to monitor the server in above-mentioned server cluster, and the above method includes: that above-mentioned server is
Server in server cluster including multiple servers, monitoring server are multiple in above-mentioned server cluster for monitoring
Server, the above method includes: the processing request that forwarding receives self terminal, so that above-mentioned monitoring server is default in response to determining
Underloading condition meet, according to the load capacity of each server, determine the first load balance information of each server, wherein
Above-mentioned default underloading condition includes that the load capacity of each server is less than the default underloading threshold value of each server, will be identified
First load balance information is sent to terminal, so that terminal is selected according to the first load balance information received to by terminal
The server that processing request is sent to.
The third aspect, the embodiment of the present application provide a kind of load balancing apparatus for monitoring server, above-mentioned apparatus
It include: above-mentioned monitoring server for multiple servers in monitoring server cluster, above-mentioned apparatus includes: monitoring unit, is used
In the processing request for monitoring the Overloaded Servers forwarding reception self terminal in the server cluster;First determination unit, is used for
Determine whether default underloading condition meets, wherein above-mentioned default underloading condition includes the load capacity of each server less than each
The default underloading threshold value of server;Second determination unit, for presetting underloading condition satisfaction in response to determining, according to each service
The load capacity of device determines the load balance information of each server;Second transmission unit, for believing identified load surplus
Breath is sent to terminal, the server being sent to according to the load balance information selection received to handle request for terminal.
Fourth aspect, the embodiment of the present application provide a kind of load balancing apparatus for server, and above-mentioned server is
Server in server cluster including multiple servers, the server in above-mentioned server cluster are communicated with monitoring server
Connection, above-mentioned monitoring server are used to monitor the server in above-mentioned server cluster, and above-mentioned apparatus includes: retransmission unit, is used
The processing request of self terminal is received in forwarding, so that above-mentioned monitoring server meets in response to the preset underloading condition of determination, root
According to the load capacity of each server, the first load balance information of each server is determined, wherein above-mentioned default underloading condition packet
The load capacity for including each server is less than the default underloading threshold value of each server, by identified first load balance information hair
It send to terminal, the clothes for terminal according to the first load balance information selection received to which the processing request of terminal to be sent to
Business device.
5th aspect, the embodiment of the present application provide a kind of server, and above-mentioned server includes: one or more processing
Device;Storage device, for storing one or more programs, when said one or multiple programs are by said one or multiple processors
When execution, so that said one or multiple processors realize the method such as first aspect.
6th aspect, the embodiment of the present application provide a kind of server, and above-mentioned server includes: one or more processing
Device;Storage device, for storing one or more programs, when said one or multiple programs are by said one or multiple processors
When execution, so that said one or multiple processors realize the method such as second aspect.
7th aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence realizes the method such as first aspect when the program is executed by processor.
Eighth aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence realizes the method such as second aspect when the program is executed by processor.
It is provided by the embodiments of the present application to be used for monitoring server and load-balancing method and device for server, pass through
When server overload in server cluster, Overloaded Servers elder generation forward process request, so that the clothes in server cluster
Business device is in the state of underloading, after the server in server cluster is in light condition, according to each server
Load surplus obtains the load balance information of each server, and load balance information is sent to terminal, and terminal is according to more than load
The server that amount information selection is sent to handle request, enriches the mode of load balancing.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the load-balancing method for monitoring server of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the load-balancing method for monitoring server of the application;
Fig. 4 is the flow chart according to one embodiment of the load-balancing method for server of the application;
Fig. 5 is the flow chart according to a kind of implementation of the load-balancing method for server of the application;
Fig. 6 is the structural representation according to one embodiment of the load balancing apparatus for monitoring server of the application
Figure;
Fig. 7 is the structural schematic diagram according to one embodiment of the load balancing apparatus for server of the application;
Fig. 8 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the application for the load-balancing method of server, for the negative of monitoring server
Carry the embodiment of equalization methods, the load balancing apparatus for server and the load balancing apparatus for monitoring server
Exemplary system architecture 100.
As shown in Figure 1, system architecture 100 may include server 101,102,103, network 104, monitoring server 105
With terminal device 106.Herein, server 101,102,103 can be used to indicate that a server cluster.Network 104 to
Between terminal device 106 and server 101,102,103, between terminal device 106 and monitoring server 105 and server
101, the medium of communication link is provided between 102,103 and monitoring server 105.Network 104 may include various connection types,
Such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 106 and be interacted by network 104 with server 101,102,103, to receive or send out
Send message etc..Various telecommunication customer end applications, such as web browser applications, shopping class can be installed on terminal device 106
Using, searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 106 can be the various electronic equipments for supporting various functions, including but not limited to smart phone, plate
Computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic
Image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, move
State image expert's compression standard audio level 4) player, pocket computer on knee and desktop computer etc..It needs to illustrate
, terminal device 106 is the equipment for server, the equipment that possible user sends or receives message using it,
It is also likely to be reception and forwards the message of user's transmission to the equipment of service.
Server 101,102,103 can be to provide the server of various services, such as to showing on terminal device 106
Webpage provides the backstage web page server supported.Backstage web page server can to receive Webpage request etc. data into
The processing such as row analysis, and processing result (such as webpage data) is fed back into terminal device.
Monitoring server 105 can be the server being monitored to server 101,102,103.For example, monitoring service
Whether device 105 can be overloaded with monitoring server 101,102,103, if overload, migration instruction can be sent to server to be made to take
It is engaged in carrying out load migration (processing request forwarding) between device 101,102,103, so that each server is in steady operational status,
To reach the load balancing of server cluster entirety.Also, monitoring server can based on the operating status of server,
The load balance information of each server in server cluster is obtained, such as load balance information can be weight, this weight is used
In the weight for characterizing ratio of the load surplus of each server in the load total allowance of server cluster.Monitoring server
Load balance information can also be sent to terminal device 106 by 105.
Processing request can be sent to by terminal device 106 according to load balance information and scheduled dispatching algorithm, selection
Server 101,102 or 103.The server for being sent to processing request is voluntarily selected by client, may be implemented to service
The load balancing of each server in device cluster.Herein, scheduled dispatching algorithm can be poll (Round Robin),
Weighted polling (Weighted Round Robin), minimum connection (Least Connections) etc., details are not described herein.
It should be understood that the number of terminal device, network, server and monitoring server in Fig. 1 is only schematical.
According to needs are realized, any number of terminal device, network, server and monitoring server can have.
With continued reference to Fig. 2, it illustrates a realities according to the load-balancing method for monitoring server of the application
Apply the process 200 of example.Monitoring server is for multiple servers in monitoring server cluster.It should be noted that Fig. 2 is corresponding
Embodiment provided by generally executed by the monitoring server 105 in Fig. 1 for the load-balancing method of monitoring server.On
The load-balancing method for monitoring server stated, comprising the following steps:
Step 201, the Overloaded Servers forwarding in monitoring server cluster receives the processing request of self terminal.
In the present embodiment, electronic equipment (such as the monitoring service shown in FIG. 1 of load-balancing method operation thereon
Device) the processing request that the Overloaded Servers forwarding in the server cluster receives self terminal can be monitored.
In the present embodiment, above-mentioned electronic equipment can be with multiple servers in monitoring server, to determine in server
It whether there is Overloaded Servers in cluster.Monitoring server can obtain the load capacity of server in real time, if load capacity is greater than
Default overloading threshold, it is determined that this server overload.Herein, it can be set according to the practical situations of server cluster
Set default overloading threshold.
As an example, can be incited somebody to action if the server of current quantity is enough to handle all processing requests in server cluster
Overloading threshold setting it is lower, for example overloading threshold can be set to server maximum and can accept the 60% of load capacity.Such as
The number of servers of current quantity handles all processing requests more anxiety in fruit server cluster, overloading threshold can be arranged
It is higher, for example overloading threshold can be set to server maximum and can accept the 90% of load capacity.
In some optional implementations of the present embodiment, step 201 may include: that above-mentioned electronic equipment can be to clothes
The Overloaded Servers being engaged in device cluster send request of data forwarding instruction, so that the Overloaded Servers are described in response to receiving
Request of data forwarding instruction, other servers in addition to the Overloaded Servers into the server cluster, which forward, to be received
The request of data of self terminal.Above-mentioned Overloaded Servers, can be to other clothes in response to receiving above-mentioned processing request forwarding instruction
Business device forwarding receives the processing request of self terminal.
It is appreciated that forward process request also can be described as migration load.Herein, other servers can be above-mentioned
Other servers in addition to Overloaded Servers in server cluster.
In some optional implementations of the present embodiment, above-mentioned monitoring server can be in monitoring server cluster
The load capacity of each server, and then determine the load surplus of each server, then will be more than the load for the server that do not overloaded
Amount or load balance information are sent to above-mentioned Overloaded Servers.Above-mentioned Overloaded Servers can be according to each server received
Receivable load capacity, determine the server that is forwarded to of processing request that will receive self terminal.
In some optional implementations of the present embodiment, step 201 may include: in the monitoring server cluster
Server execute following steps: server in the server cluster is in response to determining itself overload, to the server
Other servers in addition to the Overloaded Servers in cluster send forwarding request, for receiving the forwarding request
Server can accept load capacity to Overloaded Servers transmission;The Overloaded Servers can be held according at least one received
Connect load capacity, the server that the processing request for receiving self terminal is forwarded to by selection;To selected server forwarding received from
The processing of terminal is requested.
It should be noted that above-mentioned Overloaded Servers can to the processing request that above-mentioned other server forwardings receive self terminal
To be a process.Alternatively, the processing request for the reception self terminal that above-mentioned Overloaded Servers are forwarded to above-mentioned other servers, it can
To be one, it is also possible to a plurality of.It is appreciated that can continue after Overloaded Servers receive processing request forwarding instruction
It is requested to other server forward process.This processing request can be Overloaded Servers receive processing request forwarding instruction after
The processing request received is also possible to receive before Overloaded Servers receive processing request forwarding instruction, is also untreated
Processing request.
Step 202, determine whether default underloading condition meets.
In the present embodiment, electronic equipment (such as the monitoring service shown in FIG. 1 of load-balancing method operation thereon
Device) it can determine whether default underloading condition meets.Herein, above-mentioned default underloading condition may include the negative of each server
Carrying capacity is less than the default underloading threshold value for presetting each server.
As an example, server cluster includes first server and second server, the default underloading threshold value of first server can be with
It is that first server maximum can accept the 40% of load capacity, the default request threshold value of second server can be second server maximum and can hold
Connect the 30% of load capacity.The load capacity that default request condition can be first server, which is less than first server maximum, can accept load capacity
40%, and the load capacity of second server be less than second server maximum can accept the 30% of load capacity.
Step 203, in response to determining that default underloading condition meets, according to the load capacity of each server, each clothes are determined
The load balance information of business device.
In the present embodiment, electronic equipment (such as the monitoring service shown in FIG. 1 of load-balancing method operation thereon
Device), according to the load capacity of each server, the load of each server can be determined in response to determining that default underloading condition meets
Balance information.
In some optional implementations of the present embodiment, load balance information be can be for characterizing the negative of server
Carry the weight of ratio of the surplus in server cluster load total allowance.As an example, step 203 may include: by each clothes
The known maximum of business device can accept the difference of the load capacity of load capacity and each server, be determined as the load of each server
Surplus.By the summation of above-mentioned each load surplus, it is determined as the load surplus summation of above-mentioned server cluster.For each service
The ratio of the load surplus of the server and load surplus summation is determined as the load balance information of the server by device.
It will be understood by those skilled in the art that the maximum of server can accept the determination of load capacity, the calculating with server
Ability is related, and specific determination process those skilled in the art can realize in practical applications according to the prior art, herein not
It repeats again.
In some optional implementations of the present embodiment, load balance information can be load surplus.Step 203 can
To include: the difference that the maximum of each server can be accepted to the load capacity of load capacity and each server, it is determined as each clothes
The load surplus of business device, that is, determine the load balance information of each server.
It should be noted that if monitoring server in discovery server cluster there are after Overloaded Servers, immediately
It determines the load balance information of each server, and identified load balance information is sent to terminal, then may cause end
End, which is swarmed, seizes the server of light load, and the server so as to cause this script light load overloads quickly.
Comparison is it can be found that there is overload in discovery server cluster in method provided in this embodiment, monitoring server
After server, first indicate to carry out load migration, each service in device cluster to be serviced between the server in server cluster
Device is lightly loaded and then determines the load balance information of each server.This mode can swarm to avoid terminal device and seize
Server, to avoid load that is unbalance again in server cluster and may cause from shaking, and then can be equal with proof load
Weighing apparatus, and improve the efficiency of server cluster load balancing.
Step 204, identified load balance information is sent to terminal.
In the present embodiment, electronic equipment (such as the monitoring service shown in FIG. 1 of load-balancing method operation thereon
Device) identified load balance information can be sent to terminal.Herein, above-mentioned terminal can be according to more than the load received
Information is measured, the server being sent to which request will be handled is selected.
It should be noted that it is also likely to be multiple that terminal, which may be one,.The terminal that load balance information is sent to, may
It is identical as the terminal that Overloaded Servers receive processing request, it is also possible to different.
In some optional implementations of the present embodiment, above-mentioned terminal can be according to load balance information and above-mentioned pre-
Fixed dispatching algorithm, the server that processing request is sent to by selection.It will be understood by those skilled in the art that provided herein
Load-balancing method can be client-based load balancing, i.e., the service being sent to processing request by client selection
Device, to realize load balancing.Above-mentioned client may be mounted in terminal.
As an example, terminal can be according to each ratio that be characterized of load balance information, distribution terminal is by the place of transmission
Manage the ratio of request.Such as the processing request of transmission is had 10 by terminal.Server cluster includes first server and second server,
Wherein, the load balance information of first server is 60%, and the load balance information of second server is 40%.It is possible to by this
6 processing request in 10 is sent to first server, and 4 processing request in this 10 is sent to second server.
In some optional implementations of the present embodiment, method provided in this embodiment can also include: in response to
Identified load balance information is sent to terminal, stops forwarding instruction to the transmission of above-mentioned Overloaded Servers.Above-mentioned overload clothes
Business device above-mentioned can stop forwarding instruction in response to receiving, it is determined whether stop forwarding and above-mentioned stop forwarding instruction receiving
The processing request received later.
In some optional implementations of the present embodiment, above-mentioned Overloaded Servers can be in response to receiving above-mentioned stop
Rotation stop sends instructions, it is determined whether and it stops forwarding and is receiving the above-mentioned processing request for stopping forwarding and receiving after instruction, it can be with
Comprise determining that receive it is above-mentioned stop forwarding instruction after receive post-processing request whether at preceding processing request
It is herein, above-mentioned to request to be that the processing that terminal is sent before being sent in post-processing request is requested in preceding processing in same session.
If it is not, then this is not forwarded to request in processing.If it is, determining above-mentioned in the server process of preceding processing request by handling
State target processing request.If handling the above-mentioned server in preceding processing request is other servers, this is forwarded to post-process
Request.If handling the above-mentioned server in preceding processing request is other servers, this is not forwarded to request in post-processing.
With continued reference to the schematic diagram that Fig. 3, Fig. 3 are according to the application scenarios of the load-balancing method of the present embodiment.?
In the application scenarios of Fig. 3, monitoring server 301 monitors the server in server cluster, such as server 302 and service in real time
Device 303 determines in server cluster with the presence or absence of Overloaded Servers.Overloaded Servers 302 can forward the place for receiving self terminal
Reason request, for example, Overloaded Servers 302 can forward the processing request for receiving self terminal 304 to server 303.Monitoring service
Device can determine whether default underloading condition meets, i.e., whether the load capacity of each server in server cluster is respectively less than each
The default underloading threshold value of a server, for example, whether the load capacity of server 302, which is less than server 302, can handle request amount
40%, and whether the load capacity of server 303 is less than server 303 can handle the 30% of request amount.Monitoring server can be with
In response to determining that default underloading condition meets, according to the load capacity of each server, the load surplus letter of each server is determined
Breath, for example, the load balance information of server 302 is 60%, the load balance information of server 303 is 40%.Monitoring service
Identified load balance information can be sent to terminal by device.Terminal can according to receive load balance information selection to
The server that processing request is sent to.
The method provided by the above embodiment of the application, when by server overload in server cluster, overload service
Device elder generation forward process request, so that the server in server cluster is in the state of underloading, in server cluster
Server be in light condition after, according to the load surplus of each server obtain each server load surplus believe
Load balance information is sent to terminal, the service that terminal will be sent to according to load balance information selection to handle request by breath
Device enriches the mode of load balancing.
With further reference to Fig. 4, it illustrates the processes 400 of one embodiment of the load-balancing method for server.
Above-mentioned server be include server in the server cluster of multiple servers, server and prison in above-mentioned server cluster
Server communication connection is controlled, above-mentioned monitoring server is used to monitor the server in above-mentioned server cluster.It should be noted that
Load-balancing method provided by the corresponding embodiment of Fig. 4 for server is generally by the server 101,102,103 in Fig. 1
It executes.The process 400 of the load-balancing method, comprising the following steps:
Step 401, forwarding receives the processing request of self terminal.
In the present embodiment, the electronic equipment (such as server shown in FIG. 1) of load-balancing method operation thereon can
To forward the processing request for receiving self terminal.
In the present embodiment, above-mentioned monitoring server can meet in response to the preset underloading condition of determination, according to each
The load capacity of server determines the first load balance information of each server, wherein above-mentioned default underloading condition includes each
The load capacity of server is less than the default underloading threshold value of each server, and identified first load balance information is sent to end
End, the server for terminal according to the first load balance information selection received to which the processing request of terminal to be sent to.
In some optional implementations of the present embodiment, step 401 may include: receive the monitoring server to
The processing request forwarding instruction that Overloaded Servers are sent.In response to receiving processing request forwarding instruction, into server cluster
Go out Overloaded Servers except other servers forwarding receive self terminal processing request.
In some optional implementations of the present embodiment, method provided in this embodiment, step 401 may include:
In response to determining itself overload, the overload of removing into the server cluster services server in the server cluster
Other servers except device send forwarding request, for receiving the server for forwarding request to the Overloaded Servers
Transmission can accept load capacity;The Overloaded Servers can accept load capacity according at least one received, and selection will be received from
The server that the processing request of terminal is forwarded to.
In some optional implementations of the present embodiment, method provided in this embodiment can also include: in reception
That states monitoring server transmission stops forwarding instruction, wherein above-mentioned to stop forwarding instruction be above-mentioned monitoring server in response to general
Identified first load balance information is sent to terminal and sends.In response to receive it is above-mentioned stop forwarding instruction, determine
Whether stop forwarding and is receiving the above-mentioned processing request for stopping forwarding and receiving after instruction.
It is appreciated that the server of above-mentioned processing request forwarding instruction, as Overloaded Servers can be received.
In some optional implementations of the present embodiment, step 401 can be accomplished by the following way: overload service
Device can request the processing for receiving self terminal to be all forwarded to other servers.
In some optional implementations of the present embodiment, referring to FIG. 5, it illustrates a kind of realizations of step 401
The process 500 of mode, step 402 can realize that detailed process is as follows by step 501 shown in fig. 5 to step 506:
Step 501, the target processing request that user is sent by terminal is received.
In this implementation, the electronic equipment of load-balancing method operation for server thereon is (such as shown in Fig. 1
Server) can receive the target processing request that user is sent by terminal.Herein, above-mentioned target processing request can wrap
Include the first information.
Optionally, the above-mentioned first information can include but is not limited to following one or more: the user type of above-mentioned user,
The type of above-mentioned target processing request.As an example, the user types such as general user and member user can be divided into.Processing request
Type the types such as the larger type of calculation amount, the smaller type of calculation amount can be set.
Step 502, according to the first information, it is determined whether forwarding target processing request.
Electronic equipment (such as Fig. 1 institute of load-balancing method operation thereon in this implementation, for server
The server shown) it can be according to the first information, it is determined whether forward above-mentioned target processing request.
As an example, forward rule can be set in advance, for example, forwarded if user type is general user, if
User type is that member user does not forward then.For another example being forwarded if request type is the larger type of calculation amount, if request
Type is that the smaller type of calculation amount does not forward then.
In this implementation, above-mentioned target processing request further includes the second information, wherein above-mentioned second information is for referring to
Show that above-mentioned target handles request and whether is in same session in preceding processing request, wherein above-mentioned to request to be terminal in preceding processing
The processing request sent before sending above-mentioned target processing request.
As an example, the terminal to server that user uses submits payment to ask in the conversation procedure of processing order payment
It asks.Server can handle payment request after receiving payment request, i.e., it is close that the terminal used to user issues input payment
The instruction of code.User can submit password confirming to request after inputting password using terminal to server.Server can handle
Whether password confirming request, i.e. confirmation password are correct.Herein, payment request is requesting in preceding processing for password confirming request.
It is appreciated that can be password confirming request the second information of setting, the second information be allowed to indicate password confirming request and branch
It pays request and is in same session.
Step 503 ', target processing request is not forwarded in response to determining, processing target processing request.
Electronic equipment (such as Fig. 1 institute of load-balancing method operation thereon in this implementation, for server
The server shown) target processing request can not be forwarded in response to determining, processing target processing request.
Step 503, in response to determining forwarding target processing request, according to the second information, determine target processing request with
Whether pre-treatment request is in same session.
Electronic equipment (such as Fig. 1 institute of load-balancing method operation thereon in this implementation, for server
The server shown) can in response to determining forwarding target processing request, according to the second information, determine above-mentioned target processing request with
It is above-mentioned whether to be in same session in preceding processing request.
In this implementation, above-mentioned processing request forwarding instruction further includes each server in above-mentioned server cluster
Second load balance information.
It is appreciated that terminal may be transmitted across multiple processing requests before sending target processing request, target processing is asked
Same session may be in one or more by asking.
Step 504, in response to determining that target processing request is not at same session in preceding processing request, according to server
Second load balance information of each server in cluster, determines the destination server for being sent to target processing request.
Electronic equipment (such as Fig. 1 institute of load-balancing method operation thereon in this implementation, for server
The server shown) same session, root can be not in preceding processing request with above-mentioned in response to the above-mentioned target processing request of determination
Balance information is loaded according to second of each server in above-mentioned server cluster, determines and is sent to the processing request of above-mentioned target
Destination server.
Step 505, target processing request is sent to destination server.
Electronic equipment (such as Fig. 1 institute of load-balancing method operation thereon in this implementation, for server
The server shown) the processing request of above-mentioned target can be sent to above-mentioned purpose server.Herein, above-mentioned purpose server can
To handle above-mentioned target processing request.
Step 506, it in response to determining that target processing request is in same session in preceding processing request, determines by handling
The server process target of pre-treatment request handles request.
Electronic equipment (such as Fig. 1 institute of load-balancing method operation thereon in this implementation, for server
The server shown) it can be in same session in preceding processing request with above-mentioned in response to the above-mentioned target processing request of determination, it determines
By handling the above-mentioned above-mentioned target processing request of the server process in preceding processing request.
Herein, handling the above-mentioned server in preceding processing request may be above-mentioned Overloaded Servers, it is also possible to service
Other servers in device cluster.
It should be noted that the realization of each step in method provided in this embodiment, especially to Overloaded Servers
The explanation of performed step can be not repeated with reference to the explanation in the embodiment that Fig. 2 is provided in order to compose a piece of writing succinctly herein.
The method provided by the above embodiment of the application, by the processing request forwarding for receiving monitoring server transmission
After instruction, forward process request, so that the server in server cluster is in the state of underloading, in server set
After server in group is in light condition, monitoring obtains the load of each server according to the load surplus of each server
Load balance information is sent to terminal by balance information, and terminal is sent to according to load balance information selection to handle request
Server, enrich the mode of load balancing.
With further reference to Fig. 6, as the realization to method shown in above-mentioned Fig. 2, this application provides one kind for monitoring clothes
One embodiment of the load balancing apparatus of business device, above-mentioned monitoring server is for multiple services in monitoring server cluster
Device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to various electronic equipments
In, specifically, the device can using in monitoring server 105 shown in FIG. 1.
As shown in fig. 6, the above-mentioned load balancing apparatus 600 of the present embodiment includes: monitoring unit 601, the first determination unit
602, the second transmission unit 603 and the second transmission unit 604.Wherein, monitoring unit, for monitoring in the server cluster
Overloaded Servers forwarding receives the processing request of self terminal;First determination unit, for determining whether default underloading condition meets,
Wherein, above-mentioned default underloading condition includes that the load capacity of each server is less than the default underloading threshold value of each server;Second
Determination unit, for according to the load capacity of each server, determining each server in response to determining that default underloading condition meets
Load balance information;Second transmission unit, for identified load balance information to be sent to terminal, for terminal according to
The server that the load balance information selection received is sent to handle request.
In the present embodiment, monitoring unit 601, the first determination unit 602, the second transmission unit 603 and second send list
Member 604 it is specific processing and its brought technical effect can respectively refer to Fig. 2 corresponding embodiment in step 201, step 202,
The related description of step 203 and step 204, details are not described herein.
In some optional implementations of the present embodiment, above-mentioned apparatus further include: third transmission unit (not shown),
For stopping forwarding instruction to the transmission of above-mentioned Overloaded Servers in response to identified load balance information is sent to terminal,
So that above-mentioned Overloaded Servers above-mentioned stop forwarding instruction in response to receiving, it is determined whether stop forwarding and receiving above-mentioned stop
The processing request that rotation stop receives after sending instructions.
In some optional implementations of the present embodiment, above-mentioned first determination unit is used for: by each server
Known maximum can accept the difference of the load capacity of load capacity and each server, be determined as the load surplus of each server;
By the summation of above-mentioned each load surplus, it is determined as the load surplus summation of above-mentioned server cluster;It, will for each server
The load surplus of the server and the ratio of load surplus summation, are determined as the load balance information of the server.
In some optional implementations of the present embodiment, above-mentioned monitoring unit is also used to: into server cluster
Overloaded Servers send request of data forwarding instruction, so that the Overloaded Servers are forwarded in response to receiving the request of data
Instruction, other servers forwarding in addition to the Overloaded Servers into the server cluster receive the data of self terminal
Request.
In some optional implementations of the present embodiment, above-mentioned monitoring unit is also used to: monitoring the server set
Server in group executes following steps: the server in the server cluster is in response to determining itself overload, to the clothes
The other servers in addition to the Overloaded Servers being engaged in device cluster send forwarding request, ask for receiving the forwarding
The server asked can accept load capacity to Overloaded Servers transmission;The Overloaded Servers are according at least one received
Load capacity, the server that the processing request for receiving self terminal is forwarded to by selection can be accepted;It is connect to the forwarding of selected server
Receive the processing request of self terminal.
It should be noted that in the load balancing apparatus provided in this embodiment for monitoring server each unit realization
Details and technical effect can be with reference to the explanations of other embodiments in the application, and details are not described herein.
With further reference to Fig. 7, as the realization to method shown in above-mentioned Fig. 4, this application provides one kind to be used for server
Load balancing apparatus one embodiment, above-mentioned server be include server in the server cluster of multiple servers,
Server and monitoring server in above-mentioned server cluster communicate to connect, and above-mentioned monitoring server is for monitoring above-mentioned server
Server in cluster.The Installation practice is corresponding with embodiment of the method shown in Fig. 4, which specifically can be applied to respectively
In kind electronic equipment, specifically, which be can be applied in server 101,102,103 shown in FIG. 1.
As shown in fig. 7, the above-mentioned load balancing apparatus 700 of the present embodiment includes: retransmission unit 701.Wherein, forwarding is single
Member, in response to receiving above-mentioned processing request forwarding instruction, into above-mentioned server cluster in addition to Overloaded Servers
Other servers forwarding receive self terminal processing request, so that above-mentioned monitoring server is in response to the preset underloading item of determination
Part meets, and according to the load capacity of each server, determines the first load balance information of each server, wherein above-mentioned default
Underloading condition includes that the load capacity of each server is less than the default underloading threshold value of each server, and identified first is loaded
Balance information is sent to terminal, so that terminal is selected according to the first load balance information received to request the processing of terminal
The server being sent to.
In the present embodiment, the specific processing of retransmission unit 701 and its brought technical effect can refer to Fig. 4 pairs respectively
The related description in embodiment in step 401 is answered, details are not described herein.
In some optional implementations of the present embodiment, the retransmission unit is also used to: receiving the monitoring service
The processing request forwarding instruction that device is sent to Overloaded Servers;In response to receiving processing request forwarding instruction, to described
Other servers forwarding in addition to Overloaded Servers in server cluster receives the processing request of self terminal.
In some optional implementations of the present embodiment, the retransmission unit is also used to: in the server cluster
Server in response to determining itself overload, other services in addition to the Overloaded Servers into the server cluster
Device sends forwarding request, can accept load to Overloaded Servers transmission for receiving the server of the forwarding request
Amount;The Overloaded Servers can accept load capacity according at least one received, and the processing for receiving self terminal is requested in selection
The server being forwarded to.
In some optional implementations of the present embodiment, the above-mentioned processing in response to receiving monitoring server transmission
Request forwarding instruction, to above-mentioned retransmission unit, is also used to: receiving the target processing request that user is sent by terminal, above-mentioned mesh
Mark processing request include the first information, wherein the above-mentioned first information include at least one of the following: above-mentioned user user type,
The type of above-mentioned target processing request;According to the above-mentioned first information, it is determined whether forward above-mentioned target processing request.
In some optional implementations of the present embodiment, above-mentioned target processing request further includes the second information, wherein
Above-mentioned second information is used to indicate above-mentioned target processing request and whether is in same session in preceding processing request, wherein above-mentioned
It is the processing request that terminal is sent before sending above-mentioned target processing request in preceding processing request;And above-mentioned retransmission unit,
Be also used to: forwarding the processing request of above-mentioned target in response to determining, according to above-mentioned second information, determine above-mentioned target processing request with
It is above-mentioned whether to be in same session in preceding processing request.
In some optional implementations of the present embodiment, above-mentioned processing request forwarding instruction further includes above-mentioned server
Second load balance information of each server in cluster;And above-mentioned retransmission unit, it is also used to: in response to the above-mentioned mesh of determination
Mark processing request is not at same session in preceding processing request with above-mentioned, according to each server in above-mentioned server cluster
Second load balance information determines the destination server for being sent to the processing request of above-mentioned target;The processing of above-mentioned target is requested
It is sent to above-mentioned purpose server, for the above-mentioned target processing request of above-mentioned purpose server process.
In some optional implementations of the present embodiment, above-mentioned retransmission unit is also used to: in response to the above-mentioned mesh of determination
Mark processing request is in same session in preceding processing request with above-mentioned, determines by handling the above-mentioned server in preceding processing request
Manage above-mentioned target processing request.
In some optional implementations of the present embodiment, above-mentioned apparatus further include: the second receiving unit (not shown),
Instruction is stopped forwarding for receive that above-mentioned monitoring server sends, wherein above-mentioned to stop forwarding instruction be above-mentioned monitoring service
Device is sent in response to identified first load balance information is sent to terminal;Third determination unit (not shown) is used
In above-mentioned stopping forwarding instruction in response to receiving, it is determined whether stop forwarding and above-mentioned stop forwarding being followed by for instruction receiving
The processing request received.
It should be noted that in the load balancing apparatus provided in this embodiment for server each unit realization details
Can be with reference to the explanation of other embodiments in the application with technical effect, details are not described herein.
Below with reference to Fig. 8, it illustrates the monitoring server for being suitable for being used to realize the embodiment of the present application and servers
The structural schematic diagram of computer system 800.Server shown in Fig. 8 is only an example, should not be to the embodiment of the present application
Function and use scope bring any restrictions.
As shown in figure 8, computer system 800 includes central processing unit (CPU) 801, it can be read-only according to being stored in
Program in memory (ROM) 802 or be loaded into the program in random access storage device (RAM) 803 from storage section 808 and
Execute various movements appropriate and processing.In RAM 803, also it is stored with system 800 and operates required various programs and data.
CPU 801, ROM 802 and RAM 803 are connected with each other by bus 804.Input/output (I/O) interface 805 is also connected to always
Line 804.
I/O interface 805 is connected to lower component: the importation 806 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 807 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 808 including hard disk etc.;
And the communications portion 809 of the network interface card including LAN card, modem etc..Communications portion 809 via such as because
The network of spy's net executes communication process.Driver 810 is also connected to I/O interface 805 as needed.Detachable media 811, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 810, in order to read from thereon
Computer program be mounted into storage section 808 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 809, and/or from detachable media
811 are mounted.When the computer program is executed by central processing unit (CPU) 801, limited in execution the present processes
Above-mentioned function.
It should be noted that the above-mentioned computer-readable medium of the application can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In this application, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In application, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet
Include monitoring unit, the first determination unit, the second transmission unit and the second transmission unit.Wherein, the title of these units is at certain
In the case of do not constitute restriction to the unit itself, for example, monitoring unit is also described as " in the server cluster
Overloaded Servers forwarding receive self terminal processing request unit ".
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet
Include retransmission unit.Wherein, the title of these units does not constitute the restriction to the unit itself under certain conditions, for example, turning
Bill member is also described as " unit that forwarding receives the processing request of self terminal ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be
Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should
Device: the processing request that the Overloaded Servers forwarding in the server cluster receives self terminal is monitored;Determine default underloading item
Whether part meets, wherein the default underloading condition includes that the load capacity of each server is less than the default light of each server
Carry threshold value;In response to determining that default underloading condition meets, according to the load capacity of each server, the load of each server is determined
Balance information;Identified load balance information is sent to terminal, so that terminal is selected according to the load balance information received
Select the server being sent to which request will be handled.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be
Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should
Device: above-mentioned server be include server in the server cluster of multiple servers, monitoring server is above-mentioned for monitoring
Multiple servers in server cluster, the above method includes: the processing request that forwarding receives self terminal, for monitoring clothes
Device be engaged in response to the preset underloading condition satisfaction of determination, according to the load capacity of each server, determines the first of each server
Load balance information, wherein the default underloading condition includes that the load capacity of each server is less than the default of each server
Be lightly loaded threshold value, by it is identified first load balance information be sent to terminal, for terminal according to receive first load more than
Server of the amount information selection to which the processing request of terminal to be sent to.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (19)
1. a kind of load-balancing method for monitoring server, which is characterized in that the monitoring server is used for monitoring service
Multiple servers in device cluster, which comprises
Monitor the processing request that the Overloaded Servers forwarding in the server cluster receives self terminal;
Determine whether default underloading condition meets, wherein the default underloading condition includes that the load capacity of each server is less than
The default underloading threshold value of each server;
In response to determining that default underloading condition meets, according to the load capacity of each server, more than the load for determining each server
Measure information;
Identified load balance information is sent to terminal, so that terminal is selected according to the load balance information received wait incite somebody to action
The server that processing request is sent to.
2. the method according to claim 1, wherein the method also includes:
In response to identified load balance information is sent to terminal, instruction is stopped forwarding to Overloaded Servers transmission,
So that the Overloaded Servers described stop forwarding instruction in response to receiving, it is determined whether stop forwarding and stop described in receiving
The processing request that rotation stop receives after sending instructions.
3. according to the method described in claim 2, it is characterized in that, the load capacity according to each server, determines each
The load balance information of server, comprising:
The difference that the known maximum of each server can be accepted to the load capacity of load capacity and each server, is determined as each
The load surplus of server;
By the summation of each load surplus, it is determined as the load surplus summation of the server cluster;
For each server in the server cluster, by the load surplus of the server and the load surplus summation
Ratio is determined as the load balance information of the server.
4. method according to any one of claim 1-3, which is characterized in that the overload in the monitoring server cluster
Server forwarding receives the processing request of self terminal, comprising:
Overloaded Servers into server cluster send request of data forwarding instruction, so that the Overloaded Servers are in response to connecing
Receive the request of data forwarding instruction, other servers in addition to the Overloaded Servers into the server cluster
Forwarding receives the request of data of self terminal.
5. method according to any one of claim 1-3, which is characterized in that the overload in the monitoring server cluster
Server forwarding receives the processing request of self terminal, comprising:
The server monitored in the server cluster executes following steps:
Server in the server cluster removes the overload into the server cluster in response to determining itself overload
Other servers except server send forwarding request, take for receiving the server of the forwarding request to the overload
Business device transmission can accept load capacity;
The Overloaded Servers can accept load capacity according at least one received, and the processing for receiving self terminal is requested in selection
The server being forwarded to;
The processing request for receiving self terminal is forwarded to selected server.
6. a kind of load-balancing method for server, which is characterized in that the server is the clothes for including multiple servers
The server being engaged in device cluster, server and monitoring server in the server cluster communicate to connect, the monitoring service
Device is used to monitor the server in the server cluster, which comprises
Forwarding receives the processing request of self terminal, so that the monitoring server meets in response to the preset underloading condition of determination,
According to the load capacity of each server, the first load balance information of each server is determined, wherein the default underloading condition
Load capacity including each server is less than the default underloading threshold value of each server, by identified first load balance information
It is sent to terminal, so that terminal is selected according to the first load balance information received to which terminal is handled what request was sent to
Server.
7. according to the method described in claim 6, it is characterized in that, the processing request that the forwarding receives self terminal includes:
Receive the processing request forwarding instruction that the monitoring server is sent to Overloaded Servers;
Its in addition to Overloaded Servers in response to receiving the processing request forwarding instruction, into the server cluster
The forwarding of its server receives the processing request of self terminal.
8. according to the method described in claim 6, it is characterized in that, the processing request that the forwarding receives self terminal includes:
Server in the server cluster removes the overload into the server cluster in response to determining itself overload
Other servers except server send forwarding request, take for receiving the server of the forwarding request to the overload
Business device transmission can accept load capacity;
The Overloaded Servers can accept load capacity according at least one received, and the processing for receiving self terminal is requested in selection
The server being forwarded to.
9. method a method according to any one of claims 6-8, which is characterized in that the method also includes:
Receive that the monitoring server sends stops forwarding instruction, wherein described to stop forwarding instruction be the monitoring service
Device is sent in response to identified first load balance information is sent to terminal;
Described instruction is stopped forwarding in response to receiving, it is determined whether is stopped forwarding after stopping forwarding instruction described in receive
The processing request received.
10. according to the method described in claim 9, it is characterized in that, the processing request of the forwarding reception self terminal, is also wrapped
It includes:
The target processing request that user is sent by terminal is received, the target processing request includes the first information, wherein described
The first information includes at least one of the following: the type of the user type of the user, target processing request;
According to the first information, it is determined whether forward the target processing request.
11. according to the method described in claim 10, it is characterized in that, the target processing request further include the second information,
In, second information is used to indicate the target processing request and whether is in same session in preceding processing request, wherein institute
Stating in preceding processing request is the processing request that terminal is sent before sending the target processing request;And
The forwarding receives the processing request of self terminal, further includes:
The target processing request is forwarded in response to determining, according to second information, determines the target processing request and institute
It whether states in preceding processing request in same session.
12. according to the method for claim 11, which is characterized in that the processing request forwarding instruction further includes the service
Second load balance information of each server in device cluster;And
The forwarding receives the processing request of self terminal, further includes:
It is not at same session in preceding processing request with described in response to the determination target processing request, according to the server
Second load balance information of each server in cluster, determines the purpose service for being sent to target processing request
Device;
Target processing request is sent to the destination server, for the destination server processing target processing
Request.
13. according to the method for claim 12, which is characterized in that the forwarding receives the processing request of self terminal, also wraps
It includes:
Be in same session in preceding processing request with described in response to determination target processing request, determine described in processing
Target processing request described in the server process of pre-treatment request.
14. a kind of load balancing apparatus for monitoring server, which is characterized in that the monitoring server is used for monitoring service
Multiple servers in device cluster, described device include:
Monitoring unit receives the processing request of self terminal for monitoring the forwarding of the Overloaded Servers in the server cluster;
First determination unit, for determining whether default underloading condition meets, wherein the default underloading condition includes each clothes
The load capacity of business device is less than the default underloading threshold value of each server;
Second determination unit, for according to the load capacity of each server, determining each in response to determining that default underloading condition meets
The load balance information of a server;
Second transmission unit, for identified load balance information to be sent to terminal, so that terminal is negative according to what is received
Carry the server that balance information selection is sent to handle request.
15. a kind of load balancing apparatus for server, which is characterized in that the server is the clothes for including multiple servers
The server being engaged in device cluster, server and monitoring server in the server cluster communicate to connect, the monitoring service
Device is used to monitor the server in the server cluster, and described device includes:
Retransmission unit, for forwarding the processing request for receiving self terminal, so that the monitoring server is preset in response to determination
Underloading condition meets, and according to the load capacity of each server, determines the first load balance information of each server, wherein institute
Stating default underloading condition includes that the load capacity of each server is less than the default underloading threshold value of each server, by identified the
One load balance information is sent to terminal, so that terminal is selected according to the first load balance information received to by the place of terminal
The server that reason request is sent to.
16. a kind of server, which is characterized in that the server includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors
Realize such as method as claimed in any one of claims 1 to 5.
17. a kind of server, which is characterized in that the server includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors
Realize the method as described in any in claim 6-13.
18. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
Such as method as claimed in any one of claims 1 to 5 is realized when execution.
19. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The method as described in any in claim 6-13 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710513211.9A CN109218341B (en) | 2017-06-29 | 2017-06-29 | Load balancing method and device for monitoring server and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710513211.9A CN109218341B (en) | 2017-06-29 | 2017-06-29 | Load balancing method and device for monitoring server and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109218341A true CN109218341A (en) | 2019-01-15 |
CN109218341B CN109218341B (en) | 2022-02-25 |
Family
ID=64960590
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710513211.9A Active CN109218341B (en) | 2017-06-29 | 2017-06-29 | Load balancing method and device for monitoring server and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109218341B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109688229A (en) * | 2019-01-24 | 2019-04-26 | 江苏中云科技有限公司 | Session keeps system under a kind of load balancing cluster |
CN111787048A (en) * | 2020-04-28 | 2020-10-16 | 北京沃东天骏信息技术有限公司 | Terminal device connection method, scheduling server and Internet of things system |
CN113051143A (en) * | 2019-12-27 | 2021-06-29 | 中国移动通信集团湖南有限公司 | Detection method, device, equipment and storage medium for service load balancing server |
CN113342665A (en) * | 2021-06-17 | 2021-09-03 | 北京百度网讯科技有限公司 | Task allocation method and device, electronic equipment and computer readable medium |
CN114338690A (en) * | 2021-12-30 | 2022-04-12 | 中国电信股份有限公司 | Server selection method and device and electronic equipment |
EP4167096A4 (en) * | 2021-06-17 | 2023-12-20 | Beijing Baidu Netcom Science Technology Co., Ltd. | Task allocation method and apparatus, electronic device, and computer readable medium |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1791113A (en) * | 2005-12-26 | 2006-06-21 | 北京航空航天大学 | Method for balancing gridding load |
CN101364930A (en) * | 2008-09-24 | 2009-02-11 | 深圳市金蝶中间件有限公司 | Session control method, apparatus and system |
CN101719082A (en) * | 2009-12-24 | 2010-06-02 | 中国科学院计算技术研究所 | Method and system for dispatching application requests in virtual calculation platform |
CN101754278A (en) * | 2008-12-16 | 2010-06-23 | 中国移动通信集团公司 | Method, system and device for load balancing |
US20100332657A1 (en) * | 2009-06-29 | 2010-12-30 | Red Hat Israel, Ltd. | Selecting a host from a host cluster for live migration of a virtual machine |
WO2011075131A1 (en) * | 2009-12-18 | 2011-06-23 | Hewlett-Packard Development Company, L.P. | Proxy agents in a network |
CN102244685A (en) * | 2011-08-11 | 2011-11-16 | 中国科学院软件研究所 | Distributed type dynamic cache expanding method and system supporting load balancing |
CN102480469A (en) * | 2010-11-29 | 2012-05-30 | 北京中和威软件有限公司 | Method and device for load balancing in SIP (session initiation protocol) service cluster based on energy balance |
CN102523158A (en) * | 2011-12-15 | 2012-06-27 | 杭州电子科技大学 | Metadata server cluster load balancing method based on weight |
US20120324071A1 (en) * | 2011-06-14 | 2012-12-20 | Vmware, Inc. | Managing resources in a distributed system using dynamic clusters |
CN102857577A (en) * | 2012-09-24 | 2013-01-02 | 北京联创信安科技有限公司 | System and method for automatic load balancing of cluster storage |
CN103188345A (en) * | 2013-03-01 | 2013-07-03 | 北京邮电大学 | Distributive dynamic load management system and distributive dynamic load management method |
CN103391299A (en) * | 2012-05-08 | 2013-11-13 | 深圳市腾讯计算机系统有限公司 | Load balance method and load balance system |
CN104023082A (en) * | 2014-06-23 | 2014-09-03 | 浪潮电子信息产业股份有限公司 | Method for achieving cluster load balance |
US20140258521A1 (en) * | 2009-12-31 | 2014-09-11 | Facebook, Inc. | Load Balancing Web Service by Rejecting Connections |
CN105099935A (en) * | 2015-07-28 | 2015-11-25 | 小米科技有限责任公司 | Server load control method and device |
US20160112503A1 (en) * | 2013-06-09 | 2016-04-21 | Hangzhou H3C Technologies Co., Ltd. | Load switch command including identification of source server cluster and target server cluster |
-
2017
- 2017-06-29 CN CN201710513211.9A patent/CN109218341B/en active Active
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1791113A (en) * | 2005-12-26 | 2006-06-21 | 北京航空航天大学 | Method for balancing gridding load |
CN101364930A (en) * | 2008-09-24 | 2009-02-11 | 深圳市金蝶中间件有限公司 | Session control method, apparatus and system |
CN101754278A (en) * | 2008-12-16 | 2010-06-23 | 中国移动通信集团公司 | Method, system and device for load balancing |
US20100332657A1 (en) * | 2009-06-29 | 2010-12-30 | Red Hat Israel, Ltd. | Selecting a host from a host cluster for live migration of a virtual machine |
WO2011075131A1 (en) * | 2009-12-18 | 2011-06-23 | Hewlett-Packard Development Company, L.P. | Proxy agents in a network |
CN101719082A (en) * | 2009-12-24 | 2010-06-02 | 中国科学院计算技术研究所 | Method and system for dispatching application requests in virtual calculation platform |
US20140258521A1 (en) * | 2009-12-31 | 2014-09-11 | Facebook, Inc. | Load Balancing Web Service by Rejecting Connections |
CN102480469A (en) * | 2010-11-29 | 2012-05-30 | 北京中和威软件有限公司 | Method and device for load balancing in SIP (session initiation protocol) service cluster based on energy balance |
US20120324071A1 (en) * | 2011-06-14 | 2012-12-20 | Vmware, Inc. | Managing resources in a distributed system using dynamic clusters |
CN102244685A (en) * | 2011-08-11 | 2011-11-16 | 中国科学院软件研究所 | Distributed type dynamic cache expanding method and system supporting load balancing |
CN102523158A (en) * | 2011-12-15 | 2012-06-27 | 杭州电子科技大学 | Metadata server cluster load balancing method based on weight |
CN103391299A (en) * | 2012-05-08 | 2013-11-13 | 深圳市腾讯计算机系统有限公司 | Load balance method and load balance system |
CN102857577A (en) * | 2012-09-24 | 2013-01-02 | 北京联创信安科技有限公司 | System and method for automatic load balancing of cluster storage |
CN103188345A (en) * | 2013-03-01 | 2013-07-03 | 北京邮电大学 | Distributive dynamic load management system and distributive dynamic load management method |
US20160112503A1 (en) * | 2013-06-09 | 2016-04-21 | Hangzhou H3C Technologies Co., Ltd. | Load switch command including identification of source server cluster and target server cluster |
CN104023082A (en) * | 2014-06-23 | 2014-09-03 | 浪潮电子信息产业股份有限公司 | Method for achieving cluster load balance |
CN105099935A (en) * | 2015-07-28 | 2015-11-25 | 小米科技有限责任公司 | Server load control method and device |
Non-Patent Citations (2)
Title |
---|
姚全珠等: "基于模糊逻辑技术的中间件负载平衡机制", 《计算机工程》 * |
雷迎春等: "Research on Scheduling Algorithms in Web Cluster Servers", 《JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109688229A (en) * | 2019-01-24 | 2019-04-26 | 江苏中云科技有限公司 | Session keeps system under a kind of load balancing cluster |
CN113051143A (en) * | 2019-12-27 | 2021-06-29 | 中国移动通信集团湖南有限公司 | Detection method, device, equipment and storage medium for service load balancing server |
CN111787048A (en) * | 2020-04-28 | 2020-10-16 | 北京沃东天骏信息技术有限公司 | Terminal device connection method, scheduling server and Internet of things system |
CN111787048B (en) * | 2020-04-28 | 2023-08-04 | 北京沃东天骏信息技术有限公司 | Connection method of terminal equipment, scheduling server and Internet of things system |
CN113342665A (en) * | 2021-06-17 | 2021-09-03 | 北京百度网讯科技有限公司 | Task allocation method and device, electronic equipment and computer readable medium |
CN113342665B (en) * | 2021-06-17 | 2023-10-20 | 北京百度网讯科技有限公司 | Task allocation method and device, electronic equipment and computer readable medium |
EP4167096A4 (en) * | 2021-06-17 | 2023-12-20 | Beijing Baidu Netcom Science Technology Co., Ltd. | Task allocation method and apparatus, electronic device, and computer readable medium |
CN114338690A (en) * | 2021-12-30 | 2022-04-12 | 中国电信股份有限公司 | Server selection method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN109218341B (en) | 2022-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109218341A (en) | For monitoring server and for the load-balancing method and device of server | |
CN108182111A (en) | Task scheduling system, method and apparatus | |
CN106533932B (en) | A kind of method and apparatus for pushing instant message | |
CN105376111B (en) | Resource allocation methods and device | |
CN109257320A (en) | Message storage method and device | |
CN109033001A (en) | Method and apparatus for distributing GPU | |
CN109995877A (en) | Information-pushing method and device | |
CN107247629A (en) | Cloud computing system and cloud computing method and device for controlling server | |
CN108933822B (en) | Method and apparatus for handling information | |
CN109542352A (en) | Method and apparatus for storing data | |
CN110007936A (en) | Data processing method and device | |
CN109992406A (en) | The method and client that picture requesting method, response picture are requested | |
CN110533457A (en) | A kind of advertisement push system, method and server | |
CN108933695A (en) | Method and apparatus for handling information | |
CN110377440A (en) | Information processing method and device | |
CN109240802A (en) | request processing method and device | |
CN108664510A (en) | Information acquisition method and device | |
CN109413056A (en) | Method and apparatus for handling information | |
CN102404388B (en) | A kind of load sharing method of application virtualization and device | |
CN113778499B (en) | Method, apparatus, device and computer readable medium for publishing services | |
CN109597912A (en) | Method for handling picture | |
CN109379179A (en) | Method and apparatus for updating digital certificate | |
CN108959102A (en) | Method and apparatus for generating test data, test application to be tested | |
CN109842665A (en) | Task processing method and device for task distribution server | |
CN110113176A (en) | Information synchronization method and device for configuration server |
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 |