CN114124903A - Virtual IP address management method and device - Google Patents

Virtual IP address management method and device Download PDF

Info

Publication number
CN114124903A
CN114124903A CN202111350439.3A CN202111350439A CN114124903A CN 114124903 A CN114124903 A CN 114124903A CN 202111350439 A CN202111350439 A CN 202111350439A CN 114124903 A CN114124903 A CN 114124903A
Authority
CN
China
Prior art keywords
key
node
virtual
value
address
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
CN202111350439.3A
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.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies 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 New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202111350439.3A priority Critical patent/CN114124903A/en
Publication of CN114124903A publication Critical patent/CN114124903A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a virtual IP address management method and a device, wherein the method comprises the following steps: any node in the cluster periodically executes write operation to the same key of the etcd service deployed in the cluster; if the write operation is successfully executed, setting a virtual IP address at the node; if the write operation fails to be executed, the node clears the virtual IP address. By deploying the etcd service in the cluster and enabling each node to execute writing operation to the same key of the etcd service, because the etcd service has the characteristic of ensuring the key and the value are consistent in the cluster, only one node can write successfully at the same time, and therefore the node with successful writing sets the virtual IP address, and the node with failed writing automatically clears the virtual IP address, so that high availability switching of the virtual IP is ensured. Even if the node has network isolation or fault problems, the virtual IP address can be automatically cleared because the node writing operation fails, so that the problem that the virtual IP address coexists on a plurality of nodes due to the network isolation and other problems can be avoided.

Description

Virtual IP address management method and device
Technical Field
The invention relates to the technical field of computers, in particular to a virtual IP address management method and device.
Background
With the increase of the service scale, more and more applications are deployed on the cluster in consideration of capacity and expansibility, and when a client accesses the applications from the outside, a high available IP address (i.e., a virtual IP address) is used for accessing the applications in the cluster. The virtual IP address is not bound to a single node of the cluster, and when the node fails, the virtual IP address can be migrated to other normal nodes, so that an external client still uses the virtual IP address to access the application.
Currently, there are main and standby nodes in a cluster, a Virtual IP address is loaded on a main node, and heartbeat information is maintained between the main and standby nodes based on a Virtual Router Redundancy Protocol (VRRP), and when the main node fails and the standby node cannot receive the heartbeat information of the main node, the Virtual IP address is set by the standby node, so as to complete Virtual IP address migration.
However, when the network is isolated between the main node and the standby node due to some reasons, the main node and the standby node cannot receive heartbeat information of each other within a specified time, at this time, the standby node considers that the main node is in failure, a virtual IP address needs to be set immediately to ensure that the virtual IP address is highly available, and the main node considers that the standby node is in failure and the main node continues to bear the virtual IP address. Causing the problem of coexistence of virtual IP addresses on both nodes, resulting in address conflicts, and also affecting client access.
Disclosure of Invention
The present invention provides a virtual IP address management method and device for overcoming the above-mentioned deficiencies in the prior art, and the object is achieved by the following technical solutions.
The first aspect of the present invention provides a virtual IP address management method, which is applied to any node in a cluster, where the any node is in communication connection with an etcd service deployed in the cluster, and the method includes:
periodically executing a write operation to the same key in the etcd service;
if the write operation is successfully executed, setting a virtual IP address at the node;
and if the write operation fails to be executed, clearing the virtual IP address when the node is provided with the virtual IP address.
In some embodiments of the present application, the periodically performing a write operation to the same key in the etcd service includes:
and periodically executing a key value logging operation and/or a valid duration logging operation on the same key in the etcd service.
In some embodiments of the present application, the periodically performing a key value posting operation and/or a valid duration posting operation on the same key in the etcd service includes:
judging whether the key and the corresponding value are stored in the etcd service; if the key and the corresponding value are stored, judging whether the value is the value recorded by the node; if the value is the value recorded by the node, recording the effective duration into the key in the etcd service, and determining that the write operation is successfully executed; if the current node is not the value recorded by the current node, determining that the write operation fails to be executed; and if the key and the corresponding value are not stored, recording the key and the value recorded by the node and the effective duration of the key into the etcd service, and determining that the write operation is successfully executed.
In some embodiments of the present application, the determining whether the key and the corresponding value exist in the etcd service includes:
reading the key and corresponding value to the etcd service; if the reading is successful, determining that the key and the corresponding value are stored in the etcd service; and if the reading fails, adding 1 to the reading times, continuing to read the key and the corresponding value from the etcd service until the reading times reach the preset times, ending the reading until the key and the corresponding value are not stored in the etcd service.
In some embodiments of the present application, the method further comprises:
monitoring the effective duration of the key through the etcd service; clearing the key and corresponding value when the validity period expires.
A second aspect of the present invention provides a virtual IP address management apparatus, which is applied to any node in a cluster, where the any node is in communication connection with a distributed consistent key value storage etcd service deployed in the cluster, and the apparatus includes:
the writing module is used for periodically executing writing operation to the same key in the etcd service;
the virtual IP setting module is used for setting a virtual IP address at the node when the write-in operation is successfully executed;
and the virtual IP clearing module is used for clearing the virtual IP address when the write operation execution fails and the node is provided with the virtual IP address.
Based on the virtual IP address management method and apparatus in the first and second aspects, the present invention has at least the following advantages:
by deploying the etcd service in the cluster and periodically executing the write-in operation to the same key in the etcd service by each node in the cluster, because the etcd service has the characteristic of ensuring that the key and the value are strongly consistent in the cluster, only one node can execute the successful write-in operation at the same time, so that the virtual IP address can be set on the node which successfully executes the write-in operation, and the node which fails to execute the write-in operation automatically clears the virtual IP address, thereby ensuring the high availability switching of the virtual IP address.
Further, even when the node has network isolation or fault problems, the virtual IP address can be automatically cleared because the node writing operation fails, so that the problem that the virtual IP address coexists on a plurality of nodes due to network isolation and other problems can be avoided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic diagram of virtual IP address migration according to the present invention;
FIG. 2 is a schematic diagram illustrating coexistence of virtual IP addresses on multiple nodes according to the present invention;
fig. 3 is a flowchart illustrating an embodiment of a virtual IP address management method according to an exemplary embodiment of the present invention;
FIG. 4 is a diagram illustrating keys and values recorded by nodes in a cluster according to the embodiment shown in FIG. 3;
FIG. 5 is a flowchart illustrating a write operation to an etcd service according to the embodiment shown in FIG. 3;
fig. 6 is a schematic structural diagram illustrating a structure that a node1 carries a virtual IP address according to the embodiment shown in fig. 3;
fig. 7 is a schematic diagram illustrating virtual IP address migration during network isolation of a node1 according to the embodiment shown in fig. 3;
fig. 8 is a schematic structural diagram of a virtual IP address management apparatus according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
At present, for a distributed operating system cluster providing access service for the outside by using virtual IP addresses, a keepalive service is deployed at each node, and the keepalive service maintains the heartbeat of a master node and a slave node based on a VRRP protocol, the master node and the slave node in the cluster are elected based on priority, when the two nodes receive heartbeat information mutually, the node with high priority is a master node and carries the virtual IP addresses thereon, and the node with low priority is the slave node and does not carry the virtual IP addresses. When the main node has a problem, the standby node cannot receive heartbeat information of the main node within a certain time, and the standby node bears the virtual IP address, so that virtual IP migration is completed.
As shown in fig. 1, the priority of the node1 is higher than that of the node3, the node1 becomes a master node, the node3 becomes a standby node, the node1 bears a virtual IP address, when the node1 has a problem, the node3 cannot receive heartbeat information of the node1, the node3 becomes a master node and bears the virtual IP address, and virtual IP migration is completed.
However, when the network is isolated between the main node and the standby node due to some reasons (e.g., network policy restriction, link failure, etc.), as shown in fig. 2, the node1 and the node2 serving as the main node cannot receive heartbeat information of each other, and on one hand, the node2 serving as the standby node considers that the node1 has a problem, and immediately becomes the main node and carries a virtual IP address to determine that the virtual IP address is highly available; on the other hand, the node1 considers that the node2 has a problem, and the node1 continues to bear the virtual IP address, so that the virtual IP address coexists on the two nodes, and address conflict is caused. In this case, when an external client accesses an application, the external client may access from the node1 and may access from the node2, so that data on the node1 and the node2 cannot be kept consistent, and the client access is affected.
In order to solve the technical problem, the present application provides a virtual IP address management method, that is, any node in a cluster periodically executes a write operation to the same key in an etcd (distributed consistent key value storage) service deployed in the cluster, if the write operation is successfully executed, a virtual IP address is set, and if the write operation is failed to be executed, the virtual IP address is cleared when the virtual IP address is locally set.
The technical effects that can be achieved based on the above description are:
by deploying the etcd service in the cluster and periodically executing the write-in operation to the same key in the etcd service by each node in the cluster, because the etcd service has the characteristic of ensuring that the key and the value are strongly consistent in the cluster, only one node can execute the successful write-in operation at the same time, so that the virtual IP address can be set on the node which successfully executes the write-in operation, and the node which fails to execute the write-in operation automatically clears the set virtual IP address, thereby ensuring the high availability switching of the virtual IP address.
Further, even when the node has network isolation or fault problems, the virtual IP address can be automatically cleared because the node writing operation fails, so that the problem that the virtual IP address coexists on a plurality of nodes due to network isolation and other problems can be avoided.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The first embodiment is as follows:
fig. 3 is a flowchart of an embodiment of a virtual IP address management method according to an exemplary embodiment of the present invention, in the embodiment of the present application, an etcd service is deployed in a cluster in advance, and the etcd service uses a raft algorithm to ensure that key value pairs are strongly consistent in the cluster, that is, key value pairs stored in the etcd service deployed on each node in the cluster are always consistent. The method can be applied to any node in the cluster, as shown in fig. 3, the virtual IP address management method includes the following steps:
step 101: and periodically executing the write operation to the same key in the etcd service deployed by the cluster.
That is, each node in the cluster periodically attempts to record the value recorded by the node into the same key in the etcd service.
Note that, each node records the value of the same key in the etcd service in advance, and the values recorded by the nodes are all different, as shown in fig. 4, the key/VipNominate in the etcd service is recorded in advance, the value of the key/VipNominate is recorded in advance in node1 as node1, the value of the key/VipNominate is recorded in advance in node2 as node2, and the value of the key/VipNominate is recorded in advance in node3 as node 3.
In an optional embodiment, when the node attempts to log in the value recorded by its own node, it may further set a valid duration (i.e. lease period) to implement periodic lease renewal, so that the node specifically performs a key value logging operation and/or a valid duration logging operation on the same key in the etcd service.
That is, if the key and the value have not been logged in the etcd service, the node that first initiates the write operation in the cluster performs the key value logging operation and the valid duration logging operation, and if the key and the value have been logged in the etcd service and the logged value is a value recorded on a certain node in the cluster, the write operation initiated by the certain node is specifically the valid duration logging operation, so as to achieve the purpose of lease renewal.
In an alternative embodiment, as shown in fig. 5, the process of performing a write operation to the same key in the etcd service includes the following steps:
step 1011: it is determined whether there are keys and corresponding values in the etcd service, if yes, step 1012 is executed, and if not, step 1015 is executed.
Optionally, the key and the corresponding value may be read from the etcd service, if the reading is successful, it is determined that the key and the corresponding value are stored in the etcd service, if the reading is failed, 1 is added to the number of times of reading, the key and the corresponding value are continuously read from the etcd service until the number of times of reading reaches a preset number of times, and it is determined that the key and the corresponding value are not stored in the etcd service.
Wherein, the write operation is successfully executed by a multi-time reading mode.
Further, if the number of readings reaches the preset number and still fails to be read, it indicates that the node may have a failure problem and cannot communicate with the etcd service, or may not communicate with the etcd service because of a network isolation problem, and may determine that the node fails to perform the write operation, and if the node is provided with a virtual IP address, the virtual IP address is automatically cleared.
Step 1012: and judging whether the value is the value recorded by the node, if so, executing the step 1013, and if not, executing the step 1014.
Step 1013: and recording the effective duration into the key in the etcd service, and determining that the write operation is successfully executed.
If the read value is consistent with the value recorded by the node, the virtual IP address is currently carried on the node, and the continued lease can be applied to the etcd service, namely, a new effective duration is recorded into the key in the etcd service.
It is noted that the validity duration for the lease renewal is greater than the period of the node initiating the write operation to ensure that the node can complete the lease renewal before the validity duration expires.
It should be noted that, in order to improve the logging success rate, if the node fails to log the valid duration into the key in the etcd service, the node may log into the etcd service again until the logging times reach a certain number.
Further, if the multiple logging fails, it indicates that the node fails to communicate with the etcd service due to a failure problem in the logging process, or fails to communicate with the etcd service due to a network isolation problem, and may determine that the node fails to perform the write operation, and if the node is provided with a virtual IP address, the virtual IP address is automatically cleared.
Step 1014: it is determined that the write operation failed to execute.
If the read value is inconsistent with the value recorded by the node, the virtual IP address is not borne on the node, and the node cannot execute any writing operation.
Step 1015: and recording the key and the value recorded by the node and the effective duration of the key into the etcd service, and determining that the write operation is successfully executed.
If the key and the corresponding value are not stored in the etcd service, the fact that no node executes write-in operation to the key in the etcd service is indicated, and the key and the value which are logged in by the node at this time and the effective duration belong to the first logging in of the etcd service.
It should be noted that, in order to improve the logging success rate, if the node logs the key and the value recorded by the node into the etcd service and the valid duration of the key fails, the node may log into the etcd service again until the logging times reach a certain number.
Further, if the multiple logging fails, it indicates that the node fails to communicate with the etcd service due to a failure problem in the logging process, or fails to communicate with the etcd service due to a network isolation problem, and may determine that the node fails to perform the write operation, and if the node is provided with a virtual IP address, the virtual IP address is automatically cleared.
Based on the above description, in the etcd service deployed on the cluster, the valid duration of the key stored on the cluster needs to be monitored, and when the valid duration expires, it indicates that the node may fail to lease continuously within the valid duration due to a fault or network isolation, so that the key and the corresponding value need to be cleared, so that the virtual IP address can be borne after the key value writing operation is completed by other nodes, and thus the virtual IP address migration is completed.
Step 102: and if the write operation is successfully executed, setting the virtual IP address at the node.
The successful execution of the write operation means that the value of the key stored in the etcd service is the value recorded by the node, which indicates that the virtual IP address is currently carried by the node.
Specifically, the setting command for the node to set the virtual IP address is as follows:
IP address add < virtual IP address >/< mask length > dev < network card name >
The virtual IP address is a virtual address to be set, and the network card name is used to indicate a network card that the virtual IP address needs to be set to the node.
As shown in fig. 6, the value of key/VipNominate stored in the etcd service is node1, that is, the value belongs to the value recorded on node1, so node1 needs to execute a setup command to carry a virtual IP address.
Step 103: and if the write operation fails to be executed, clearing the virtual IP address when the node is provided with the virtual IP address.
Based on the above description of step 101, it can be known that the write operation fails to be executed because the value of the key stored in the etcd service is not the value recorded by the node and cannot be logged, or because the node fails to communicate with the etcd service due to a failure or a network isolation problem, which indicates that the node cannot carry the virtual IP address at this time.
Specifically, the clearing command for the node to clear the virtual IP address is as follows:
IP address del < virtual IP address >/< mask length > dev < network card name >
The virtual IP address is a virtual address to be cleared, and the network card name is used to indicate the network card set by the virtual IP address.
In an exemplary scenario, as shown in fig. 7, when node1 cannot complete lease renewal to key/VipNominate in the etcd service due to network isolation problem, the virtual IP address is automatically cleared, and thus the valid duration of the key expires, the etcd service clears key/VipNominate and value node1, and then node2 logs the key/VipNominate and value node2 recorded on node2 to the etcd service, and sets the virtual IP address on node2, thereby completing virtual IP address migration.
So far, the management process of the virtual IP address shown in fig. 3 is completed, the etcd service is deployed in the cluster, and each node in the cluster periodically executes the write operation to the same key in the etcd service, because the etcd service has the characteristic of ensuring that the key and the value are strongly consistent in the cluster, only one node can execute the successful write operation at the same time, so that the virtual IP address can be set on the node where the write operation is successfully executed, and the node where the write operation is failed to execute automatically clears the set virtual IP address, thereby completing the allocation of the virtual IP address, and ensuring the high availability switching of the virtual IP address.
Further, even when the node has network isolation or fault problems, the virtual IP address can be automatically cleared because the node writing operation fails, so that the problem that the virtual IP address coexists on a plurality of nodes due to network isolation and other problems can be avoided.
Corresponding to the embodiment of the virtual IP address management method, the present invention also provides an embodiment of a virtual IP address management apparatus.
Fig. 8 is a schematic structural diagram of a virtual IP address management apparatus according to an exemplary embodiment of the present invention, the apparatus is configured to execute the virtual IP address management method provided in any of the above embodiments, and as shown in fig. 8, the apparatus includes.
A write module 810, configured to periodically perform a write operation to the same key in the etcd service;
a virtual IP setting module 820, configured to set a virtual IP address at the local node when the write operation is successfully executed;
and the virtual IP clearing module 830 is configured to clear the virtual IP address when the write operation fails to be executed and the node is provided with the virtual IP address.
In an optional implementation manner, the writing module 810 is specifically configured to periodically perform a key value logging operation and/or an effective duration logging operation on the same key in the etcd service.
In an optional implementation manner, the write module is specifically configured to determine whether the key and the corresponding value are stored in the etcd service; if the key and the corresponding value are stored, judging whether the value is the value recorded by the node; if the value is the value recorded by the node, recording the effective duration into the key in the etcd service, and determining that the write operation is successfully executed; and if the current node is not the value recorded by the node, determining that the write operation fails to execute. And if the key and the corresponding value are not stored, recording the key and the value recorded by the node and the effective duration of the key into the etcd service, and determining that the write operation is successfully executed.
In an optional implementation manner, the writing module 810 is specifically configured to, in the process of determining whether the key and the corresponding value are stored in the etcd service, read the key and the corresponding value to the etcd service; if the reading is successful, determining that the key and the corresponding value are stored in the etcd service; and if the reading fails, adding 1 to the reading times, continuing to read the key and the corresponding value from the etcd service until the reading times reach the preset times, ending the reading until the key and the corresponding value are not stored in the etcd service.
In an alternative implementation, the apparatus further comprises (not shown in fig. 8): the monitoring module is used for monitoring the effective duration of the key through the etcd service; clearing the key and corresponding value when the validity period expires.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A virtual IP address management method is applied to any node in a cluster, wherein the any node is in communication connection with a distributed consistency key value storage (etcd) service deployed in the cluster, and the method comprises the following steps:
periodically executing a write operation to the same key in the etcd service;
if the write operation is successfully executed, setting a virtual IP address at the node;
and if the write operation fails to be executed, clearing the virtual IP address when the virtual IP address is set in the node.
2. The method of claim 1, wherein the periodically performing a write operation to the same key in the etcd service comprises:
and periodically executing a key value logging operation and/or a valid duration logging operation on the same key in the etcd service.
3. The method of claim 2, wherein the periodically performing a key-value posting operation and/or a valid-duration posting operation to the same key in the etcd service comprises:
judging whether the key and the corresponding value are stored in the etcd service;
if the key and the corresponding value are stored, judging whether the value is the value recorded by the node;
if the value is the value recorded by the node, recording the effective duration into the key in the etcd service, and determining that the write operation is successfully executed;
if the current node is not the value recorded by the current node, determining that the write operation fails to be executed;
and if the key and the corresponding value are not stored, recording the key and the value recorded by the node and the effective duration of the key into the etcd service, and determining that the write operation is successfully executed.
4. The method of claim 3, wherein the determining whether the key and the corresponding value are stored in the etcd service comprises:
reading the key and corresponding value to the etcd service;
if the reading is successful, determining that the key and the corresponding value are stored in the etcd service;
and if the reading fails, adding 1 to the reading times, continuing to read the key and the corresponding value from the etcd service until the reading times reach the preset times, and determining that the key and the corresponding value are not stored in the etcd service.
5. The method of claim 3, further comprising:
monitoring the effective duration of the key through the etcd service;
clearing the key and corresponding value when the validity period expires.
6. A virtual IP address management device is applied to any node in a cluster, wherein the node is in communication connection with a distributed consistency key value storage (etcd) service deployed in the cluster, and the device comprises:
the writing module is used for periodically executing writing operation to the same key in the etcd service;
the virtual IP setting module is used for setting a virtual IP address at the node when the write-in operation is successfully executed;
and the virtual IP clearing module is used for clearing the virtual IP address when the write operation execution fails and the node is provided with the virtual IP address.
7. The apparatus according to claim 6, wherein the write module is specifically configured to periodically perform a key value posting operation and/or a valid duration posting operation on the same key in the etcd service.
8. The apparatus of claim 7, wherein the writing module is specifically configured to determine whether the key and a corresponding value are stored in the etcd service; if the key and the corresponding value are stored, judging whether the value is the value recorded by the node; if the value is the value recorded by the node, recording the effective duration into the key in the etcd service, and determining that the write operation is successfully executed; and if the current node is not the value recorded by the node, determining that the write operation fails to execute. And if the key and the corresponding value are not stored, recording the key and the value recorded by the node and the effective duration of the key into the etcd service, and determining that the write operation is successfully executed.
9. The apparatus according to claim 8, wherein the writing module is specifically configured to, in the process of determining whether the key and the corresponding value exist in the etcd service, read the key and the corresponding value to the etcd service; if the reading is successful, determining that the key and the corresponding value are stored in the etcd service; and if the reading fails, adding 1 to the reading times, continuing to read the key and the corresponding value from the etcd service until the reading times reach the preset times, ending the reading until the key and the corresponding value are not stored in the etcd service.
10. The apparatus of claim 8, further comprising:
the monitoring module is used for monitoring the effective duration of the key through the etcd service; clearing the key and corresponding value when the validity period expires.
CN202111350439.3A 2021-11-15 2021-11-15 Virtual IP address management method and device Withdrawn CN114124903A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111350439.3A CN114124903A (en) 2021-11-15 2021-11-15 Virtual IP address management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111350439.3A CN114124903A (en) 2021-11-15 2021-11-15 Virtual IP address management method and device

Publications (1)

Publication Number Publication Date
CN114124903A true CN114124903A (en) 2022-03-01

Family

ID=80396537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111350439.3A Withdrawn CN114124903A (en) 2021-11-15 2021-11-15 Virtual IP address management method and device

Country Status (1)

Country Link
CN (1) CN114124903A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115714722A (en) * 2022-12-15 2023-02-24 中国西安卫星测控中心 Dynamic configuration method, device and system for cluster network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160321294A1 (en) * 2015-04-30 2016-11-03 Vmware, Inc. Distributed, Scalable Key-Value Store
CN109639794A (en) * 2018-12-10 2019-04-16 杭州数梦工场科技有限公司 A kind of stateful cluster recovery method, apparatus, equipment and readable storage medium storing program for executing
WO2019184164A1 (en) * 2018-03-30 2019-10-03 平安科技(深圳)有限公司 Method for automatically deploying kubernetes worker node, device, terminal apparatus, and readable storage medium
US20200137185A1 (en) * 2018-10-24 2020-04-30 Hewlett Packard Enterprise Development Lp Remote service access in a container management system
CN112732674A (en) * 2021-01-08 2021-04-30 烽火通信科技股份有限公司 Cloud platform service management method, device, equipment and readable storage medium
CN113326100A (en) * 2021-06-29 2021-08-31 深信服科技股份有限公司 Cluster management method, device and equipment and computer storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160321294A1 (en) * 2015-04-30 2016-11-03 Vmware, Inc. Distributed, Scalable Key-Value Store
WO2019184164A1 (en) * 2018-03-30 2019-10-03 平安科技(深圳)有限公司 Method for automatically deploying kubernetes worker node, device, terminal apparatus, and readable storage medium
US20200137185A1 (en) * 2018-10-24 2020-04-30 Hewlett Packard Enterprise Development Lp Remote service access in a container management system
CN109639794A (en) * 2018-12-10 2019-04-16 杭州数梦工场科技有限公司 A kind of stateful cluster recovery method, apparatus, equipment and readable storage medium storing program for executing
CN112732674A (en) * 2021-01-08 2021-04-30 烽火通信科技股份有限公司 Cloud platform service management method, device, equipment and readable storage medium
CN113326100A (en) * 2021-06-29 2021-08-31 深信服科技股份有限公司 Cluster management method, device and equipment and computer storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115714722A (en) * 2022-12-15 2023-02-24 中国西安卫星测控中心 Dynamic configuration method, device and system for cluster network
CN115714722B (en) * 2022-12-15 2023-09-08 中国西安卫星测控中心 Cluster network dynamic configuration method, device and system

Similar Documents

Publication Publication Date Title
EP3811597B1 (en) Zone redundant computing services using multiple local services in distributed computing systems
EP3620905B1 (en) Method and device for identifying osd sub-health, and data storage system
EP3518110B1 (en) Designation of a standby node
CN107533438B (en) Data replication in a memory system
CN109005045B (en) Main/standby service system and main node fault recovery method
US10862741B2 (en) Network-based IP configuration recovery
CN103885895A (en) Write Performance in Fault-Tolerant Clustered Storage Systems
CN106911728A (en) The choosing method and device of host node in distributed system
CN108345617B (en) Data synchronization method and device and electronic equipment
CN110673941B (en) Migration method of micro-services in multiple computer rooms, electronic equipment and storage medium
CN104503965A (en) High-elasticity high availability and load balancing realization method of PostgreSQL (Structured Query Language)
CN109491609B (en) Cache data processing method, device and equipment and readable storage medium
CN109739435B (en) File storage and updating method and device
CN111147274B (en) System and method for creating a highly available arbitration set for a cluster solution
CN114124903A (en) Virtual IP address management method and device
US11153173B1 (en) Dynamically updating compute node location information in a distributed computing environment
CN111342986A (en) Distributed node management method and device, distributed system and storage medium
CN107528703B (en) Method and equipment for managing node equipment in distributed system
US7002905B1 (en) Method and apparatus for performing the rebooting of a network node with minimal loss of network traffic
US11921699B1 (en) Lease-based consistency management for handling failover in a database
CN114124803B (en) Device management method and device, electronic device and storage medium
CN113626139B (en) High-availability virtual machine storage method and device
CN112882771A (en) Server switching method and device of application system, storage medium and electronic equipment
CN108614873B (en) Data processing method and device
EP3884648B1 (en) Geo-replicated iot hub

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: 20220301

WW01 Invention patent application withdrawn after publication