CN111641522A - Method, system and computer equipment for node switching - Google Patents

Method, system and computer equipment for node switching Download PDF

Info

Publication number
CN111641522A
CN111641522A CN202010446923.5A CN202010446923A CN111641522A CN 111641522 A CN111641522 A CN 111641522A CN 202010446923 A CN202010446923 A CN 202010446923A CN 111641522 A CN111641522 A CN 111641522A
Authority
CN
China
Prior art keywords
node
weight value
value
adjusting
slave
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.)
Withdrawn
Application number
CN202010446923.5A
Other languages
Chinese (zh)
Inventor
吴立勋
范渊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dbappsecurity Technology Co Ltd
Original Assignee
Hangzhou Dbappsecurity Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dbappsecurity Technology Co Ltd filed Critical Hangzhou Dbappsecurity Technology Co Ltd
Priority to CN202010446923.5A priority Critical patent/CN111641522A/en
Publication of CN111641522A publication Critical patent/CN111641522A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery

Abstract

The application relates to a method, a system and a computer device for switching nodes, wherein the method comprises the following steps: configuring a master node as a first weighted value, wherein the master node is provided with a plurality of slave nodes; and adjusting the first weight value according to the hardware running state of the main node and the service process, and switching the main node into the slave node after the first weight value is smaller than a preset threshold value, so that the problem of node switching delay is solved, more flexible server switching is realized, unnecessary service interruption of the server is reduced, and the connection is more stable.

Description

Method, system and computer equipment for node switching
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, a system, and a computer device for node switching.
Background
With the rapid development of the internet technology, the public has higher requirements on the security index of the internet environment, and the public relies on a cloud security protection system. The cloud security protection system is used for researching and realizing security protection services required by the cloud platform system. The cloud security protection system provides flexible and diverse policy mechanisms, and the protection system policy mechanisms comprise security application interfaces, middleware and the like to realize integration and practicability of various current cloud service platforms. A safe and effective modular cloud safety protection system is established, can be applied to any cloud platform, provides enough safety guarantee for the cloud platform serving as a cloud service foundation, and lays a solid theoretical and technical foundation for further popularization of a cloud computing technology. The cloud security protection system comprises user and account management, and provides comprehensive security capabilities such as cloud acceleration, DNS protection, total-station mirroring, big data security analysis and intelligent security management for user websites mostly, realizes visible value for clients, reduces website data leakage and webpage tampering risks, improves website link reliability, encrypts sensitive information, provides retrieval and query technology based on ciphertext, and has the advantages of reliability and fault tolerance of a storage system, data security and privacy protection, software behavior discrimination, cloud security standard test programs and the like.
At present, the number of access times of a security protection system is rapidly increased, the pressure on a server is increased, a website accessed by a client bears the service of the client, and if the service of the client is interrupted due to the failure of the server of the security protection system, loss which is difficult to estimate is caused, so in order to deal with the situation, a Virtual Router Redundancy Protocol (VRRP) in a local area network is adopted to improve the high availability of a cluster, and the Protocol is used for dealing with the situation that a node is unavailable due to machine downtime.
VRRP is a selection protocol that can dynamically allocate the responsibility of a virtual router to one of the VRRP routers on the local area network. The VRRP router that controls the virtual router IP addresses is called the master router, which is responsible for forwarding packets to these virtual IP addresses. This selection process provides a dynamic failover mechanism once the primary router is unavailable, which allows the IP address of the virtual router to act as the default first hop router for the end host. Is a LAN access equipment share protocol. All hosts in a local area network are provided with default gateways, so that messages sent by the hosts and having destination addresses which are not in the network segment are sent to the three-layer switch through the default gateways, and communication between the hosts and an external network is realized. VRRP is also a route fault tolerance protocol, which may also be called a backup routing protocol. All hosts in a local area network are provided with default routes, and when the destination address sent by the host in the network is not in the network segment, the message is sent to an external router through the default route, so that the communication between the host and the external network is realized. When the default router port is closed, the internal host cannot communicate with the external host, and if the router sets the VRRP, the virtual router enables the backup router, thereby realizing the full-network communication.
A World Wide Web (Web for short) server cluster system is a cluster system composed of a group of servers running the same application at the same time, and looks like a server to the outside. In order to balance the load of the cluster server and achieve the purpose of optimizing the system performance, the WEB cluster server distributes a plurality of access requests to different nodes in the system for processing. Thus, higher efficiency and stability are achieved, which are characteristics that WEB-based enterprise applications must possess.
The high-availability cluster is the design key point of a distributed system architecture, and is characterized in that when a certain node or a server fails, another node can automatically and immediately provide services to the outside, so that resources on the failed node can be transferred to the other node, and the other node can provide the services to the outside. The high-availability cluster can switch resources and services when a single point fails, so that the server service is not interrupted. When the system equipment assumes that the system is always able to provide a service, the availability of the system is 100%, for example. If the system has 1 time unit to provide no service per 100 time units of operation, the availability of the system is 99%. The high availability target is 4 9, i.e. 99.99%, which means that the annual down time of the system is 8.76 hours, reaching a very high level of high availability.
At present, no effective solution is provided for the problem of false death caused by high node load in the related technology.
Disclosure of Invention
The invention provides a method, a system and computer equipment for node switching, aiming at the problems of node machine downtime and false death caused by high system load in the related art, and at least solving the problems.
According to an aspect of the present invention, there is provided a node switching system including a master node and a plurality of slave nodes; the configuration main node is a first weighted value, wherein the main node is provided with a plurality of slave nodes; and adjusting the first weight value according to the return value of the hardware running state of the main node and the return value of the service process, and switching the main node into the slave node after the first weight value is smaller than a preset threshold value.
In one embodiment, before configuring the master node as the first weight value, the master node and the slave node perform heartbeat detection based on a virtual router redundancy protocol, and perform weight value configuration on the master node and the slave node if the heartbeat detection is normal, where the weight value configuration is set based on a return value of a system hardware running state and a return value of a service process if the heartbeat detection is normal.
In one embodiment, in a case where the slave nodes include a first slave node and a second slave node, the first slave node is set to a second weight value, where the second weight value is smaller than the first weight value, and both the first weight value and the second weight value are greater than the preset threshold;
in one embodiment, after the master node adjusts that the first weight value is smaller than the preset threshold, the master node is switched to the second slave node.
In one embodiment, the adjusting the first weight value according to the return value of the hardware operating state of the master node includes:
the main node adjusts a first weight value according to the load of the main node occupying and waiting for the CPU time in a preset time period, wherein the first weight value is inversely proportional to the return value of the load occupying and waiting for the CPU time.
In one embodiment, the adjusting the first weight value according to the service progress of the master node includes:
and adjusting a first weight value according to the utilization rate of the server memory of the main node, wherein the first weight value is inversely proportional to a return value of the utilization rate of the server memory.
In one embodiment, the adjusting the first weight value by the return value of the hardware operating state of the master node includes:
and adjusting a first weight value according to the consumption condition of the current system hard disk of the main node and the consumption speed of the remaining space of the hard disk, wherein the first weight value is inversely proportional to the consumption condition of the hard disk and the consumption speed of the remaining space of the hard disk.
In one embodiment, the adjusting the first weight value according to the service state of the master node includes:
and adjusting the first weight value according to the number of front-end service processes and the number of back-end service processes of the main node, wherein the first weight value is inversely proportional to the return values of the number of front-end service processes and the number of back-end service processes of the main node.
In one embodiment, the adjusting the first weight value according to the return value of the hardware operating state of the node and the return value of the service process includes:
and adjusting the first weight value according to the return value, wherein the return value is obtained by the main node according to the load return value of the CPU of the main node, the return value of the memory usage of the server, the consumption condition of the hard disk, the return value of the residual space of the hard disk, the number of front-end service processes and the number of rear-end service processes.
According to another aspect of the present invention, a node switching system is provided, where the system includes a master node, a first slave node, and a second slave node, and the master node is configured to have a first weight value, and the first slave node is set to have a second weight value, where the second weight value is smaller than the first weight value, and both the first weight value and the second weight value are greater than the preset threshold;
adjusting the first weight value according to the return value of the hardware running state of the main node and the return value of the service process,
and switching the main node to the second slave node after the first weighted value is smaller than the preset threshold value.
According to another aspect of the invention, there is provided a computer system comprising a computer device including a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the system for node switching.
According to the invention, a main node is configured to be a first weighted value, wherein the main node is provided with a plurality of slave nodes; and adjusting the first weight value according to the return value of the hardware running state of the main node and the return value of the service process, and switching the main node to the slave node after the first weight value is smaller than a preset threshold value, so that the problems of node machine downtime and false death caused by high system load are solved, and the average fault-free time and effectiveness of the system cluster are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram of a node switching system according to an embodiment of the present invention;
fig. 2 is a flow chart of a node switching system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a node switching system according to an embodiment of the present invention;
fig. 4 is a block diagram of a node switching system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
Fig. 1 is a schematic diagram of a node switching system according to an embodiment of the present application, and as shown in fig. 1, the node switching system includes a master node 10, a first slave node 11, and a second slave node 12, where the master node is a node to which an initial virtual IP address 13 is accessed, and a selection order of the slave nodes may be the first slave node 11 and the second slave node 12 in turn, for example, when the master node 10 is under a high load, the master node is switched to the first slave node 11, and the number of the slave nodes 21 in the system is not limited; configuring the master node 10 as a first weight value, and setting the first slave node 11 as a second weight value, wherein the second weight value is smaller than the first weight value, and both the first weight value and the second weight value are larger than a preset threshold; adjusting a first weight value according to a return value of a hardware running state of the host node 10 and a return value of a service process, wherein the hardware running state may include server hardware information such as a CPU average load, a memory usage rate, a hard disk available space, and the like, and the service process of the host node 10 may be determined by a memory occupancy rate based on a process number of a front-end server and a process number of a back-end server; and after the first weight value is smaller than the preset threshold value, switching the master node 10 to the first slave node 11, where the first slave node 11 is a node with the highest weight value among all nodes, and the node with the highest weight value is connected to the WEB cluster 26, and is a cluster formed by a group of servers simultaneously running the same WEB application, and looks like a server to the outside. In order to balance the load of the cluster server and achieve the purpose of optimizing the system performance, the cluster server receives a plurality of access requests, and selects the nodes with high weights to process, and the WEB cluster 26 can realize the stability of the network service.
In the node switching system in the related art, under the condition that a node machine is in a false death and a heartbeat packet still exists, a main node cannot be switched to a slave node, so that service interruption can be caused, a return value based on a hardware running state and a return value of a service process are provided by the system to serve as indexes of node switching, the main node can be switched to the slave node under the condition that the system is in the false death, the problem of false death caused by high system load is solved, and the average fault-free time and effectiveness of a system cluster are improved.
The present embodiment further provides a method for switching a node, fig. 2 is a flowchart of a node switching system according to an embodiment of the present application, and as shown in fig. 2, the method includes the following steps:
step S202, configuring the master node as a first weight value, wherein the master node is a node accessed by an initial virtual IP address, the first weight value of the master node is a highest weight value, one slave node can be set, a plurality of slave nodes can also be set, and the weight values of the plurality of slave nodes can be sequentially decreased;
step S204, adjusting the first weight value according to the return value of the hardware operating state of the master node and the return value of the service process, switching the master node to the first slave node 11 when the first weight value is smaller than a preset threshold value, where the master node weight value is the smallest, the first slave node 11 has the highest weight value, for example, adding a weight value to each node in a configuration file of the node, taking 4 servers commonly found on production nodes in the related art as an example of a node, configuring the master node 10 to 250 according to fig. 3 of the embodiment of the present application, and sequentially subtracting 10 from the remaining slave nodes, that is, the minimum weight value is 220, and the system selects the master node according to priority.
Through the steps S202 to S204, the performance of the current node is determined according to the machine performance and the process survival number as the index of node switching, so that the system can more flexibly switch the node, reduce unnecessary service interruption, and make the connection more stable.
In an embodiment, fig. 3 is a flowchart of an embodiment of a flowchart of a node switching system according to an embodiment of the present application, and as shown in fig. 3, before configuring the master node 10 as the first weight value, the master node 20 and the slave node 21 perform heartbeat detection based on VRRP, the protocol is designed to maintain connectivity between routers, and in a case that heartbeat detection is normal, the master node 20 and the slave node 21 are configured with weight values to optimize fluency of a node server.
In an embodiment, fig. 3 is a schematic diagram of a node switching system according to an embodiment of the present application, as shown in fig. 3, in a case that the slave node includes a first slave node 21 and a second slave node 22, the first slave node 21 is set to a second weight value, where the second weight value is smaller than the first weight value, and both the first weight value and the second weight value are greater than the preset threshold;
after the master node 10 adjusts that the first weight value is smaller than the preset threshold, the master node 10 is switched to the first slave node 11.
In an embodiment, fig. 4 is a block diagram of a node switching system according to an embodiment of the present application, and as shown in fig. 4, the adjusting the first weight value according to the hardware operating state of the master node 10 includes:
the main node 10 adjusts a first weight value according to the load of the main node 22 occupying and waiting for the CPU time within a preset time period, wherein the first weight value is inversely proportional to a return value of the load occupying and waiting for the CPU time; the index of the average load of the CPU refers to the number of processes occupying the CPU time and processes waiting for the CPU time in a certain period of time, generally, the time periods of the values are the latest 1 minute, the latest 5 minutes, and the latest 15 minutes, if the system load of only 1 minute is greater than 1.0, this indicates that there is a process waiting for the CPU to process, and the other two time periods are less than 1.0, which indicates that the temporary CPU load is high, and more than 1 process is being processed by the CPU, and other processes need to wait, which may be delayed, but it is worth noting that if the average system load is greater than 1.0 in 5 minutes, this indicates that a problem persists and needs to intervene, and therefore the monitoring threshold is set to 5 minutes, and the average load is 1, and if the average system load exceeds the threshold, a trigger mechanism.
In an embodiment, fig. 4 is a block diagram of a node switching system according to an embodiment of the present disclosure, and as shown in fig. 4, the adjusting the first weight value according to the service process of the main node 10 includes adjusting a first weight value according to a usage rate of a server memory of the main node 10, where the first weight value is inversely proportional to a return value of the usage rate of the server memory, where the usage rate of the memory is to display a current consumption of the system memory, in the related art, a cloud server standard is configured to be 128G, a normal usage rate is about 50%, when the usage rate reaches above 90%, the system considers that a machine load is high, and if the load operation is resumed, the machine is down, and therefore a monitoring threshold of the memory is set to 90% of the usage rate.
In an embodiment, fig. 4 is a block diagram of a node switching system according to an embodiment of the present application, and as shown in fig. 4, the adjusting the first weight value by the return value of the hardware operating state of the master node 10 includes: the method comprises the steps of adjusting a first weight value according to the consumption condition of a current system hard disk of a main node 10 and the consumption speed of the remaining space of the hard disk, wherein the first weight value is inversely proportional to the consumption condition of the hard disk and the consumption speed of the remaining space of the hard disk, the index of the hard disk utilization rate is used for displaying the consumption condition of the current system hard disk, although the consumption of the hard disk does not influence the system, the application in the system cannot be used, the automatic cleaning of the hard disk is generally triggered when the remaining space of the hard disk is only 15%, and when the automatic cleaning speed is not higher than the consumption speed of the remaining space of the hard disk, the process fault in the system can cause the malicious consumption of the hard disk space, so that a monitoring mechanism can be triggered when the remaining space of the hard disk is less than 10%, and the main node 10.
In an embodiment, fig. 4 is a block diagram of a node switching system according to an embodiment of the present application, and as shown in fig. 4, the adjusting the first weight value according to the service status of the master node 10 includes:
the first weight value is adjusted according to the number of the front-end service processes and the number of the back-end service processes of the main node 10, wherein the first weight value is inversely proportional to the return values of the number of the front-end service processes and the number of the back-end service processes of the main node 10, and the number of the front-end service processes, wherein the number of the default front-end service processes is 25, and when the number of the default front-end service processes is less than 18, the task front-end service is problematic, the system automatically restarts the service, but when the system or process fails, the restart service does not take effect, the number of the processes is less and less, and the front-end service is unavailable, so the script sets the number of the processes to be less than 10, the trigger mechanism is activated, and then the main node 10 is switched. The principle of the back-end service process is the same as that of the front-end, the number of the default back-end is 32, the number of the script setting processes is less than 10, the trigger mechanism is activated, and then the main node 10 is switched
In an embodiment, fig. 4 is a block diagram of a node switching system according to an embodiment of the present application, and as shown in fig. 4, the adjusting the first weight value according to the return value of the hardware operating state of the node and the return value of the service process includes: obtaining a return value of a CPU load of the master node 10, a return value of a memory usage amount of a server, a hard disk consumption condition, a return value of a hard disk remaining space, a return value of a front-end service process number and a return value of a back-end service process number according to the master node 10, adjusting the first weight value according to the return values, for example, performing module extension configuration in system configuration: firstly, the five groups of monitoring scripts are called to obtain the return items in the monitoring scripts, if the return value is 0, an alarm is not abnormal, if the return value is not 0, an alarm is triggered, and then when any one of the scripts triggers the alarm value, the threshold value is directly deducted from 100, so that even if the process of the machine can still normally operate, the node switching system judges that the next downtime condition possibly occurs, the main node 10 is switched to the slave node 21 with more stable performance, the stability of service is guaranteed, and the service interruption caused by the false death of the system is avoided.
The present embodiment also provides a computer device, as shown in fig. 5, fig. 5 is a schematic diagram of a computer device according to an embodiment of the present application, the computer device includes a memory 32, a communication interface 34, a processor 30, and a computer program stored in the memory 32 and executable on the processor, the memory 32 is connected to the processor 30 through the communication interface 34, the processor 30 of the computer device is used for providing computing and controlling capability, and the memory 32 of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing real-time data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the method for node switching, and the computer device may execute the method for weight assignment in the embodiment of the present application based on the acquired hardware condition, thereby implementing the method for node switching described in conjunction with fig. 1.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the node switching method provided by the above embodiments. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing real-time video stream data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a problem of a system node being loaded high causing a false death.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of node switching, characterized in that,
configuring a master node as a first weighted value, wherein the master node is provided with a plurality of slave nodes;
and adjusting the first weight value according to the return value of the hardware running state of the main node and the return value of the service process, and switching the main node into the slave node after the first weight value is smaller than a preset threshold value.
2. The method of claim 1, wherein before configuring the master node with the first weight value, the master node and the slave node perform heartbeat detection based on a virtual router redundancy protocol, and wherein the master node and the slave node are configured with weight values if heartbeat detection is normal.
3. The method of claim 1,
in a case where the slave node includes a first slave node and a second slave node, setting the first slave node to a second weight value, where the second weight value is smaller than the first weight value, and both the first weight value and the second weight value are greater than the preset threshold;
and after the main node adjusts that the first weight value is smaller than the preset threshold value, the main node is switched to the second slave node.
4. The method of claim 1,
the adjusting the first weight value according to the return value of the hardware running state of the main node comprises:
the main node adjusts a first weight value according to the load of the main node occupying and waiting for the CPU time in a preset time period, wherein the first weight value is inversely proportional to the return value of the load occupying and waiting for the CPU time.
5. The method of claim 1,
the adjusting the first weight value according to the service progress of the master node includes:
and adjusting a first weight value according to the utilization rate of the server memory of the main node, wherein the first weight value is inversely proportional to a return value of the utilization rate of the server memory.
6. The method of node switching according to claim 1, wherein the adjusting the first weight value by the return value of the hardware operating state of the master node comprises:
and adjusting a first weight value according to the consumption condition of the current system hard disk of the main node and the consumption speed of the remaining space of the hard disk, wherein the first weight value is inversely proportional to the consumption condition of the hard disk and the consumption speed of the remaining space of the hard disk.
7. The method of node switching according to claim 1,
the adjusting the first weight value according to the service state of the master node comprises:
and adjusting the first weight value according to the number of front-end service processes and the number of back-end service processes of the main node, wherein the first weight value is inversely proportional to the return values of the number of front-end service processes and the number of back-end service processes of the main node.
8. The method of node switching according to claim 1,
the adjusting the first weight value according to the return value of the hardware running state of the node and the return value of the service process comprises:
and adjusting the first weight value according to the return value, wherein the return value is obtained by the main node according to the load return value of the CPU of the main node, the return value of the memory usage of the server, the consumption condition of the hard disk, the return value of the residual space of the hard disk, the number of front-end service processes and the number of rear-end service processes.
9. A node switching system is characterized by comprising a main node, a first slave node and a second slave node, wherein the main node is configured to be a first weight value, the first slave node is set to be a second weight value, the second weight value is smaller than the first weight value, and the first weight value and the second weight value are both larger than a preset threshold value;
and adjusting the first weight value according to the return value of the hardware running state of the main node and the return value of the service process, and switching the main node to the second slave node after the first weight value is smaller than the preset threshold value.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 8 are implemented when the computer program is executed by the processor.
CN202010446923.5A 2020-05-25 2020-05-25 Method, system and computer equipment for node switching Withdrawn CN111641522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010446923.5A CN111641522A (en) 2020-05-25 2020-05-25 Method, system and computer equipment for node switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010446923.5A CN111641522A (en) 2020-05-25 2020-05-25 Method, system and computer equipment for node switching

Publications (1)

Publication Number Publication Date
CN111641522A true CN111641522A (en) 2020-09-08

Family

ID=72330885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010446923.5A Withdrawn CN111641522A (en) 2020-05-25 2020-05-25 Method, system and computer equipment for node switching

Country Status (1)

Country Link
CN (1) CN111641522A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104727A (en) * 2020-09-10 2020-12-18 华云数据控股集团有限公司 Method and system for deploying simplified high-availability Zookeeper cluster
CN112954133A (en) * 2021-01-20 2021-06-11 浙江大华技术股份有限公司 Method, device, electronic device and storage medium for synchronizing node time
CN113760549A (en) * 2021-08-30 2021-12-07 聚好看科技股份有限公司 Pod deployment method and device
CN114244735A (en) * 2021-12-09 2022-03-25 南京丰道电力科技有限公司 Main/standby operation switching method and device and storage medium
CN114422521A (en) * 2022-01-12 2022-04-29 北京京东振世信息技术有限公司 Method and device for determining main node, electronic equipment and storage medium
CN115695320A (en) * 2023-01-04 2023-02-03 苏州浪潮智能科技有限公司 Front-end and back-end load management method, system, equipment and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008053805A1 (en) * 2006-10-30 2008-05-08 Kyocera Corporation Radio communication terminal and communication method
CN104283948A (en) * 2014-09-26 2015-01-14 东软集团股份有限公司 Server cluster system and load balancing implementation method thereof
CN110086726A (en) * 2019-04-22 2019-08-02 航天云网科技发展有限责任公司 A method of automatically switching Kubernetes host node
CN111049928A (en) * 2019-12-24 2020-04-21 北京奇艺世纪科技有限公司 Data synchronization method, system, electronic device and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008053805A1 (en) * 2006-10-30 2008-05-08 Kyocera Corporation Radio communication terminal and communication method
CN104283948A (en) * 2014-09-26 2015-01-14 东软集团股份有限公司 Server cluster system and load balancing implementation method thereof
CN110086726A (en) * 2019-04-22 2019-08-02 航天云网科技发展有限责任公司 A method of automatically switching Kubernetes host node
CN111049928A (en) * 2019-12-24 2020-04-21 北京奇艺世纪科技有限公司 Data synchronization method, system, electronic device and computer readable storage medium

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104727A (en) * 2020-09-10 2020-12-18 华云数据控股集团有限公司 Method and system for deploying simplified high-availability Zookeeper cluster
CN112104727B (en) * 2020-09-10 2021-11-30 华云数据控股集团有限公司 Method and system for deploying simplified high-availability Zookeeper cluster
CN112954133A (en) * 2021-01-20 2021-06-11 浙江大华技术股份有限公司 Method, device, electronic device and storage medium for synchronizing node time
CN112954133B (en) * 2021-01-20 2023-03-14 浙江大华技术股份有限公司 Method, device, electronic device and storage medium for synchronizing node time
CN113760549A (en) * 2021-08-30 2021-12-07 聚好看科技股份有限公司 Pod deployment method and device
CN113760549B (en) * 2021-08-30 2024-03-15 聚好看科技股份有限公司 Pod deployment method and device
CN114244735A (en) * 2021-12-09 2022-03-25 南京丰道电力科技有限公司 Main/standby operation switching method and device and storage medium
CN114244735B (en) * 2021-12-09 2024-01-16 南京丰道电力科技有限公司 Master and slave operation switching method, device and storage medium
CN114422521A (en) * 2022-01-12 2022-04-29 北京京东振世信息技术有限公司 Method and device for determining main node, electronic equipment and storage medium
CN114422521B (en) * 2022-01-12 2024-04-05 北京京东振世信息技术有限公司 Method and device for determining master node, electronic equipment and storage medium
CN115695320A (en) * 2023-01-04 2023-02-03 苏州浪潮智能科技有限公司 Front-end and back-end load management method, system, equipment and computer storage medium
CN115695320B (en) * 2023-01-04 2023-03-31 苏州浪潮智能科技有限公司 Front-end and back-end load management method, system, equipment and computer storage medium

Similar Documents

Publication Publication Date Title
CN111641522A (en) Method, system and computer equipment for node switching
US10567340B2 (en) Data center system
JP6487401B2 (en) System and method for active-passive routing and control of traffic in a traffic director environment
CN112671882B (en) Same-city double-activity system and method based on micro-service
US8825867B2 (en) Two level packet distribution with stateless first level packet distribution to a group of servers and stateful second level packet distribution to a server within the group
EP2993838B1 (en) Methods for setting a member identity of gateway device and corresponding management gateway devices
CN111698158B (en) Method and device for electing master equipment and machine-readable storage medium
US10771318B1 (en) High availability on a distributed networking platform
CN108989352B (en) Firewall implementation method and device, computer equipment and storage medium
WO2014023174A1 (en) Computer information system and dynamic disaster recovery method therefor
KR20050065346A (en) System and method for managing protocol network failures in a cluster system
CN106713378B (en) Method and system for providing service by multiple application servers
CN112217843B (en) Service unit switching method, system and equipment
CN113709220B (en) High-availability implementation method and system of virtual load equalizer and electronic equipment
US8370897B1 (en) Configurable redundant security device failover
US8868782B2 (en) System and methods for a managed application server restart
WO2023093526A1 (en) Load balancing method and apparatus, electronic device, computer readable storage medium, and computer program product
WO2023207189A1 (en) Load balancing method and system, computer storage medium, and electronic device
CN106909322B (en) Routing method and device for supporting storage disaster recovery in virtualization system
CN115396385B (en) Method and device for quickly recovering service of stack switch and computing equipment
US11792287B2 (en) Broker cell for distributed message system
US9019964B2 (en) Methods and systems for routing application traffic
JP2013016044A (en) Firewall device and method for controlling firewall device
KR100793446B1 (en) Method for processing fail-over and returning of duplication telecommunication system
CN117176624A (en) Method for detecting service availability in NLB environment of Windows Server system

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200908

WW01 Invention patent application withdrawn after publication