CN111614763A - Method, equipment and storage medium for dynamically adjusting load of application server - Google Patents
Method, equipment and storage medium for dynamically adjusting load of application server Download PDFInfo
- Publication number
- CN111614763A CN111614763A CN202010436312.2A CN202010436312A CN111614763A CN 111614763 A CN111614763 A CN 111614763A CN 202010436312 A CN202010436312 A CN 202010436312A CN 111614763 A CN111614763 A CN 111614763A
- Authority
- CN
- China
- Prior art keywords
- server
- application server
- priority
- load
- adjusting
- 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
Images
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/1004—Server selection for load balancing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0668—Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention discloses a method, a device and a storage medium for dynamically adjusting the load of an application server, comprising the following steps: integrating a plurality of application servers in a designated environment, and adjusting the priority of all the application servers to be 255; monitoring the state of the application server, and judging whether the performance index of the application server reaches a specified threshold value; if the result is reached, the application server is a load server and controls firewall to shield or open a VRRP protocol message; if not, adjusting the application server to be a standby server, controlling firewall through the script, starting receiving of the VRRP protocol message, and adjusting the priority of the standby server to 0; and judging whether the performance index of the standby server is recovered to a specified threshold value, if so, starting the standby server, adjusting the standby server to be a load server, controlling firewall through a script, closing the receiving of the VRRP protocol message, and adjusting the priority of the load server to 255. The invention can dynamically adjust the running state of the application server according to the performance index of the application server.
Description
Technical Field
The invention relates to the technical field of information processing, in particular to a method, equipment and a storage medium for processing communication abnormity of an intelligent lock.
Background
As the number of distributed system server users increases, the amount of distributed system server access and data traffic increases rapidly, and the processing power and computational intensity required by the servers increases accordingly. Although many studies are made in terms of load balancing, distributed services, and the like, there still remains a problem that a server cannot satisfy high concurrency and the like.
The existing mainstream technical scheme aiming at the network high available load balance comprises lvs, nginx, haprox and the like, and is suitable for large-scale application scenes. But a server with 50% redundancy is required as a hot standby, and it is difficult to adjust the application server according to the state of the server itself. When the main server fails, the whole system is broken down. The system is difficult to dynamically adjust the application server according to the self state of the server and cannot cope with unexpected situations.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the objectives of the present invention is to provide a method for dynamically adjusting the load of an application server, which can dynamically adjust the running state of the application server according to the performance index of the application server in the current state, and fully utilize the resources of the server.
Another object of the present invention is to provide a device for executing a method step of dynamically adjusting the load of an application server, which can dynamically adjust the running state of the application server according to the performance index of the application server in the current state, thereby fully utilizing the resources of the server.
It is a further object of the present invention to provide a storage medium for executing the method steps of dynamically adjusting the load of an application server, which can dynamically adjust the running state of the application server according to the performance index of the application server in the current state, thereby fully utilizing the resources of the server.
One of the purposes of the invention is realized by adopting the following technical scheme:
a method for dynamically adjusting the load of an application server is characterized by comprising the following steps:
step S1, integrating multiple application servers in the designated environment, and adjusting the priority of all application servers to a first priority;
step S2, monitoring the state of the application server, and judging whether the performance index of the application server in the current state reaches a specified threshold value; if the specified threshold value is reached, the application server is a load server and controls firewall to shield or open a VRRP protocol message; if the specified threshold value is not reached, executing step S3;
step S3, the application server is adjusted to be a standby server, firewall is controlled through scripts, the receiving of VRRP protocol messages is started, and the priority of the standby server is adjusted to be a second priority;
step S4, judging whether the performance index of the standby server is restored to the designated threshold value, if so, starting the standby server, adjusting the standby server to be a load server, controlling firewall through a script, closing the receiving of the VRRP protocol message, and adjusting the priority of the load server to be a first priority.
Further, still include: step S5, if the standby server is needed to be heated or the load server is stopped, controlling firewall through the script, starting the receiving of the VRRP protocol message, and adjusting the priority of the standby server or the load server to the second priority.
Further, the first priority is 255; the second priority is 0.
Further, the script is a lua script, and all application servers are provided with the script.
Further, the state of the application server is monitored through the lua script.
Further, the performance index of the application server in the current state includes a cpu, a memory, a disk, and a network of the application server.
Further, the server is based on keepalived and is implemented in a linux environment.
The second purpose of the invention is realized by adopting the following technical scheme:
an apparatus comprising a plurality of processors, a memory, and a computer program stored on the memory and executable on the processors, the processors when executing the computer program implementing a method of dynamically adjusting application server load as described above.
The third purpose of the invention is realized by adopting the following technical scheme:
a storage medium having stored thereon a computer program which, when executed, implements a method of dynamically adjusting application server load as described above.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a method, equipment and a storage medium for dynamically adjusting the load of an application server, which can dynamically adjust the running state of the application server according to a plurality of performance indexes of the application server in the current state, fully utilize the resources of the application server, avoid the problem that the whole system is paralyzed due to the failure of the traditional main server, and improve the capability of coping with emergency situations.
Drawings
Fig. 1 is a schematic flow chart of a first embodiment of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example one
As shown in fig. 1, the present invention provides a method for dynamically adjusting the load of an application server, which can dynamically adjust the running state of the application server according to various performance indicators of the application server in the current state. The method specifically comprises the following steps:
step S1, integrating the plurality of application servers in the designated environment, and adjusting the priority of all application servers to the first priority. The specified environment refers to the integration of all application servers into a keepalived and is based on a linux environment. keepalived cluster management software is a software similar to layer3,4&5 switching mechanism that detects the state of web servers. If one application server fails, keepalived monitors and eliminates the application server with failure from the system. After the application server returns to work normally, keepalived automatically adds the application server into the server group without manual intervention. And adjusting the priority of all the application servers to a first priority, wherein the first priority is 255.
Step S2, monitoring the state of the application server, and judging whether the performance index of the application server in the current state reaches a specified threshold value; if the threshold value reaches the designated threshold value, the application server is a load server and controls a firewall (firewall) to shield or open a VRRP protocol message; if the specified threshold value is not reached, step S3 is executed. Each application server is written with a lua script, and the state of the application server is monitored through the lua script. And judging whether the application server reaches a specified threshold value or not according to a plurality of performance indexes in the current state. Specifically, the performance index includes a cpu, a memory, a disk, a network thereof, and the like of the application server. When the performance index of the application server reaches a specified threshold value, the performance of the application server meets the load requirement, the application server is set as a load server, and the firewall is controlled to shield or open a VRRP protocol message through an lua script. VRRP is a fault-tolerant protocol, which combines several router devices to form a virtual router device, and ensures that when the next hop device of the host fails, the service can be switched to other devices in time through a certain mechanism. And the message passing through the VRRP protocol is encapsulated by using an IP multicast data packet, and the distribution range is limited to the same local area network.
And step S3, adjusting the application server to a standby server, controlling firewall or starting the receiving of the VRRP protocol message through a script, and adjusting the priority of the standby server to a second priority. If the application server is a standby server, if the performance of the application server is reduced and each index does not reach a specified threshold value, the application server is deactivated and is adjusted to be the standby server, firewall is controlled through the lua script, the receiving of the VRRP protocol message is started, and the priority of the standby server keepalived is adjusted to 0, namely the second priority.
And step S4, judging whether the performance index of the standby server is restored to a designated threshold value, if so, starting the standby server, adjusting the standby server to be a load server, and adjusting the priority of the load server to be a first priority. If the performance index of the standby server is recovered, the standby server can be started, the standby server is adjusted to be a load server, firewall is controlled through the lua script, the receiving of VRRP protocol messages is closed, and the priority of the keepalived load server is adjusted to 255.
Further, the method includes step S5, if the standby server is needed to be warmed or the load server is disabled, controlling firewall through the lua script, starting receiving the VRRP protocol message, and adjusting the priority of the standby server or the load server to the second priority.
In summary, the present invention provides a method for dynamically adjusting an application server load, which can dynamically adjust an operating state of an application server according to a plurality of performance indicators of the application server in a current state, fully utilize resources of the application server, avoid a problem of a whole system shutdown caused by a failure of a traditional main server, improve an ability to cope with an emergency, and is suitable for being applied to a small-sized high-available-load application scenario.
Example two
An electronic device comprising a memory, a processor, and a program stored in the memory, the program being configured to be executed by the processor, the program, when executed by the processor, performing the above method steps of dynamically adjusting the load of an application server.
In addition, the present invention also provides a storage medium, which stores a computer program, and the computer program realizes the method steps of dynamically adjusting the load of the application server when being executed by a processor. The invention is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The apparatus in this embodiment and the method in the foregoing embodiment are based on two aspects of the same inventive concept, and the method implementation process has been described in detail in the foregoing, so that those skilled in the art can clearly understand the structure and implementation process of the system in this embodiment according to the foregoing description, and for the sake of brevity of the description, details are not repeated here.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.
Claims (9)
1. A method for dynamically adjusting the load of an application server is characterized by comprising the following steps:
step S1, integrating multiple application servers in the designated environment, and adjusting the priority of all application servers to a first priority;
step S2, monitoring the state of the application server, and judging whether the performance index of the application server in the current state reaches a specified threshold value; if the specified threshold value is reached, the application server is a load server and controls firewall to shield or open a VRRP protocol message; if the specified threshold value is not reached, executing step S3;
step S3, the application server is adjusted to be a standby server, firewall is controlled through scripts, the receiving of VRRP protocol messages is started, and the priority of the standby server is adjusted to be a second priority;
step S4, judging whether the performance index of the standby server is restored to the designated threshold value, if so, starting the standby server, adjusting the standby server to be a load server, controlling firewall through a script, closing the receiving of the VRRP protocol message, and adjusting the priority of the load server to be a first priority.
2. The method of claim 1, further comprising: step S5, if the standby server is needed to be heated or the load server is stopped, controlling firewall through the script, starting the receiving of the VRRP protocol message, and adjusting the priority of the standby server or the load server to the second priority.
3. The method of claim 2, wherein the first priority is 255; the second priority is 0.
4. The method of claim 2, wherein the script is a lua script, and all application servers are provisioned with the script.
5. The method of claim 4, wherein the application server state is monitored by the lua script.
6. The method according to claim 2, wherein the performance indicators of the current state of the application server include cpu, memory, disk, and network of the application server.
7. The method of claim 6, wherein the server is based on keepalived and implemented in linux environment.
8. An apparatus comprising a plurality of processors, a memory, and a computer program stored on the memory and executable on the processors, the processors implementing a method for dynamically adjusting application server load as claimed in any one of claims 1 to 7 when executing the computer program.
9. A storage medium having stored thereon a computer program which, when executed, implements a method of dynamically adjusting application server load as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010436312.2A CN111614763B (en) | 2020-05-21 | 2020-05-21 | Method, equipment and storage medium for dynamically adjusting load of application server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010436312.2A CN111614763B (en) | 2020-05-21 | 2020-05-21 | Method, equipment and storage medium for dynamically adjusting load of application server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111614763A true CN111614763A (en) | 2020-09-01 |
CN111614763B CN111614763B (en) | 2023-04-07 |
Family
ID=72202220
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010436312.2A Active CN111614763B (en) | 2020-05-21 | 2020-05-21 | Method, equipment and storage medium for dynamically adjusting load of application server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111614763B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030200333A1 (en) * | 2002-03-28 | 2003-10-23 | International Business Machines Corporation | Method of load balancing traffic among routers in a data transmission system |
CN101404621A (en) * | 2008-11-24 | 2009-04-08 | 杭州华三通信技术有限公司 | Method and routing device for implementing VRRP load balance |
CN104901882A (en) * | 2014-03-06 | 2015-09-09 | 中国移动通信集团广东有限公司 | Method and device for switching equipment, and server |
CN109101200A (en) * | 2018-08-30 | 2018-12-28 | 重庆富民银行股份有限公司 | A kind of disk storage system that across a network real time bidirectional is synchronous |
-
2020
- 2020-05-21 CN CN202010436312.2A patent/CN111614763B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030200333A1 (en) * | 2002-03-28 | 2003-10-23 | International Business Machines Corporation | Method of load balancing traffic among routers in a data transmission system |
CN101404621A (en) * | 2008-11-24 | 2009-04-08 | 杭州华三通信技术有限公司 | Method and routing device for implementing VRRP load balance |
CN104901882A (en) * | 2014-03-06 | 2015-09-09 | 中国移动通信集团广东有限公司 | Method and device for switching equipment, and server |
CN109101200A (en) * | 2018-08-30 | 2018-12-28 | 重庆富民银行股份有限公司 | A kind of disk storage system that across a network real time bidirectional is synchronous |
Also Published As
Publication number | Publication date |
---|---|
CN111614763B (en) | 2023-04-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10735509B2 (en) | Systems and methods for synchronizing microservice data stores | |
JP6600373B2 (en) | System and method for active-passive routing and control of traffic in a traffic director environment | |
US11218445B2 (en) | System and method for implementing a web application firewall as a customized service | |
US10044551B2 (en) | Secure cloud management agent | |
US20190235979A1 (en) | Systems and methods for performing computing cluster node switchover | |
JP5817308B2 (en) | Server, server system, and server redundancy switching method | |
US20120331104A1 (en) | Controlling communication among multiple industrial control systems | |
US10083098B1 (en) | Network function virtualization (NFV) virtual network function (VNF) crash recovery | |
JP6231598B2 (en) | Server system, method, and computer-readable storage medium for extending hold time of power supply unit | |
US8688832B2 (en) | Load balancing for network server | |
CN106385455A (en) | CDN (Content Delivery Network) mirror-based whole site lock setting method | |
WO2020233001A1 (en) | Distributed storage system comprising dual-control architecture, data reading method and device, and storage medium | |
CN111614763B (en) | Method, equipment and storage medium for dynamically adjusting load of application server | |
US8898314B2 (en) | Direct communication between applications in a cloud computing environment | |
KR20120114484A (en) | Method for doubly processing data of block storage service | |
CN112073499A (en) | Dynamic service method of multi-machine type cloud physical server | |
US20230030168A1 (en) | Protection of i/o paths against network partitioning and component failures in nvme-of environments | |
CN113946376A (en) | Load adjustment method and device, electronic equipment and storage medium | |
CN116192855A (en) | Load balancing method, load balancing device, electronic equipment and computer readable storage medium | |
Kitamura | Configuration of a Power-saving High-availability Server System Incorporating a Hybrid Operation Method | |
CN116582501B (en) | Method and system for solving slow effect of Vpc-agent network configuration based on dynamic priority | |
Chowdhury et al. | Dynamic Routing System (DRS): Fault tolerance in network routing | |
CN116627686A (en) | Software fault processing method and device for network equipment | |
WO2005041539A2 (en) | Method and system for fault protection in a communication network | |
CN116107707A (en) | Data base engine platform and use method |
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 | ||
CB02 | Change of applicant information |
Address after: No. 1 and No. 2, Shihua Road, Hualong Town, Panyu District, Guangzhou City, Guangdong Province, 510000 Applicant after: Guangdong haomadame smart home Co.,Ltd. Address before: No.1, No.2 highway, No.2, Panyu, Guangzhou Applicant before: GUANGDONG KELAINI INTELLIGENT TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |