CN111181779A - Method and device for testing cluster failover performance and storage medium - Google Patents
Method and device for testing cluster failover performance and storage medium Download PDFInfo
- Publication number
- CN111181779A CN111181779A CN201911323337.5A CN201911323337A CN111181779A CN 111181779 A CN111181779 A CN 111181779A CN 201911323337 A CN201911323337 A CN 201911323337A CN 111181779 A CN111181779 A CN 111181779A
- Authority
- CN
- China
- Prior art keywords
- cluster
- node
- master node
- response
- connection
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000012360 testing method Methods 0.000 title claims abstract description 28
- 230000004044 response Effects 0.000 claims abstract description 35
- 230000008569 process Effects 0.000 claims abstract description 19
- 230000006870 function Effects 0.000 claims description 41
- 238000004590 computer program Methods 0.000 claims description 14
- 230000008859 change Effects 0.000 claims description 10
- 238000012546 transfer Methods 0.000 abstract description 13
- 230000000007 visual effect Effects 0.000 abstract description 3
- 230000003287 optical effect Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
Images
Classifications
-
- 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/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
-
- 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/22—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Hardware Redundancy (AREA)
Abstract
The invention discloses a method for testing a cluster fault transfer function, which comprises the following steps: establishing connection with a main node in a cluster; writing data to the master node; in response to prompting that the connection is disconnected in the process of writing data, suspending writing data to the main nodes in the cluster and then taking down the main nodes to disconnect the main nodes; after a preset time period, judging whether the connection with the main node in the cluster can be established or not; in response to a failure to establish a connection with a master node in the cluster, a failover function of the cluster is prompted to be disabled. The invention also discloses a computer device and a readable storage medium. According to the scheme provided by the invention, the whole process of cluster fault transfer can be clearly observed by continuously writing data into the main node and outputting the error prompt when the main node fails, so that the automatic fault transfer test becomes visual and transparent, and the whole test process is more rigorous and convincing.
Description
Technical Field
The invention relates to the field of testing, in particular to a method and equipment for testing a cluster failover function and a storage medium.
Background
In available clusters, compared with the high availability realized by Sentinel, the high availability realized by Redis more emphasized by Redis the scalability of data fragmentation or nodes, and if corresponding slave nodes are added to the master node of the cluster, the cluster can automatically fail over, so that the cluster has great advantages compared with Sentinel.
The automatic failover of Redis Cluster means that when a master node is down, a slave node is upgraded to the master node within 1s to replace the master node to provide service for the outside, so that an application program is completely unaware, and the slave node is automatically changed into the slave node after the master node is restarted, thereby realizing high availability of a Cluster. Because the alternating time of the master node and the slave node is short, when the function test is carried out only by manual operation, the fault transfer process is difficult to observe, and the rigor of the test work and the transparentization of the test process cannot be achieved.
Disclosure of Invention
In view of the above, in order to overcome at least one aspect of the above problems, an embodiment of the present invention provides a method for testing a failover function of a cluster, including:
establishing connection with a main node in a cluster;
writing data to the master node and then bringing down the master node to disconnect from the master node;
in response to the prompt of disconnection in the process of writing data, suspending the writing of data to the main node in the cluster;
after a preset time period, judging whether the connection with the main node in the cluster can be established or not;
in response to failing to establish a connection with a master node in the cluster, prompting the failover functionality of the cluster to be invalid.
In some embodiments, further comprising: in response to being able to establish a connection with a master node in the cluster, prompting a failover function of the cluster to be active.
In some embodiments, in response to being able to establish a connection with a master node in the cluster, prompting the failover functionality of the cluster to be active, further comprising:
acquiring configuration information of a master node and a slave node of the cluster;
judging whether the main node of the cluster reestablishing the connection is changed or not according to the configuration information of the main node and the slave node;
in response to a change in the master node of the cluster to reestablish connections, prompting a failover function of the cluster to be active.
In some embodiments, in response to a change in the master node of the cluster reestablishing connectivity, prompting the failover functionality of the cluster to be active, further comprising:
restarting the crashed primary connected master node;
acquiring configuration information of a master node and a slave node of the cluster again;
determining whether the crashed initially connected master node becomes a slave node or not according to the configuration information of the master node and the slave node;
and prompting that the failover function of the cluster is effective in response to the primary node being down initially connected becoming a slave node.
In some embodiments, the preset time period is greater than the time required for master-slave node alternation in the cluster.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer apparatus, including:
at least one processor; and
a memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of:
establishing connection with a main node in a cluster;
writing data to the master node and then bringing down the master node to disconnect from the master node;
in response to the prompt of disconnection in the process of writing data, suspending the writing of data to the main node in the cluster;
after a preset time period, judging whether the connection with the main node in the cluster can be established or not;
in response to failing to establish a connection with a master node in the cluster, prompting the failover functionality of the cluster to be invalid.
In some embodiments, the steps further comprise: in response to being able to establish a connection with a master node in the cluster, prompting a failover function of the cluster to be active.
In some embodiments, in response to being able to establish a connection with a master node in the cluster, prompting the failover functionality of the cluster to be active, further comprising:
acquiring configuration information of a master node and a slave node of the cluster;
judging whether the main node of the cluster reestablishing the connection is changed or not according to the configuration information of the main node and the slave node;
in response to a change in the master node of the cluster to reestablish connections, prompting a failover function of the cluster to be active.
In some embodiments, in response to a change in the master node of the cluster reestablishing connectivity, prompting the failover functionality of the cluster to be active, further comprising:
restarting the crashed primary connected master node;
acquiring configuration information of a master node and a slave node of the cluster again;
determining whether the crashed initially connected master node becomes a slave node or not according to the configuration information of the master node and the slave node;
and prompting that the failover function of the cluster is effective in response to the primary node being down initially connected becoming a slave node.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of the method for testing the failover function of any one of the clusters as described above.
The invention has one of the following beneficial technical effects: according to the scheme provided by the invention, the whole process of cluster fault transfer can be clearly observed by continuously writing data into the main node and outputting the error prompt when the main node fails, so that the automatic fault transfer test becomes visual and transparent, and the whole test process is more rigorous and convincing.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for testing a failover function of a cluster according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a computer device provided in an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
According to an aspect of the present invention, an embodiment of the present invention provides a method for testing a failover function of a cluster, as shown in fig. 1, which may include the steps of: s1, establishing connection with the main node in the cluster; s2, writing data to the master node and then bringing down the master node to disconnect the master node; s3, responding to the prompt of disconnection in the process of writing data, and suspending the writing of data to the main node in the cluster; s4, after a preset time period, judging whether the connection with the main node in the cluster can be established; s5, responding to the connection with the main node in the cluster can not be established, and prompting that the fault transfer function of the cluster is invalid.
According to the scheme provided by the invention, the whole process of cluster fault transfer can be clearly observed by continuously writing data into the main node and outputting the error prompt when the main node fails, so that the automatic fault transfer test becomes visual and transparent, and the whole test process is more rigorous and convincing.
In some embodiments, in order to test the automatic failover function of the cluster (that is, when a master node goes down, a slave node is upgraded to the master node within the time set by the cluster, and the master node automatically becomes a slave node after being restarted), a cluster configured by the master node and the slave node may be first built, and then an automatic failover test is performed according to the test method provided by the present invention. When data is continuously and circularly written into the main node, the main node can be shut down manually or automatically through a shut-down instruction, and at the moment, a tester is prompted to disconnect.
It should be noted that only the master node of the cluster provides a service to the outside, and therefore, a connection with the master node in the cluster needs to be established to perform the test.
In some embodiments, after the connection is established with the master node, step S2 is performed to write data to the master node, in which step, the script written in PYTHON as the development language may be used to implement the uninterrupted and cyclic writing of data into the cluster having the master-slave configuration. The uninterrupted writing of the data can be realized by prompting that the data cannot be written into the main node after the main node goes down.
In some embodiments, further comprising: in response to being able to establish a connection with a master node in the cluster, prompting a failover function of the cluster to be active.
In some embodiments, in response to being able to establish a connection with a master node in the cluster, prompting the failover functionality of the cluster to be active, further comprising:
acquiring configuration information of a master node and a slave node of the cluster;
judging whether the main node of the cluster reestablishing the connection is changed or not according to the configuration information of the main node and the slave node;
in response to a change in the master node of the cluster to reestablish connections, prompting a failover function of the cluster to be active.
Specifically, after the primary node initially connected goes down, if the automatic failover function of the cluster is normally valid, a slave node is upgraded to the primary node within a preset time, and the configuration information of the master node and the slave node is correspondingly changed, that is, one slave node is upgraded to the primary node, and the reconnected node is not the primary node initially connected but is upgraded to the slave node of the primary node.
In some embodiments, in response to a change in the master node of the cluster reestablishing connectivity, prompting the failover functionality of the cluster to be active, further comprising:
restarting the crashed primary connected master node;
acquiring configuration information of a master node and a slave node of the cluster again;
determining whether the crashed initially connected master node becomes a slave node or not according to the configuration information of the master node and the slave node;
and prompting that the failover function of the cluster is effective in response to the primary node being down initially connected becoming a slave node.
Specifically, after the shutdown initial connection master node is restarted, the cluster changes the shutdown initial connection master node into the slave node, at this time, configuration information of the master node and the slave node of the cluster is obtained again, whether the shutdown initial connection master node becomes the slave node or not is determined by checking the configuration information of the master node and the slave node, and if the shutdown initial connection master node becomes the slave node, the fault transfer function is indicated to be effective.
In some embodiments, the preset time period is greater than the time required for master-slave node alternation in the cluster.
Specifically, after the primary node initially connected is down, because the automatic failover function of the cluster will complete the alternation of the primary node and the secondary node in a short time, in step S4, after a preset time period that is longer than the time required for the alternation of the primary node and the secondary node in the cluster and is sufficient for a tester to observe, connection with the cluster is tried to be established, so as to ensure that the tester can directly observe that the primary node is actually down, so that the test process is transparent, and the high availability characteristic (automatic failover function) of the cluster is verified more strictly.
For example, when the cluster is a Redis cluster, the time required for the master node and the slave node to alternate is 1 second, so that after the master node is down, the master node cannot be connected with the master node within 1 second, at this time, a tester is prompted to disconnect, and after a preset time period (2 seconds or longer), the master node is reestablished from connection with the cluster master node (at this time, the master node is obtained by upgrading the slave node). That is, when the main node goes down, the test personnel can see the prompt of disconnection from the main node within the preset time period (2 seconds), so that the test process of the automatic fault transfer function is transparent.
The scheme disclosed by the invention realizes the purpose of circularly and uninterruptedly writing data into the cluster with master-slave configuration, and in the data writing process, the master node in the cluster is shut down, the connection condition is observed, the master-slave information conversion of the cluster is checked, then the master node which is shut down is restarted, and the role conversion of the node in the cluster is observed again, so that the automatic fault transfer function test process is transparent, and the high availability characteristic of the cluster is verified more strictly.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 2, an embodiment of the present invention further provides a computer apparatus 501, comprising:
at least one processor 520; and
the memory 510, the memory 510 storing a computer program 511 executable on the processor, the processor 520 executing the program to perform the steps of any of the above described methods of testing a failover functionality of a cluster.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 3, an embodiment of the present invention further provides a computer-readable storage medium 601, where the computer-readable storage medium 601 stores computer program instructions 610, and the computer program instructions 610, when executed by a processor, perform the steps of the method for testing the failover function of any one of the clusters as above.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program to instruct related hardware to implement the methods. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
In addition, the apparatuses, devices, and the like disclosed in the embodiments of the present invention may be various electronic terminal devices, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (PAD), a smart television, and the like, or may be a large terminal device, such as a server, and the like, and therefore the scope of protection disclosed in the embodiments of the present invention should not be limited to a specific type of apparatus, device. The client disclosed by the embodiment of the invention can be applied to any one of the electronic terminal devices in the form of electronic hardware, computer software or a combination of the electronic hardware and the computer software.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile 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), which can act as external cache memory. By way of example and not limitation, RAM may be available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A method for testing a failover function of a cluster, comprising the steps of:
establishing connection with a main node in a cluster;
writing data to the master node and then bringing down the master node to disconnect from the master node;
in response to the prompt of disconnection in the process of writing data, suspending the writing of data to the main node in the cluster;
after a preset time period, judging whether the connection with the main node in the cluster can be established or not;
in response to failing to establish a connection with a master node in the cluster, prompting the failover functionality of the cluster to be invalid.
2. The method of claim 1, further comprising: in response to being able to establish a connection with a master node in the cluster, prompting a failover function of the cluster to be active.
3. The method of claim 2, wherein in response to being able to establish a connection with a master node in the cluster, prompting a failover function of the cluster to be active, further comprising:
acquiring configuration information of a master node and a slave node of the cluster;
judging whether the main node of the cluster reestablishing the connection is changed or not according to the configuration information of the main node and the slave node;
in response to a change in the master node of the cluster to reestablish connections, prompting a failover function of the cluster to be active.
4. The method of claim 3, wherein in response to a change in a master node of the cluster to reestablish connections, prompting a failover function of the cluster to be active, further comprising:
restarting the crashed primary connected master node;
acquiring configuration information of a master node and a slave node of the cluster again;
determining whether the crashed initially connected master node becomes a slave node or not according to the configuration information of the master node and the slave node;
and prompting that the failover function of the cluster is effective in response to the primary node being down initially connected becoming a slave node.
5. The method of claim 1, wherein the preset time period is greater than a time required for a master-slave node to alternate in the cluster.
6. A computer device, comprising:
at least one processor; and
a memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of:
establishing connection with a main node in a cluster;
writing data to the master node and then bringing down the master node to disconnect from the master node;
in response to the prompt of disconnection in the process of writing data, suspending the writing of data to the main node in the cluster;
after a preset time period, judging whether the connection with the main node in the cluster can be established or not;
in response to failing to establish a connection with a master node in the cluster, prompting the failover functionality of the cluster to be invalid.
7. The computer device of claim 6, wherein the steps further comprise: in response to being able to establish a connection with a master node in the cluster, prompting a failover function of the cluster to be active.
8. The computer device of claim 7, wherein in response to being able to establish a connection with a master node in the cluster, prompting a failover function of the cluster to be active, further comprising:
acquiring configuration information of a master node and a slave node of the cluster;
judging whether the main node of the cluster reestablishing the connection is changed or not according to the configuration information of the main node and the slave node;
in response to a change in the master node of the cluster to reestablish connections, prompting a failover function of the cluster to be active.
9. The computer device of claim 8, wherein in response to a change in a master node of the cluster that reestablishes connections, prompting a failover function of the cluster to be active, further comprising:
restarting the crashed primary connected master node;
acquiring configuration information of a master node and a slave node of the cluster again;
determining whether the crashed initially connected master node becomes a slave node or not according to the configuration information of the master node and the slave node;
and prompting that the failover function of the cluster is effective in response to the primary node being down initially connected becoming a slave node.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911323337.5A CN111181779A (en) | 2019-12-20 | 2019-12-20 | Method and device for testing cluster failover performance and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911323337.5A CN111181779A (en) | 2019-12-20 | 2019-12-20 | Method and device for testing cluster failover performance and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111181779A true CN111181779A (en) | 2020-05-19 |
Family
ID=70657611
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911323337.5A Pending CN111181779A (en) | 2019-12-20 | 2019-12-20 | Method and device for testing cluster failover performance and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111181779A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114780442A (en) * | 2022-06-22 | 2022-07-22 | 杭州悦数科技有限公司 | Testing method and device for distributed system |
CN115426249A (en) * | 2022-11-02 | 2022-12-02 | 飞天诚信科技股份有限公司 | High-availability solution method and device for Redis master-slave architecture |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106331098A (en) * | 2016-08-23 | 2017-01-11 | 东方网力科技股份有限公司 | Server cluster system |
CN107276839A (en) * | 2017-08-24 | 2017-10-20 | 郑州云海信息技术有限公司 | A kind of cloud platform from monitoring method and system |
-
2019
- 2019-12-20 CN CN201911323337.5A patent/CN111181779A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106331098A (en) * | 2016-08-23 | 2017-01-11 | 东方网力科技股份有限公司 | Server cluster system |
CN107276839A (en) * | 2017-08-24 | 2017-10-20 | 郑州云海信息技术有限公司 | A kind of cloud platform from monitoring method and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114780442A (en) * | 2022-06-22 | 2022-07-22 | 杭州悦数科技有限公司 | Testing method and device for distributed system |
CN115426249A (en) * | 2022-11-02 | 2022-12-02 | 飞天诚信科技股份有限公司 | High-availability solution method and device for Redis master-slave architecture |
CN115426249B (en) * | 2022-11-02 | 2023-03-24 | 飞天诚信科技股份有限公司 | High-availability solution method and device for Redis master-slave architecture |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10078563B2 (en) | Preventing split-brain scenario in a high-availability cluster | |
CN111756571B (en) | Cluster node fault processing method, device, equipment and readable medium | |
CN111124755B (en) | Fault recovery method and device for cluster nodes, electronic equipment and storage medium | |
US8909662B2 (en) | Message based mobile object with native PIM integration | |
CN111143106B (en) | Repair method, device, equipment and medium for dual-port SSD | |
CA3028504A1 (en) | Data processing method and device | |
CN102708150A (en) | Method, device and system for asynchronously copying data | |
CN111181779A (en) | Method and device for testing cluster failover performance and storage medium | |
CN111158975A (en) | Method, equipment and storage medium for monitoring BMC | |
CN111142896A (en) | Method and device for upgrading firmware of storage device and readable medium | |
CN112235137A (en) | Method and device for upgrading block link point program and electronic equipment | |
CN111124722A (en) | Method, equipment and medium for isolating fault memory | |
CN110427296B (en) | Hardware WDT-based monitoring method, hardware WDT-based monitoring equipment and readable medium | |
CN111857978A (en) | Distributed transaction processing method and device, computer equipment and storage medium | |
CN112929438B (en) | Business processing method and device of double-site distributed database | |
CN112600690B (en) | Configuration data synchronization method, device, equipment and storage medium | |
CN110727534B (en) | Method, equipment and storage medium for repairing file system | |
CN111488247B (en) | High availability method and equipment for managing and controlling multiple fault tolerance of nodes | |
CN111813606A (en) | Fault-tolerant method, system, equipment and medium for double-node virtual machine | |
CN110442497B (en) | Method, device and readable medium for alarming storage state of virtualization system | |
CN113179332B (en) | Method, electronic device and storage medium for acquiring configuration information | |
CN111404771B (en) | Network load testing method, device, equipment and medium | |
CN111857744A (en) | Installation method, system, equipment and medium of super-fusion system | |
CN113687798A (en) | Method, device and equipment for controlling data reconstruction and readable medium | |
CN111193818A (en) | Method, system, equipment and medium for obtaining IP address |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200519 |
|
RJ01 | Rejection of invention patent application after publication |