CN105791148B - System and method for automatically balancing server load - Google Patents
System and method for automatically balancing server load Download PDFInfo
- Publication number
- CN105791148B CN105791148B CN201410835012.6A CN201410835012A CN105791148B CN 105791148 B CN105791148 B CN 105791148B CN 201410835012 A CN201410835012 A CN 201410835012A CN 105791148 B CN105791148 B CN 105791148B
- Authority
- CN
- China
- Prior art keywords
- server
- client
- performance
- threshold
- threshold value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000011056 performance test Methods 0.000 claims abstract description 13
- 238000012545 processing Methods 0.000 claims description 17
- 238000012360 testing method Methods 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000008859 change Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000002349 favourable effect Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a method for automatically balancing server load, a server, a client and a system for automatically balancing server load, wherein the method comprises the following steps: when a client accesses a server for the first time, registering the client through the server, sending a performance test code to the client, and acquiring and recording a performance score of the client; when the client accesses the server, judging whether the server reaches an operation threshold value, if so, judging whether the server reaches the operation threshold value; judging whether the performance score of the client is larger than a performance threshold value; when the performance score of the client is judged to be larger than the performance threshold value, a part of operations of the server are distributed to the client for execution. By the technical scheme, the client machines with different performances can be guaranteed to obtain basically the same use experience, and the load of the server is automatically balanced.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method for automatically balancing server load, a server, a client and a system for automatically balancing server load.
Background
In the traditional B/S (Browser/Server) software, all the arithmetic processing is executed at the Server side, and the client side obtains the operation result of the Server and performs display and interaction. Thus, as the number of clients increases, the computational burden on the server increases, and increased configuration is required.
However, the current practical situation is that the computing power of the client is continuously increasing, and a part of the computing work can be borne without reducing the user experience. Therefore, some B/S programs are designed to execute partial operations on the client, but the machine performance of the client is very different, and some clients with low performance can greatly reduce the user experience after additionally undertaking the operation work, so that the machine performance loss of the client is very large.
Therefore, a new method for automatically balancing server load is needed, which can ensure that client machines with different performances obtain basically the same use experience, and simultaneously, realize automatic balancing of server load, save resources and improve user experience.
Disclosure of Invention
Based on the problems, the invention provides a new technical scheme, which can effectively ensure that client machines with different performances obtain basically the same use experience, simultaneously realize automatic balancing of server load, and improve user experience while saving resources.
In view of the above, an aspect of the present invention provides a method for automatically balancing server loads, including: when a client accesses a server for the first time, registering the client through the server, sending a performance test code to the client, and acquiring and recording a performance score of the client; when the client accesses the server, judging whether the server reaches an operation threshold value, if so, judging whether the server reaches the operation threshold value; judging whether the performance score of the client is larger than a performance threshold value; when the performance score of the client is judged to be larger than the performance threshold value, a part of operations of the server are distributed to the client for execution.
In the technical scheme, when the client accesses the server for the first time, the performance of the client is tested, the test result is recorded, and when the load of the server exceeds the operation threshold, a part of operation is distributed to the client with the performance test result score larger than the preset performance threshold to be executed, so that the client machines with different performances can be effectively ensured to obtain basically the same use experience, the request sent to the server can be responded timely, the automatic balance of the server load is realized, and the user experience is improved while the resources are saved.
In the above technical solution, preferably, the method further includes: setting the operational threshold and the performance threshold of the server.
In the technical scheme, effective and accurate reference can be provided for automatically balancing the load of the server and ensuring that client machines with different performances obtain basically the same use experience by setting the operation threshold of the server and the performance threshold for judging the performances of the client.
In the above technical solution, preferably, the operation threshold and the performance threshold may be modified. In the technical scheme, the operation threshold and the performance threshold can be adaptively modified according to the change of the performance of the server and the client, so that the effect of automatically balancing the load of the server can be effectively ensured, and the resources are fully and efficiently utilized.
In the above technical solution, preferably, the method further includes: and when the performance score of the client is judged to be less than or equal to the performance threshold, the requests of the client are arranged into a waiting queue in a time sequence, and the server is waited for processing.
In the technical scheme, when the performance score of the client is smaller than or equal to the performance threshold, the request of the client is arranged in a waiting queue to wait for the server to process, the client with low performance is not involved in operation, and the client machines with different performances can be effectively ensured to obtain basically the same user experience.
In the above technical solution, preferably, the method further includes: and when the server does not reach the operation threshold value, executing operation through the server and immediately processing the request of the client.
In the technical scheme, when the load does not exceed the budget threshold of the server, the server executes operation to quickly respond to the request of the client, so that the use experience of a user is ensured.
According to a second aspect of the present invention, there is provided a server comprising: the storage module is used for registering the client when the client accesses the server for the first time, sending a performance test code to the client and acquiring and recording the performance score of the client; the judging module is used for judging whether the server reaches an operation threshold value or not, and judging whether the performance score of the client is larger than the performance threshold value or not when the server is judged to reach the operation threshold value; and the distribution module distributes part of calculation of the server to the client for execution when judging that the performance score of the client is greater than the performance threshold.
In the technical scheme, when the client accesses the server for the first time, the performance of the client is tested, the test result is recorded, and when the load of the server exceeds the operation threshold, a part of operation is distributed to the client with the performance test result score larger than the preset performance threshold to be executed, so that the client machines with different performances can be effectively ensured to obtain basically the same use experience, the request sent to the server can be responded timely, the automatic balance of the server load is realized, and the user experience is improved while the resources are saved.
In the above technical solution, preferably, the method further includes: the server side processing module is used for executing operation and immediately processing the request of the client when the server does not reach the operation threshold; and a setting module for setting the operation threshold and the performance threshold of the server.
In the technical scheme, when the load does not exceed the budget threshold of the server, the server executes operation to quickly respond to the request of the client so as to ensure the use experience of a user; by setting the operation threshold of the server and the performance threshold for judging the performance of the client, effective and accurate reference can be provided for automatically balancing the load of the server and ensuring that client machines with different performances obtain basically the same use experience.
In the above technical solution, preferably, the operation threshold and the performance threshold may be modified. In the technical scheme, the operation threshold and the performance threshold can be adaptively modified according to the change of the performance of the server and the client, so that the effect of automatically balancing the load of the server can be effectively ensured, and the resources are fully and efficiently utilized.
In the foregoing technical solution, preferably, the storage module is further configured to, when it is determined that the performance score of the client is smaller than or equal to the performance threshold, arrange requests of the client into a waiting queue in chronological order, and wait for the server to process the requests.
In the technical scheme, when the performance score of the client is smaller than or equal to the performance threshold, the request of the client is arranged in a waiting queue to wait for the server to process, the client with low performance is not involved in operation, and the client machines with different performances can be effectively ensured to obtain basically the same user experience.
According to a third aspect of the present invention, there is provided a client, comprising: a testing module, configured to execute a performance testing code from the server according to any one of the above technical solutions, record a performance score of the client, and send the performance score to the server; a client side processing module for performing the operations distributed by the server.
In the technical scheme, the test module is arranged to execute the performance test codes, the test results are recorded and provided for the server, and the client processing module is arranged to execute the operation, so that the necessary and favorable guarantee is provided for ensuring that client machines with different performances obtain basically the same use experience and automatically balancing the server load.
According to a fourth aspect of the present invention, a system for automatically balancing server loads is provided, which is used for automatically balancing server loads, and includes the server according to any one of the above technical solutions, and the client according to the above technical solutions.
In the technical scheme, the system for automatically balancing the server load can effectively ensure that client machines with different performances obtain basically the same use experience, simultaneously realizes automatic balancing of the server load, and improves user experience while saving resources.
By the technical scheme, the client machines with different performances can be effectively guaranteed to obtain basically the same use experience, automatic balancing of server load is realized, and user experience is improved while resources are saved.
Drawings
FIG. 1 shows a method flow diagram illustration of an automated balancing server according to one embodiment of the invention;
FIG. 2 shows a schematic structural diagram of a server according to one embodiment of the invention;
FIG. 3 shows a schematic structural diagram of a client according to an embodiment of the invention;
fig. 4 shows a system architecture diagram for automatically balancing server load according to an embodiment of the present invention.
Detailed Description
So that the manner in which the above recited objects, features and advantages of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to the embodiments thereof which are illustrated in the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
FIG. 1 shows a method flow diagram representation of an automated balancing server according to one embodiment of the invention.
As shown in fig. 1, a method for automatically balancing servers according to an embodiment of the present invention includes: step 102, when a client accesses a server for the first time, registering the client through the server, sending a performance test code to the client, and acquiring and recording a performance score of the client; step 104, when the client accesses the server, judging whether the server reaches an operation threshold value, if so; step 106, judging whether the performance score of the client is larger than a performance threshold value; and step 108, when the performance score of the client is judged to be larger than the performance threshold, distributing a part of calculation to the client by the server for execution.
In the technical scheme, when the client accesses the server for the first time, the performance of the client is tested, the test result is recorded, and when the load of the server exceeds the operation threshold, a part of operation is distributed to the client with the performance test result score larger than the preset performance threshold to be executed, so that the client machines with different performances can be effectively ensured to obtain basically the same use experience, the request sent to the server can be responded timely, the automatic balance of the server load is realized, and the user experience is improved while the resources are saved.
In the above technical solution, preferably, the method further includes: setting the operational threshold and the performance threshold of the server.
In the technical scheme, effective and accurate reference can be provided for automatically balancing the load of the server and ensuring that client machines with different performances obtain basically the same use experience by setting the operation threshold of the server and the performance threshold for judging the performances of the client.
In the above technical solution, preferably, the operation threshold and the performance threshold may be modified. In the technical scheme, the operation threshold and the performance threshold can be adaptively modified according to the change of the performance of the server and the client, so that the effect of automatically balancing the load of the server can be effectively ensured, and the resources are fully and efficiently utilized.
In the above technical solution, preferably, the method further includes: and when the performance score of the client is judged to be less than or equal to the performance threshold, the requests of the client are arranged into a waiting queue in a time sequence, and the server is waited for processing.
In the technical scheme, when the performance score of the client is smaller than or equal to the performance threshold, the request of the client is arranged in a waiting queue to wait for the server to process, the client with low performance is not involved in operation, and the client machines with different performances can be effectively ensured to obtain basically the same user experience.
In the above technical solution, preferably, the method further includes: and when the server does not reach the operation threshold value, executing operation through the server and immediately processing the request of the client.
In the technical scheme, when the load does not exceed the budget threshold of the server, the server executes operation to quickly respond to the request of the client, so that the use experience of a user is ensured.
Fig. 2 shows a schematic structural diagram of a server according to an embodiment of the present invention.
As shown in fig. 2, a server 200 according to an embodiment of the present invention, a storage module 202, configured to register a client when the client accesses the server 200 for the first time, send a performance test code to the client, and obtain and record a performance score of the client; a determining module 204, configured to determine whether the server 200 reaches an operation threshold, and when determining that the server 200 reaches the operation threshold, determine whether the performance score of the client is greater than the performance threshold; and an assigning module 206, configured to assign a part of the operations of the server 200 to the client for execution when it is determined that the performance score of the client is greater than the performance threshold.
In the technical scheme, when the client accesses the server 200 for the first time, the performance of the client is tested, the test result is recorded, and when the load of the server 200 exceeds the operation threshold, a part of operation is distributed to the client with the performance test result score larger than the preset performance threshold to be executed, so that the client machines with different performances can be effectively ensured to obtain basically same use experience, the request sent to the server 200 can be responded timely, meanwhile, the automatic balancing of the load of the server 200 is realized, and the user experience is improved while the resources are saved.
In the above technical solution, preferably, the method further includes: a server-side processing module 208, configured to execute an operation and immediately process the request of the client when the server 200 does not reach the operation threshold; and a setting module 210, configured to set the operation threshold and the performance threshold of the server 200.
In the technical scheme, when the load does not exceed the budget threshold of the server 200, the server 200 executes operation to quickly respond to the request of the client, so as to ensure the use experience of the user; by setting the operation threshold of the server 200 and the performance threshold for judging the performance of the client, an effective and accurate reference can be provided for automatically balancing the load of the server 200 and ensuring that client machines with different performances obtain basically the same use experience.
In the above technical solution, preferably, the operation threshold and the performance threshold may be modified. In the technical scheme, the operation threshold and the performance threshold can be adaptively modified according to the change of the performance of the server 200 and the client, so that the effect of automatically balancing the load of the server 200 can be effectively ensured, and further, resources are fully and efficiently utilized.
In the foregoing technical solution, preferably, the storage module 202 is further configured to, when it is determined that the performance score of the client is smaller than or equal to the performance threshold, arrange requests of the client into a waiting queue in chronological order, and wait for the server 200 to process the requests.
In the technical scheme, when the performance score of the client is smaller than or equal to the performance threshold, the request of the client is arranged in a waiting queue to wait for the server 200 to process, so that the low-performance client is not involved in operation, and the client machines with different performances can be effectively ensured to obtain basically the same user experience.
Fig. 3 shows a schematic structural diagram of a client according to an embodiment of the present invention.
As shown in fig. 3, a client 300 according to an embodiment of the present invention includes: a testing module 302, configured to execute a performance testing code from the server according to any of the above technical solutions, record a performance score of the client 300, and send the performance score to the server; a client side processing module 304 for performing the operations distributed by the server.
In the technical scheme, the test module 302 is arranged to execute the performance test codes, record and provide the test results to the server, and the client processing module 304 is arranged to execute the operation, so that necessary and favorable guarantee is provided for ensuring that client machines with different performances obtain basically the same use experience and automatically balancing server load.
Fig. 4 shows a system architecture diagram for automatically balancing server load according to an embodiment of the present invention.
As shown in fig. 4, a system 400 for automatically balancing server load according to an embodiment of the present invention includes a server 200 according to any of the above embodiments, and a client 300 according to the above embodiments.
In the technical solution, by the system 400 for automatically balancing server loads, it can be effectively ensured that the clients 300 with different performances obtain substantially the same use experience, and meanwhile, the automatic balancing of the server 200 loads is realized, and the user experience is improved while resources are saved.
The technical scheme of the invention is described in detail in combination with the attached drawings, so that the client machines with different performances can be effectively ensured to obtain basically the same use experience, meanwhile, the automatic balancing of the server load is realized, and the user experience is improved while the resources are saved.
In the description of the present specification, the description of the terms "one embodiment," "a specific embodiment," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (9)
1. A method for automatically balancing server load, comprising:
when a client accesses a server for the first time, registering the client through the server, sending a performance test code to the client, and acquiring and recording a performance score of the client;
when the client accesses the server, judging whether the server reaches an operation threshold value, if so, judging whether the server reaches the operation threshold value;
judging whether the performance score of the client is larger than a performance threshold value;
when the performance score of the client is judged to be larger than the performance threshold value, the server distributes a part of operation to the client for execution.
2. The method for automatically balancing server load according to claim 1, further comprising:
setting the operational threshold and the performance threshold of the server.
3. The method for automatically balancing server load according to claim 1 or 2, further comprising:
and when the performance score of the client is judged to be less than or equal to the performance threshold, the requests of the client are arranged into a waiting queue in a time sequence, and the server is waited for processing.
4. The method for automatically balancing server load according to claim 1 or 2, further comprising: and when the server does not reach the operation threshold value, executing operation through the server and immediately processing the request of the client.
5. A server, comprising:
the storage module is used for registering the client when the client accesses the server for the first time, sending a performance test code to the client and acquiring and recording the performance score of the client;
the judging module is used for judging whether the server reaches an operation threshold value or not, and judging whether the performance score of the client is larger than the performance threshold value or not when the server is judged to reach the operation threshold value;
and the distribution module distributes part of calculation of the server to the client for execution when judging that the performance score of the client is greater than the performance threshold.
6. The server of claim 5, further comprising:
the server side processing module is used for executing operation and immediately processing the request of the client when the server does not reach the operation threshold; and
a setting module for setting the operation threshold and the performance threshold of the server.
7. The server according to claim 5 or 6, wherein the storage module is further configured to, when the performance score of the client is determined to be less than or equal to the performance threshold, arrange the requests of the client into a waiting queue in chronological order, and wait for the server to process.
8. A client, comprising:
a testing module for executing performance testing code from the server of any one of claims 5 to 7 and recording a performance score for the client and sending the performance score to the server;
a client side processing module for performing the operations distributed by the server.
9. A system for automatically balancing server load, comprising a server according to any one of claims 5 to 7 and a client according to claim 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410835012.6A CN105791148B (en) | 2014-12-26 | 2014-12-26 | System and method for automatically balancing server load |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410835012.6A CN105791148B (en) | 2014-12-26 | 2014-12-26 | System and method for automatically balancing server load |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105791148A CN105791148A (en) | 2016-07-20 |
CN105791148B true CN105791148B (en) | 2020-07-03 |
Family
ID=56389098
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410835012.6A Active CN105791148B (en) | 2014-12-26 | 2014-12-26 | System and method for automatically balancing server load |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105791148B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107978312A (en) * | 2016-10-24 | 2018-05-01 | 阿里巴巴集团控股有限公司 | The method, apparatus and system of a kind of speech recognition |
CN107666515B (en) * | 2017-09-20 | 2019-07-09 | Oppo广东移动通信有限公司 | Image processing method and device, computer equipment, computer readable storage medium |
CN108111913B (en) * | 2017-12-22 | 2021-08-27 | 北京奇艺世纪科技有限公司 | Live video stream generation method and device and electronic equipment |
CN110881058B (en) * | 2018-09-06 | 2022-04-12 | 阿里巴巴集团控股有限公司 | Request scheduling method, device, server and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7428588B2 (en) * | 2004-04-08 | 2008-09-23 | International Business Machines Corporation | Method for distributing and geographically load balancing location aware communication device client-proxy applications |
CN101695049A (en) * | 2009-11-10 | 2010-04-14 | 杭州华三通信技术有限公司 | Method and device for processing businesses in monitoring system |
CN101815033A (en) * | 2010-03-12 | 2010-08-25 | 成都市华为赛门铁克科技有限公司 | Method, device and system for load balancing |
CN102523107A (en) * | 2011-12-02 | 2012-06-27 | 中兴通讯股份有限公司 | Method and device for equalizing operating pressure of server side and client side of network management system |
CN102833257A (en) * | 2012-08-31 | 2012-12-19 | 北京小米科技有限责任公司 | Operation request queuing method, associated equipment and system |
-
2014
- 2014-12-26 CN CN201410835012.6A patent/CN105791148B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7428588B2 (en) * | 2004-04-08 | 2008-09-23 | International Business Machines Corporation | Method for distributing and geographically load balancing location aware communication device client-proxy applications |
CN101695049A (en) * | 2009-11-10 | 2010-04-14 | 杭州华三通信技术有限公司 | Method and device for processing businesses in monitoring system |
CN101815033A (en) * | 2010-03-12 | 2010-08-25 | 成都市华为赛门铁克科技有限公司 | Method, device and system for load balancing |
CN102523107A (en) * | 2011-12-02 | 2012-06-27 | 中兴通讯股份有限公司 | Method and device for equalizing operating pressure of server side and client side of network management system |
CN102833257A (en) * | 2012-08-31 | 2012-12-19 | 北京小米科技有限责任公司 | Operation request queuing method, associated equipment and system |
Also Published As
Publication number | Publication date |
---|---|
CN105791148A (en) | 2016-07-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9465660B2 (en) | Performing a task in a system having different types of hardware resources | |
US9413683B2 (en) | Managing resources in a distributed system using dynamic clusters | |
US9354952B2 (en) | Application-driven shared device queue polling | |
Raghava et al. | Comparative study on load balancing techniques in cloud computing | |
US10382535B2 (en) | Pairwise comparison for load balancing | |
TWI559153B (en) | Distributed computing framework | |
US9749401B2 (en) | Intelligent load balancer selection in a multi-load balancer environment | |
US8312195B2 (en) | Managing interrupts using a preferred binding between a device generating interrupts and a CPU | |
US20170046189A1 (en) | Method for Scheduling VM Resource, Apparatus, and System | |
US9009702B2 (en) | Application-driven shared device queue polling in a virtualized computing environment | |
CN105791148B (en) | System and method for automatically balancing server load | |
US20110029969A1 (en) | Altruistic dependable memory overcommit for virtual machines | |
US8910128B2 (en) | Methods and apparatus for application performance and capacity analysis | |
US9934059B2 (en) | Flow migration between virtual network appliances in a cloud computing network | |
Batista et al. | Performance evaluation of resource management in cloud computing environments | |
JP2011509478A5 (en) | ||
US9201823B2 (en) | Pessimistic interrupt affinity for devices | |
US20160124762A1 (en) | Guest idle based vm request completion processing | |
US20130054860A1 (en) | Optimistic interrupt affinity for devices | |
CN111090511A (en) | Task processing method and device and computer readable storage medium | |
Tiwari et al. | Dynamic weighted virtual machine live migration mechanism to manages load balancing in cloud computing | |
GB2480764A (en) | Load balancing traffic manager for multiple server cluster with multiple parallel queues running substantially independently | |
RU2696299C2 (en) | Control when initiating elementary tasks on server platform | |
US10616317B2 (en) | Method and system for affinity load balancing | |
CN103095786B (en) | Online service request recognition methods, system, server and line server cluster |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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 | ||
PP01 | Preservation of patent right |
Effective date of registration: 20240202 Granted publication date: 20200703 |
|
PP01 | Preservation of patent right |