CN110493060A - A kind of virtual IP address distribution method and relevant apparatus - Google Patents
A kind of virtual IP address distribution method and relevant apparatus Download PDFInfo
- Publication number
- CN110493060A CN110493060A CN201910802808.4A CN201910802808A CN110493060A CN 110493060 A CN110493060 A CN 110493060A CN 201910802808 A CN201910802808 A CN 201910802808A CN 110493060 A CN110493060 A CN 110493060A
- Authority
- CN
- China
- Prior art keywords
- virtual
- address
- node
- corresponding relationship
- group
- 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
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
-
- 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/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0823—Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Abstract
This application discloses a kind of virtual IP address distribution methods, including establishing the corresponding relationship of virtual IP address and node and the corresponding relationship of node and virtual IP address group;Virtual IP address is traversed, according to virtual IP address node corresponding with the corresponding relationship of node lookup virtual IP address and judges whether node is normal;If node is abnormal nodes, virtual IP address group belonging to abnormal nodes is determined according to the corresponding relationship of node and virtual IP address group and is judged under virtual IP address group with the presence or absence of normal node;If it exists, then virtual IP address is distributed to the normal node under virtual IP address group belonging to abnormal nodes;If it does not exist, then virtual IP address is distributed to the normal node under other virtual IP address groups.The virtual IP address distribution method can effectively meet the standby application demand of calamity, improve cluster load process performance, stability and High Availabitity characteristic.Disclosed herein as well is a kind of virtual IP address distributor, equipment and computer readable storage mediums, all have above-mentioned technical effect.
Description
Technical field
This application involves technical field of distributed memory, in particular to a kind of virtual IP address distribution method;Further relate to a kind of void
Quasi- IP distributor, equipment and computer readable storage medium.
Background technique
CTDB is a kind of cluster High Availabitity management software, in CTDB start-up course, can be read from virtual IP address configuration file
The virtual IP address that configures out is simultaneously average by these virtual IP addresses according to assignment algorithm and be assigned randomly on each node of cluster, works as cluster
In some or certain nodes break downs when, CTDB can execute failover, and the virtual IP address distributed on former malfunctioning node is released
It bleeds off and the virtual IP address is then floated into other normal nodes, corresponding read-write business can also float to other normal nodes;When
After malfunctioning node recovery is normally added cluster, the virtual IP address that CTDB can randomly select on other nodes is assigned on the node.
Currently, existing above-mentioned virtual IP address distribution method be randomly assigned, the virtual IP address that each node is assigned to be it is random,
Each node can not be predicted in advance can assign to for which virtual IP address, node is restarted cluster is added after CTDB randomly select some or it is more
A virtual IP address is assigned to the node, and satiable application scenarios are limited, is especially unable to satisfy the standby application demand of calamity.
Therefore, how a kind of virtual IP address allocation plan is provided, the standby application demand of calamity is met, improves cluster and loads treatability
Energy, stability and High Availabitity characteristic have become those skilled in the art's technical problem urgently to be resolved.
Summary of the invention
The purpose of the application is to provide a kind of virtual IP address distribution method, can effectively meet the standby application demand of calamity, improves
Cluster loads process performance, stability and High Availabitity characteristic;The another object of the application is to provide a kind of virtual IP address distribution dress
It sets, equipment and computer readable storage medium, all has above-mentioned technical effect.
In order to solve the above technical problems, this application provides a kind of method for scheduling task, comprising:
Establish the corresponding relationship of virtual IP address and node and the corresponding relationship of node and virtual IP address group;
Virtual IP address is traversed, according to virtual IP address node corresponding with the corresponding relationship of the node lookup virtual IP address and is sentenced
Whether the node that breaks is normal;
If the node is abnormal nodes, the abnormal section is determined according to the corresponding relationship of the node and virtual IP address group
Virtual IP address group belonging to point, and judge under the virtual IP address group with the presence or absence of normal node;
If it exists, then the virtual IP address is distributed to the normal node under virtual IP address group belonging to the abnormal nodes;
If it does not exist, then the virtual IP address is distributed to the normal node under other virtual IP address groups.
Optionally, the corresponding relationship of the corresponding relationship for establishing virtual IP address and node and node and virtual IP address group, packet
It includes:
Virtual IP address list is traversed, the corresponding relationship of virtual IP address and node is established;
Virtual IP address is traversed, each virtual IP address under phase same network segment is divided to same group according to network segment where each virtual IP address and is obtained
To the corresponding relationship of virtual IP address and virtual IP address group;
Virtual IP address is traversed, it is corresponding with virtual IP address group with the virtual IP address with the corresponding relationship of node according to the virtual IP address
Relationship establishes the corresponding relationship of the node Yu virtual IP address group.
It is optionally, described that the virtual IP address is distributed into the normal node, comprising:
The virtual IP address is distributed to the virtual IP address quantity currently held under virtual IP address group belonging to the abnormal nodes
The smallest normal node.
Optionally, the normal node virtual IP address distributed under other virtual IP address groups, comprising:
The virtual IP address is distributed to the smallest normal node of virtual IP address quantity currently held under other virtual IP address groups.
Optionally, further includes:
After the abnormal nodes restore normal, according to the corresponding relationship of the virtual IP address and node by the abnormal nodes
Corresponding virtual IP address distributes to the abnormal nodes.
In order to solve the above technical problems, present invention also provides a kind of virtual IP address distributors, comprising:
Module is established, for establishing the corresponding relationship of virtual IP address and node and the corresponding relationship of node and virtual IP address group;
First judgment module searches the void according to the corresponding relationship of the virtual IP address and node for traversing virtual IP address
The quasi- corresponding node of IP simultaneously judges whether the node is normal;
Second judgment module, it is corresponding with virtual IP address group according to the node if being abnormal nodes for the node
Relationship determines virtual IP address group belonging to the abnormal nodes, and judges under the virtual IP address group with the presence or absence of normal node;
First distribution module, for if it exists, then the virtual IP address being distributed to virtual IP address belonging to the abnormal nodes
The normal node under group;
Second distribution module, for if it does not exist, then the virtual IP address to be distributed to the normal section under other virtual IP address groups
Point.
Optionally, the module of establishing includes:
The correspondence relationship establishing unit of virtual IP address and node establishes virtual IP address and node for traversing virtual IP address list
Corresponding relationship;
The correspondence relationship establishing unit of virtual IP address and virtual IP address group, for traversing virtual IP address, according to net where each virtual IP address
Each virtual IP address under phase same network segment is divided to same group and obtains the corresponding relationship of virtual IP address Yu virtual IP address group by section;
The correspondence relationship establishing unit of node and virtual IP address group, for traversing virtual IP address, according to the virtual IP address and node
Corresponding relationship and the corresponding relationship of the virtual IP address and virtual IP address group establish the corresponding relationship of the node Yu virtual IP address group.
Optionally, first distribution module is specifically used for distributing to the virtual IP address into the virtual IP address quantity currently held
The smallest normal node.
In order to solve the above technical problems, present invention also provides a kind of virtual IP address distributing equipments, comprising:
Memory, for storing computer program;
Processor, the step of virtual IP address distribution method as described above is realized when for executing the computer program.
In order to solve the above technical problems, the computer can present invention also provides a kind of computer readable storage medium
It reads storage medium and is stored with computer program, the computer program realizes virtual IP address as described above point when being executed by processor
The step of method of completing the square.
Virtual IP address distribution method provided herein, including establish virtual IP address and node corresponding relationship and node with
The corresponding relationship of virtual IP address group;Virtual IP address is traversed, the virtual IP address pair is searched according to the corresponding relationship of the virtual IP address and node
The node answered simultaneously judges whether the node is normal;If the node is abnormal nodes, according to the node and virtual IP address group
Corresponding relationship determine virtual IP address group belonging to the abnormal nodes, and judge under the virtual IP address group with the presence or absence of normal section
Point;If it exists, then the virtual IP address is distributed to the normal node under virtual IP address group belonging to the abnormal nodes;If not depositing
The virtual IP address is then being distributed to the normal node under other virtual IP address groups.
As it can be seen that virtual IP address distribution method provided herein, during distributing virtual IP address, based on virtual IP address and section
Virtual IP address is preferentially distributed to the node of areal by the corresponding relationship and node of point and the corresponding relationship of virtual IP address group, with excellent
The node of this area is first allowed to provide service, the node in other areas wouldn't provide service, when event all occurs for the node of this area
When barrier, then allow other area node provide service, guarantee cluster externally can normal use, meet the standby application demand of calamity,
Improve cluster load process performance, stability and High Availabitity characteristic.
Virtual IP address distributor, equipment and computer readable storage medium provided herein, all has above-mentioned skill
Art effect.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to institute in the prior art and embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the application
Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings
Obtain other attached drawings.
Fig. 1 is a kind of flow diagram of virtual IP address distribution method provided by the embodiment of the present application;
Fig. 2 is a kind of schematic diagram of virtual IP address distributor provided by the embodiment of the present application;
Fig. 3 is a kind of schematic diagram of virtual IP address distributing equipment provided by the embodiment of the present application.
Specific embodiment
The core of the application is to provide a kind of virtual IP address distribution method, can effectively meet the standby application demand of calamity, improves
Cluster loads process performance, stability and High Availabitity characteristic;Another core of the application is to provide a kind of virtual IP address distribution dress
It sets, equipment and computer readable storage medium, all has above-mentioned technical effect.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Referring to FIG. 1, Fig. 1 is a kind of flow diagram of virtual IP address distribution method provided by the embodiment of the present application;Ginseng
It examines shown in Fig. 1, which includes:
S101: the corresponding relationship of virtual IP address and node and the corresponding relationship of node and virtual IP address group are established;
Specifically, this step is intended to establish the corresponding pass of virtual IP address with the corresponding relationship of node and node and virtual IP address group
System, so that corresponding relationship and node of the CTDB host node based on this virtual IP address and node and the corresponding relationship of virtual IP address group carry out
Virtual IP address distribution.So-called CTDB host node, i.e., by being responsible for fault recovery (packet in the cluster that constitutes of nodes of multiple starting CTDB
Include virtual IP address distribution) node.
Wherein, in a kind of specific embodiment, the above-mentioned corresponding relationship for establishing virtual IP address and node and node with
The corresponding relationship of virtual IP address group may include traversal virtual IP address list, establish the corresponding relationship of virtual IP address and node;Traversal is virtual
Each virtual IP address under phase same network segment is divided to same group according to network segment where each virtual IP address and obtains virtual IP address and virtual IP address by IP
The corresponding relationship of group;Virtual IP address is traversed, according to the corresponding pass of virtual IP address and the corresponding relationship of node and virtual IP address and virtual IP address group
System establishes the corresponding relationship of node Yu virtual IP address group.
Specifically, firstly, traversal virtual IP address list, can be used and be with node number by No. i-th virtual IP address in virtual IP address list
The corresponding mode of the node of i% number of nodes establishes the corresponding relationship of virtual IP address and node, obtains pv_list (vip, pnn).Its
In, vip is virtual IP address, and pnn is node serial number.One virtual IP address can only be held by a node, that is, specify a vip,
To find a unique pnn.
Secondly, virtual IP address list can be traversed, each virtual IP address that will be belonged under phase same network segment according to network segment where each virtual IP address
It is divided to same group, to obtain the corresponding relationship of virtual IP address Yu virtual IP address group, obtains vg_list (vip_net, gid).
Wherein, vip_net is the network segment of virtual IP address, and gid is group mark, the corresponding group of a gid.A vip is specified, can be looked for
To a unique vip_net.
In turn, traversal virtual IP address list is found belonging to it for each virtual IP address in vg_list (vip_net, gid)
The group of virtual IP address group identifies gid, and its corresponding node serial number pnn is found in pv_list (vip, pnn), and then determines section
The corresponding relationship of point and virtual IP address group, obtains pg_list (pnn, gid).
It is to be appreciated that step S101 can be only performed once, that is, complete to establish the corresponding relationship of virtual IP address and node with
And without repeating foundation operation after node and the corresponding relationship of virtual IP address group, and when needing to modify corresponding relationship, then
Re-execute aforesaid operations.
S102: traversal virtual IP address according to virtual IP address node corresponding with the corresponding relationship of node lookup virtual IP address and judges
Whether node is normal;
S103: it if node is abnormal nodes, is determined belonging to abnormal nodes according to the corresponding relationship of node and virtual IP address group
Virtual IP address group, and judge under virtual IP address group with the presence or absence of normal node;
Specifically, establishing the corresponding pass for completing above-mentioned virtual IP address with the corresponding relationship of node and node and virtual IP address group
On the basis of system, when CTDB host node carries out virtual IP address distribution, virtual IP address is traversed, and according to the corresponding relationship of virtual IP address and node
Node corresponding to virtual IP address is searched, and judges whether the node is normal.If the node is normal node, by the virtual IP address point
Its corresponding node of dispensing.On the contrary, if the node is abnormal nodes, it can be by the corresponding virtual IP address of the abnormal nodes labeled as not
Distribution state, and then traverse each unappropriated virtual IP address, and further determined according to the corresponding relationship of node and virtual IP address group different
Virtual IP address group belonging to Chang Jiedian, and judge under the virtual IP address group with the presence or absence of normal node.
S104: if it exists, then virtual IP address is distributed to the normal node under virtual IP address group belonging to abnormal nodes;
Specifically, if there are normal nodes under virtual IP address group belonging to abnormal nodes, by the corresponding void of this abnormal nodes
Quasi- IP distributes to the normal node under this virtual IP address group.And when in order to guarantee virtual IP address drift, node is balanced, that is, guarantees each node
The virtual IP address quantity held at most differs 1, avoids certain node loads caused by distributing unevenness due to virtual IP address overweight
Situation, in a kind of specific embodiment, above-mentioned virtual IP address is distributed to normal node may include distributing to virtual IP address
The smallest normal node of virtual IP address quantity currently held under virtual IP address group belonging to abnormal nodes.
S105: if it does not exist, then virtual IP address is distributed to the normal node under other virtual IP address groups.
Specifically, if normal node is not present under virtual IP address group belonging to abnormal nodes, this abnormal nodes are corresponding
Virtual IP address distributes to the normal node under other virtual IP address groups.When equally, in order to guarantee virtual IP address drift, node is balanced, avoids
Due to virtual IP address distribution it is uneven caused by the overweight situation of certain node loads, it is above-mentioned in a kind of specific embodiment
By virtual IP address distribute to the normal node under other virtual IP address groups may include virtual IP address is distributed under other virtual IP address groups when
Before the smallest normal node of virtual IP address quantity held.
Further, in a kind of specific embodiment, further include after abnormal nodes restore normal, according to virtual IP address with
The corresponding virtual IP address of abnormal nodes is distributed to abnormal nodes by the corresponding relationship of node.To realize virtual IP address to a certain extent
Fixed allocation, the virtual IP address that node failure front and back is held is identical, can effectively avoid by the void that node is held before and after failure
Quasi- IP is different and leads to the node of offer business also different situation, improves clustering performance.
To which when there is node failure in main area, CTDB host node carries out virtual IP address distribution preferentially by the malfunctioning node
Virtual IP address, which is floated in main regional node, to be held in the least normal node of virtual IP address, when not having normal node in main regional node
When, just the virtual IP address is floated in the normal nodes in other areas, when malfunctioning node restores normal, void that it was originally held
Quasi- IP floats back again, that is, is allocated back to and.When the nodes break down in non-master area, virtual IP address is preferentially floated to the non-residence area
On the node of this area, when this area node whole failure, then it is floated on other regional nodes, can be main area, it can also be with
It is other non-master areas, after node failure restores, the virtual IP address that it was originally held floats back again.
In conclusion virtual IP address distribution method provided herein is based on virtual IP address during distributing virtual IP address
Virtual IP address is preferentially distributed to the node of areal with the corresponding relationship and node of node and the corresponding relationship of virtual IP address group,
Preferentially to allow the node of this area to provide service, the node in other areas wouldn't provide service, when the node of this area is all sent out
When raw failure, then the node in other areas is allowed to provide service, guarantee cluster externally can normal use, meet calamity it is standby apply need
It asks, improves cluster load process performance, stability and High Availabitity characteristic.
Present invention also provides a kind of virtual IP address distributor, the device described below can be with method as described above
Correspond to each other reference.It please refers to shown in Fig. 2, which includes:
Module 10 is established, for establishing the corresponding pass of virtual IP address with the corresponding relationship of node and node and virtual IP address group
System;
First judgment module 20 searches virtual IP address pair according to the corresponding relationship of virtual IP address and node for traversing virtual IP address
The node answered simultaneously judges whether node is normal;
Second judgment module 30, it is true according to node and the corresponding relationship of virtual IP address group if being abnormal nodes for node
Determine virtual IP address group belonging to abnormal nodes, and judges under virtual IP address group with the presence or absence of normal node;
First distribution module 40, for if it exists, then distributing to virtual IP address under virtual IP address group belonging to abnormal nodes
Normal node;
Second distribution module 50, for if it does not exist, then virtual IP address to be distributed to the normal node under other virtual IP address groups.
On the basis of the above embodiments, as a kind of specific embodiment, establishing module 10 includes:
The correspondence relationship establishing unit of virtual IP address and node establishes virtual IP address and node for traversing virtual IP address list
Corresponding relationship;
The correspondence relationship establishing unit of virtual IP address and virtual IP address group, for traversing virtual IP address, according to net where each virtual IP address
Each virtual IP address under phase same network segment is divided to same group and obtains the corresponding relationship of virtual IP address Yu virtual IP address group by section;
The correspondence relationship establishing unit of node and virtual IP address group, for traversing virtual IP address, according to pair of virtual IP address and node
It should be related to that the corresponding relationship with virtual IP address and virtual IP address group establishes the corresponding relationship of node Yu virtual IP address group.
On the basis of the above embodiments, as a kind of specific embodiment, the first distribution module is specifically used for will be empty
Quasi- IP distributes to the smallest normal node of virtual IP address quantity currently held under virtual IP address group belonging to abnormal nodes.
On the basis of the above embodiments, as a kind of specific embodiment, the second distribution module is specifically used for will be empty
Quasi- IP distributes to the smallest normal node of virtual IP address quantity currently held under other virtual IP address groups.
On the basis of the above embodiments, as a kind of specific embodiment, further includes:
Third distribution module is used for after abnormal nodes restore normal, will be different according to the corresponding relationship of virtual IP address and node
The corresponding virtual IP address of Chang Jiedian distributes to abnormal nodes.
Present invention also provides a kind of virtual IP address distributing equipments, comprising: memory 1 and processor 2;Wherein, memory 1 is used
In storage computer program;Processor 2 is for realizing following step when executing the computer program:
Establish the corresponding relationship of virtual IP address and node and the corresponding relationship of node and virtual IP address group;Traverse virtual IP address, root
According to virtual IP address node corresponding with the corresponding relationship of node lookup virtual IP address and judge whether node is normal;If node is abnormal section
Point then determines virtual IP address group belonging to abnormal nodes according to the corresponding relationship of node and virtual IP address group, and judges under virtual IP address group
With the presence or absence of normal node;If it exists, then virtual IP address is distributed to the normal node under virtual IP address group belonging to abnormal nodes;If
It is not present, then virtual IP address is distributed to the normal node under other virtual IP address groups.
The embodiment of the above method is please referred to for the introduction of equipment provided herein, the application does not do superfluous herein
It states.
Present invention also provides a kind of computer readable storage medium, calculating is stored on the computer readable storage medium
Machine program, the computer program realize following step when being executed by processor:
Establish the corresponding relationship of virtual IP address and node and the corresponding relationship of node and virtual IP address group;Traverse virtual IP address, root
According to virtual IP address node corresponding with the corresponding relationship of node lookup virtual IP address and judge whether node is normal;If node is abnormal section
Point then determines virtual IP address group belonging to abnormal nodes according to the corresponding relationship of node and virtual IP address group, and judges under virtual IP address group
With the presence or absence of normal node;If it exists, then virtual IP address is distributed to the normal node under virtual IP address group belonging to abnormal nodes;If
It is not present, then virtual IP address is distributed to the normal node under other virtual IP address groups.
The computer readable storage medium may include: USB flash disk, mobile hard disk, read-only memory (Read-Only
Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit
Store up the medium of program code.
Above method embodiment is please referred to for the introduction of computer readable storage medium provided by the present invention, the present invention
This will not be repeated here.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment, set
For standby and computer readable storage medium, since it is corresponded to the methods disclosed in the examples, so the comparison of description is simple
Single, reference may be made to the description of the method.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Above to virtual IP address distribution method, device, equipment and computer readable storage medium provided herein into
It has gone and has been discussed in detail.Specific examples are used herein to illustrate the principle and implementation manner of the present application, the above implementation
The explanation of example is merely used to help understand the present processes and its core concept.It should be pointed out that for the general of the art
For logical technical staff, under the premise of not departing from the application principle, can also to the application, some improvement and modification can also be carried out, this
A little improvement and modification also fall into the protection scope of the claim of this application.
Claims (10)
1. a kind of virtual IP address distribution method characterized by comprising
Establish the corresponding relationship of virtual IP address and node and the corresponding relationship of node and virtual IP address group;
Virtual IP address is traversed, according to virtual IP address node corresponding with the corresponding relationship of the node lookup virtual IP address and judges institute
Whether normal state node;
If the node is abnormal nodes, the abnormal nodes institute is determined according to the corresponding relationship of the node and virtual IP address group
The virtual IP address group of category, and judge under the virtual IP address group with the presence or absence of normal node;
If it exists, then the virtual IP address is distributed to the normal node under virtual IP address group belonging to the abnormal nodes;
If it does not exist, then the virtual IP address is distributed to the normal node under other virtual IP address groups.
2. virtual IP address distribution method according to claim 1, which is characterized in that described to establish virtual IP address corresponding with node
The corresponding relationship of relationship and node and virtual IP address group, comprising:
Virtual IP address list is traversed, the corresponding relationship of virtual IP address and node is established;
Virtual IP address is traversed, each virtual IP address under phase same network segment is divided to same group according to network segment where each virtual IP address and obtains void
The corresponding relationship of quasi- IP and virtual IP address group;
Virtual IP address is traversed, according to the corresponding relationship of the corresponding relationship of the virtual IP address and node and the virtual IP address and virtual IP address group
Establish the corresponding relationship of the node Yu virtual IP address group.
3. virtual IP address distribution method according to claim 2, which is characterized in that it is described the virtual IP address is distributed to it is described
Normal node under virtual IP address group belonging to abnormal nodes, comprising:
It is minimum that the virtual IP address is distributed into the virtual IP address quantity currently held under virtual IP address group belonging to the abnormal nodes
Normal node.
4. virtual IP address distribution method according to claim 3, which is characterized in that described that the virtual IP address is distributed to other
Normal node under virtual IP address group, comprising:
The virtual IP address is distributed to the smallest normal node of virtual IP address quantity currently held under other virtual IP address groups.
5. virtual IP address distribution method according to claim 4, which is characterized in that further include:
It is with the corresponding relationship of node that the abnormal nodes are corresponding according to the virtual IP address after abnormal nodes restore normal
Virtual IP address distribute to the abnormal nodes.
6. a kind of virtual IP address distributor characterized by comprising
Module is established, for establishing the corresponding relationship of virtual IP address and node and the corresponding relationship of node and virtual IP address group;
First judgment module searches the virtual IP address according to the corresponding relationship of the virtual IP address and node for traversing virtual IP address
Corresponding node simultaneously judges whether the node is normal;
Second judgment module, if being abnormal nodes for the node, according to the corresponding relationship of the node and virtual IP address group
It determines virtual IP address group belonging to the abnormal nodes, and judges under the virtual IP address group with the presence or absence of normal node;
First distribution module, for if it exists, then distributing to the virtual IP address under virtual IP address group belonging to the abnormal nodes
Normal node;
Second distribution module, for if it does not exist, then the virtual IP address to be distributed to the normal node under other virtual IP address groups.
7. virtual IP address distributor according to claim 6, which is characterized in that the module of establishing includes:
It is corresponding with node to establish virtual IP address for traversing virtual IP address list for the correspondence relationship establishing unit of virtual IP address and node
Relationship;
The correspondence relationship establishing unit of virtual IP address and virtual IP address group will according to network segment where each virtual IP address for traversing virtual IP address
Each virtual IP address under phase same network segment is divided to same group and obtains the corresponding relationship of virtual IP address Yu virtual IP address group;
The correspondence relationship establishing unit of node and virtual IP address group, for traversing virtual IP address, according to pair of the virtual IP address and node
It should be related to that the corresponding relationship with the virtual IP address and virtual IP address group establishes the corresponding relationship of the node Yu virtual IP address group.
8. virtual IP address distributor according to claim 7, which is characterized in that first distribution module is specifically used for will
It is the smallest normal that the virtual IP address distributes to the virtual IP address quantity currently held under virtual IP address group belonging to the abnormal nodes
Node.
9. a kind of virtual IP address distributing equipment characterized by comprising
Memory, for storing computer program;
Processor realizes such as virtual IP address distribution side described in any one of claim 1 to 5 when for executing the computer program
The step of method.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey
Sequence is realized when the computer program is executed by processor such as virtual IP address distribution method described in any one of claim 1 to 5
Step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910802808.4A CN110493060A (en) | 2019-08-28 | 2019-08-28 | A kind of virtual IP address distribution method and relevant apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910802808.4A CN110493060A (en) | 2019-08-28 | 2019-08-28 | A kind of virtual IP address distribution method and relevant apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110493060A true CN110493060A (en) | 2019-11-22 |
Family
ID=68554856
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910802808.4A Pending CN110493060A (en) | 2019-08-28 | 2019-08-28 | A kind of virtual IP address distribution method and relevant apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110493060A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111770209A (en) * | 2020-05-29 | 2020-10-13 | 苏州浪潮智能科技有限公司 | Virtual IP redistribution method, terminal and storage medium |
CN111866210A (en) * | 2020-07-08 | 2020-10-30 | 苏州浪潮智能科技有限公司 | Virtual IP balance distribution method, system, terminal and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150381527A1 (en) * | 2014-06-30 | 2015-12-31 | International Business Machines Corporation | Supporting flexible deployment and migration of virtual servers via unique function identifiers |
WO2018112805A1 (en) * | 2016-12-21 | 2018-06-28 | 深圳前海达闼云端智能科技有限公司 | Blockchain storage method and device, and node device |
CN108881411A (en) * | 2018-05-31 | 2018-11-23 | 郑州云海信息技术有限公司 | A kind of method that CTDB cluster is grouped under extensive node |
CN108923992A (en) * | 2018-08-23 | 2018-11-30 | 郑州云海信息技术有限公司 | A kind of NAS cluster high availability method, system and electronic equipment and storage medium |
CN109151028A (en) * | 2018-08-23 | 2019-01-04 | 郑州云海信息技术有限公司 | A kind of distributed memory system disaster recovery method and device |
-
2019
- 2019-08-28 CN CN201910802808.4A patent/CN110493060A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150381527A1 (en) * | 2014-06-30 | 2015-12-31 | International Business Machines Corporation | Supporting flexible deployment and migration of virtual servers via unique function identifiers |
WO2018112805A1 (en) * | 2016-12-21 | 2018-06-28 | 深圳前海达闼云端智能科技有限公司 | Blockchain storage method and device, and node device |
CN108881411A (en) * | 2018-05-31 | 2018-11-23 | 郑州云海信息技术有限公司 | A kind of method that CTDB cluster is grouped under extensive node |
CN108923992A (en) * | 2018-08-23 | 2018-11-30 | 郑州云海信息技术有限公司 | A kind of NAS cluster high availability method, system and electronic equipment and storage medium |
CN109151028A (en) * | 2018-08-23 | 2019-01-04 | 郑州云海信息技术有限公司 | A kind of distributed memory system disaster recovery method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111770209A (en) * | 2020-05-29 | 2020-10-13 | 苏州浪潮智能科技有限公司 | Virtual IP redistribution method, terminal and storage medium |
CN111866210A (en) * | 2020-07-08 | 2020-10-30 | 苏州浪潮智能科技有限公司 | Virtual IP balance distribution method, system, terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11586673B2 (en) | Data writing and reading method and apparatus, and cloud storage system | |
US8468548B2 (en) | Multi-tenant, high-density container service for hosting stateful and stateless middleware components | |
CN104317742B (en) | Automatic thin-provisioning method for optimizing space management | |
KR20150008446A (en) | Method and apparatus for single point of failure elimination for cloud-based applications | |
CN105939290B (en) | A kind of method and device for distributing resource | |
CN103929454B (en) | The method and system of load balancing storage in a kind of cloud computing platform | |
CN105095094A (en) | Memory management method and equipment | |
CN101221536A (en) | Internal memory managing method and device of embedded system | |
CN108881512A (en) | Virtual IP address equilibrium assignment method, apparatus, equipment and the medium of CTDB | |
CN104679594B (en) | A kind of middleware distributed computing method | |
CN109002259B (en) | Hard disk allocation method, system, device and storage medium of homing group | |
CN110515724B (en) | Resource allocation method, device, monitor and machine-readable storage medium | |
CN104702691B (en) | Distributed load equalizing method and device | |
US10705737B2 (en) | Storage system and data arrangement method of storage system | |
CN103078965A (en) | IP (Internet Protocol) address management method of virtual machines | |
US20130232504A1 (en) | Method and apparatus for managing processing resources in a distributed processing system | |
CN110493060A (en) | A kind of virtual IP address distribution method and relevant apparatus | |
CN108540315A (en) | Distributed memory system, method and apparatus | |
CN109725838B (en) | Method, apparatus and computer readable medium for managing a plurality of discs | |
CN102075425A (en) | Business allocation method and load balancer | |
CN110569302A (en) | method and device for physical isolation of distributed cluster based on lucene | |
CN108958991A (en) | Clustered node failure business quick recovery method, device, equipment and storage medium | |
CN106385330A (en) | Network function virtualization composer realization method and device | |
CN105404565A (en) | Dual-live-data protection method and apparatus | |
US7979551B2 (en) | Enhancing availability of remote applications |
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: 20191122 |
|
RJ01 | Rejection of invention patent application after publication |