CN108156243A - The method and device that dummy node migrates in distributed cache system - Google Patents

The method and device that dummy node migrates in distributed cache system Download PDF

Info

Publication number
CN108156243A
CN108156243A CN201711433832.2A CN201711433832A CN108156243A CN 108156243 A CN108156243 A CN 108156243A CN 201711433832 A CN201711433832 A CN 201711433832A CN 108156243 A CN108156243 A CN 108156243A
Authority
CN
China
Prior art keywords
node
destination virtual
cache node
cache
source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711433832.2A
Other languages
Chinese (zh)
Other versions
CN108156243B (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201711433832.2A priority Critical patent/CN108156243B/en
Publication of CN108156243A publication Critical patent/CN108156243A/en
Application granted granted Critical
Publication of CN108156243B publication Critical patent/CN108156243B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention proposes the method and device that dummy node migrates in a kind of distributed cache system, the method includes:The distribution situation of the dummy node in distributed cache system on each cache node is calculated, to determine the destination virtual node migrated;Delete the destination virtual node on source cache node;When completing to delete the operation of the destination virtual node on the source cache node, the destination virtual node is distributed to target cache node to be migrated.A technical solution in above-mentioned technical proposal has the following advantages that or advantageous effect:When needing to migrate the dummy node on cache node, the destination virtual node on source cache node is deleted first, after deleting successfully, the dummy node being further added by target cache node, in this way in dummy node transition process, it remains the availability of cluster, the read-write consistency of system will not be influenced.

Description

The method and device that dummy node migrates in distributed cache system
Technical field
It is migrated the present invention relates to dummy node in Data Transference Technology field more particularly to a kind of distributed cache system Method and device.
Background technology
Distributed cache system is that data dispersion is buffered in more independent equipment.Traditional caching system uses The cache server of concentration stores all data, and cache server becomes the bottleneck of system performance, it is impossible to meet Internet service The needs of lower large-scale application.And distributed network caching system utilizes more buffer services using expansible system structure Device shares caching load, positions cache information using routing algorithm, it not only increases the reliability, availability and access of system Efficiency is also easy to extend.
In traditional technical solution, the architecture mode of distributed cache system is to carry out fragment to data, and by client Routing rule is configured, then according to different keys (key), using hash algorithm, client is assigned to corresponding fragment.It is this Under pattern, each client is required for configuration routing iinformation, when the dummy node quantity in system changes, needs update institute There is the routing configuration of client, and routing configuration reproducting periods, cluster are unavailable, otherwise can be configured not because of different clients Together, the consistency of system read-write is influenced.
Invention content
The embodiment of the present invention provides the method and device that dummy node migrates in a kind of distributed cache system, at least to solve Certainly or alleviate background technology in above technical problem, provide at a kind of beneficial selection magnetic.
In a first aspect, an embodiment of the present invention provides the method that dummy node in a kind of distributed cache system migrates, packet It includes:
The distribution situation of the dummy node in distributed cache system on each cache node is calculated, to determine to be moved The destination virtual node of shifting;
Delete the destination virtual node on source cache node;
When completing to delete the operation of the destination virtual node on the source cache node, to target cache section to be migrated Point distributes the destination virtual node.
With reference to first aspect, the present invention is calculated in the first embodiment of first aspect in distributed cache system The distribution situation of dummy node on each cache node, to determine the destination virtual node migrated, including:
The heartbeat signal that the source cache node is sent is received in preset period of time, to determine the source cache node Survival condition.
The first embodiment with reference to first aspect receives what the source cache node was sent in preset period of time Heartbeat signal, to determine the survival condition of the source cache node, including:
If not receiving the heartbeat signal that the source cache node is sent in preset period of time, the source cache is detected The lost contact time of node and the host node;
If the lost contact time is more than the first preset time, destination virtual node described in the source cache node is deleted Under it is data cached;
If the lost contact time is more than the second preset time, by the destination virtual node under the source cache node It migrates to the target cache node;
Wherein, second preset time is more than first preset time and is more than the preset period of time.
With reference to first aspect, the present invention is in the second embodiment of first aspect, to target cache node to be migrated Destination virtual node is distributed, including:
The destination virtual node is distributed to the target cache node;
Detect whether the target cache node increases the destination virtual node, if not increasing, again to the mesh It marks cache node and distributes the dummy node.
With reference to first aspect, in the third embodiment of first aspect, the method further includes the present invention:
When deleting the destination virtual node on the source cache node, the heart that the source cache node is sent is received It jumps, with the survival condition of determining source cache node;
When increasing the destination virtual node on the target cache node, receive the target cache node and send Heartbeat, with determine the target cache node survival condition.
With reference to first aspect, in the 4th embodiment of first aspect, the method further includes the present invention:
When the target cache node increase destination virtual node operation after the completion of, update for mapped cache node with The Hash table of dummy node relationship, and updated Hash table is sent to client.
Second aspect, an embodiment of the present invention provides the device that dummy node in a kind of distributed cache system migrates, packets It includes:
Computing module is configured to calculate the distribution situation of the dummy node in distributed cache system on each cache node, To determine the destination virtual node for needing to carry out Data Migration;
Removing module is configured to delete the destination virtual node on source cache node;
Distribution module is configured to when the destination virtual knot removal success in the source cache node, to be migrated Target cache node distributes destination virtual node.
With reference to second aspect, in the first embodiment of second aspect, the computing module includes the present invention:
Receiving submodule is configured to receive the heartbeat signal that the source cache node is sent in preset period of time, with Determine the survival condition of the source cache node.
With reference to the first embodiment of second aspect, the receiving submodule includes:
First detection sub-module is configured to when the heartbeat for not receiving the source cache node transmission in preset period of time During signal, the lost contact time of the source cache node and the host node is detected;
Submodule is deleted, is configured to, when the lost contact time being more than the first preset time, delete the source cache node Described in it is data cached under destination virtual node;
Submodule is migrated, is configured to when the lost contact time being more than the second preset time, it will be under the source cache node The destination virtual node migrate to the target cache node;
Wherein, second preset time is more than first preset time and is more than the preset period of time.
With reference to second aspect, in the second embodiment of second aspect, the distribution module includes the present invention:
Distribution sub module is configured to distribute the destination virtual node to the target cache node;
Second detection sub-module is configured to detect whether the target cache node increases the destination virtual node, and It is again described virtual to target cache node distribution when the target cache node does not increase the destination virtual node Node.
With reference to second aspect, in the third embodiment of second aspect, described device further includes the present invention:
Update module is configured to after the completion of the target cache node increases the operation of destination virtual node, and update is used In mapped cache node and the Hash table of dummy node relationship, and updated Hash table is sent to client.
The third aspect, an embodiment of the present invention provides a kind of computer readable storage mediums, are stored with computer program, The program realizes method as described above when being executed by processor.
A technical solution in above-mentioned technical proposal has the following advantages that or advantageous effect:When need migrate cache node On dummy node when, first delete source cache node on destination virtual node, after deleting successfully, be further added by target cache section Dummy node on point in this way in dummy node transition process, remains the availability of cluster, will not influence system Read and write consistency.
Above-mentioned general introduction is merely to illustrate that the purpose of book, it is not intended to be limited in any way.Except foregoing description Schematical aspect, except embodiment and feature, by reference to attached drawing and the following detailed description, the present invention is further Aspect, embodiment and feature will be what is be readily apparent that.
Description of the drawings
In the accompanying drawings, unless specified otherwise herein, otherwise represent the same or similar through the identical reference numeral of multiple attached drawings Component or element.What these attached drawings were not necessarily to scale.It should be understood that these attached drawings are depicted only according to the present invention Some disclosed embodiments, and should not serve to limit the scope of the present invention.
The flow chart of method that Fig. 1 is migrated for dummy node in the distributed cache system of the embodiment of the present invention one;
The flow chart of method that Fig. 2 is migrated for dummy node in the distributed cache system of the embodiment of the present invention two;
The schematic diagram of device that Fig. 3 is migrated for dummy node in the distributed cache system of the embodiment of the present invention three.
Specific embodiment
Hereinafter, certain exemplary embodiments are simply just described.As one skilled in the art will recognize that Like that, without departing from the spirit or scope of the present invention, described embodiment can be changed by various different modes. Therefore, attached drawing and description are considered essentially illustrative rather than restrictive.
Embodiment one
The embodiment of the present invention one provides a kind of method that dummy node migrates in distributed cache system.As shown in Figure 1, it is The flow chart of dummy node moving method in the distributed cache system of the embodiment of the present invention.The distribution of the embodiment of the present invention is delayed Dummy node moving method includes the following steps in deposit system:
S101 calculates the distribution situation of the dummy node in distributed cache system on each cache node, to determine to need The destination virtual node migrated.
It is gentle that the distributed cache system of the embodiment of the present invention mainly includes host node (master), client (client) Deposit node (cachenode).When data reach client, client will search Hash table according to key (key) (Distributed Hash Table, DHT) with the selected cache node for being preserved data, then saves the data in this It is also the same when reading data, client searches Hash table according to key, then selects the caching section searched on cache node Point.But in practical application, due to cache node mapping address distribution it is uneven, so as to cause database access tilt, Many key are mapped on same cache node, can increase the burden of indivedual cache nodes in this way.To solve this problem, Dummy node can be set on cache node, client searches Hash table according to key, determines the dummy node of access data, And without considering the mapping relations between dummy node and cache node.
Dummy node is distributed by host node.Host node calculates the distribution feelings of the dummy node on cache node first Condition determines to need the destination virtual node migrated according to the distribution situation of dummy node, usually when dummy node distribution is apparent not When uniform, need to migrate dummy node, for example, when having increased cache node in distributed cache system newly, newly-increased caching section Dummy node is also not provided on point, and the dummy node set on other cache nodes is more, it is therefore desirable to others are slow The dummy node on node is deposited to migrate to newly-increased cache node.
S102 deletes the destination virtual node on source cache node.
The embodiment of the present invention only migrates dummy node in itself when migrating dummy node, without migrating under dummy node What is stored is data cached, and will not be affected for other dummy nodes on same cache node, and client is still Other dummy nodes on same cache node can be kept accessing.
S103, when completing to delete the operation of the destination virtual node on the source cache node, to target to be migrated Cache node distributes the destination virtual node.
When migrating dummy node, first by the destination virtual knot removal on source cache node, then delay again to target Node distribution destination virtual node is deposited, ensures destination virtual node there are one cache node end is only at any time in this way, it can be with It, will not be inconsistent there is a situation where reading and writing in the case of realizing that even if the Hash table of client is also newer.
A technical solution in above-mentioned technical proposal has the following advantages that or advantageous effect:When need migrate cache node On dummy node when, first delete source cache node on destination virtual node, after deleting successfully, be further added by target cache section Dummy node on point in this way in dummy node transition process, remains the availability of cluster, will not influence system Read and write consistency.
Embodiment two
On the basis of embodiment one, the embodiment of the present invention two provides dummy node in a kind of distributed cache system and migrates Method.As shown in Fig. 2, the flow chart for dummy node moving method in the distributed cache system of the embodiment of the present invention.This Dummy node moving method includes the following steps in the distributed cache system of inventive embodiments:
S201 receives the heartbeat signal that the source cache node is sent in preset period of time, to determine that the source is delayed Deposit the survival condition of node.
Step S201 includes:A, if not receiving the heartbeat signal that the source cache node is sent in preset period of time, Then detect the lost contact time of the source cache node and the host node;B, if the lost contact time is more than the first preset time, It then deletes data cached under destination virtual node described in the source cache node;C, if the lost contact time is more than second pre- If the time, then the destination virtual node under the source cache node is migrated to the target cache node;
Wherein, second preset time is more than first preset time and is more than the preset period of time.
In distributed cache system, often using heartbeat mechanism, host node is made to keep communicating with cache node.The so-called heart Jump mechanism is exactly that timing sends a customized structure (heartbeat packet or heartbeat frame), and other side is allowed to know oneself " online ", with Ensure the validity of link.Heartbeat signal can be sent out by host node, can also be sent out by source cache node.The embodiment of the present invention By taking source cache node sends heartbeat signal as an example, source cache node and host node lost contact illustrate source cache node in preset time In interval heartbeat signal is not sent to host node.
If source cache node and host node lost contact long period, more than the second preset time, then illustrate to be likely to occur different At this moment reason condition needs all dummy nodes on the source cache node by lost contact to move on new target cache node.
If source cache node and the time of host node lost contact are longer, more than the first preset time, but it is not above Two preset times, then it is assumed that at this moment current source cache node considers the safety of data it is possible that abnormal conditions, can incite somebody to action The data cached on the source cache node are all deleted.
Wherein, second preset time is more than first preset time and is more than preset period of time.
The preset period of time of the embodiment of the present invention refers to send the time interval of heartbeat signal.As long as more than preset time Period, it is possible to think that source cache node saves lost contact with main.For example, per 5s send a heartbeat signal, first it is default when Between for 10s, the second preset time is 15s, then after host node is away from preceding primary reception heartbeat signal, is just received when being spaced 12s Second of heartbeat signal it may be considered that slight abnormality occurs in source cache node, at this moment can will cache number under source cache node According to deletion, if not receiving heartbeat signal also more than 16s, then it is assumed that current source cache node there are severely subnormal, this The source cache node is done a bit to mark, and the dummy node on the source cache node is all migrated to target cache node, The step of the present embodiment may be used in the method for migration.
S202 deletes the destination virtual node on source cache node.
When deleting the destination virtual node on source cache node, host node notice source cache node is updated, if It deletes successfully, then will continue to perform the operation for increasing destination virtual node on target cache node, if deleting failure, lead Node will not change the distribution situation of the dummy node on source cache node.For example, can cancel current migration task or Person when performing migration task next time, then migrates the destination virtual node.
S203, when completing to delete the operation of the destination virtual node on the source cache node, to the target cache Node distributes the destination virtual node.
S204, detects whether the target cache node is completed to increase the destination virtual node, if not increasing, again Distribute the dummy node.
When host node distributes destination virtual node to target cache node, and during distribution failure, temporarily abandon this time dividing Match, and the destination node is distributed into target cache node again in the distribution task of next round, to ensure dummy node Quantity.
As previously mentioned, the method further includes:
When deleting the destination virtual node on the source cache node, the heart that the source cache node is sent is received It jumps, to determine the survival condition of source cache node;
When increasing the destination virtual node on the target cache node, receive the target cache node and send Heartbeat, with determine the target cache node survival condition.
The embodiment of the present invention is during either delete target dummy node still increases destination virtual node, source cache Node and target cache node, which are remained to host node, sends heartbeat signal, so that host node perceives its survival condition.
S205, after the completion of the target cache node increases the operation of destination virtual node, update is for mapped cache Node and the Hash table of dummy node relationship, and updated Hash table is sent to client.
In the embodiment of the present invention, after the migration for completing destination virtual node, the mapping relations of destination virtual node are Change, therefore host node can update the version (global version) of Hash table.And updated Hash table is sent to visitor Family end in other embodiments, can also work as client from client to the updated Hash table version of host node active obtaining When obtaining data to cache node, it is found that mapping relations have occurred and that variation at this time, then obtain updated Kazakhstan to host node Uncommon table.
A technical solution in above-mentioned technical proposal has the following advantages that or advantageous effect:This implementation is additionally provided with fault-tolerant Mechanism, when source cache node and host node lost contact are more than the first preset time, then it is assumed that removed and deleted successfully, if lost contact surpasses Cross the second preset time, then it is assumed that delete failure, then keep the distribution of current destination virtual node, can avoid the occurrence of in this way Abnormal conditions destroy distributed cache system.
Embodiment three
The embodiment of the present invention three provides the device that dummy node migrates in a kind of distributed cache system.As shown in figure 3, it is The schematic diagram for the device that dummy node migrates in the distributed cache system of the embodiment of the present invention.The distribution of the embodiment of the present invention Dummy node moving apparatus includes in caching system:
Computing module 31 is configured to calculate the distribution feelings of the dummy node in distributed cache system on each cache node Condition, to determine the destination virtual node for needing to carry out Data Migration;
Removing module 32 is configured to delete the destination virtual node on source cache node;
Distribution module 33 is configured to when the destination virtual knot removal success in the source cache node, to be migrated Target cache node distribution destination virtual node.
Further, the computing module 31 includes:
First detection sub-module 311 is configured to receive what the source cache node was sent in preset period of time During heartbeat signal, the lost contact time of the source cache node and the host node is detected;
Submodule 312 is deleted, is configured to, when the lost contact time being more than the first preset time, delete the source cache section It is data cached under destination virtual node described in point;
Submodule 313 is migrated, is configured to when the lost contact time being more than the second preset time, by the source cache node Under the destination virtual node migrate to the target cache node
Wherein, second preset time is more than first preset time and is more than preset period of time.
Further, the distribution module 33 includes:
Distribution sub module 331 is configured to distribute the destination virtual node to the target cache node;
Second detection sub-module 332 is configured to detect whether the target cache node increases the destination virtual node, And when the target cache node does not increase the destination virtual node, the void is distributed to the target cache node again Intend node.
Further, described device further includes:
Update module 34 is configured to after the completion of the target cache node increases the operation of destination virtual node, update For mapped cache node and the Hash table of dummy node relationship, and updated Hash table is sent to client.
The method that dummy node migrates in the distributed cache system of the embodiment of the present invention, can realize and be moved in dummy node During shifting, the availability of cluster is remained, and do not influence the read-write consistency of system, advantage and embodiment one Identical, details are not described herein.
Example IV
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored with computer program, the program quilt The method as described in Fig. 1 to 2 any embodiments is realized when processor performs.
In the description of this specification, reference term " one embodiment ", " example ", " is specifically shown " some embodiments " The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description Point is contained at least one embodiment of the present invention or example.Moreover, particular features, structures, materials, or characteristics described It may be combined in any suitable manner in any one or more of the embodiments or examples.In addition, without conflicting with each other, this The technical staff in field can be by the different embodiments or examples described in this specification and the spy of different embodiments or examples Sign is combined.
In addition, term " first ", " second " are only used for description purpose, and it is not intended that instruction or hint relative importance Or the implicit quantity for indicating indicated technical characteristic." first " is defined as a result, the feature of " second " can be expressed or hidden Include at least one this feature containing ground.In the description of the present invention, " multiple " are meant that two or more, unless otherwise It is clearly specific to limit.
Any process described otherwise above or method description are construed as in flow chart or herein, represent to include Module, segment or the portion of the code of the executable instruction of one or more the step of being used to implement specific logical function or process Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, to perform function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The system of row system, device or equipment instruction fetch and execute instruction) it uses or combines these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass Defeated program is for instruction execution system, device or equipment or the dress used with reference to these instruction execution systems, device or equipment It puts.
Computer-readable medium described in the embodiment of the present invention can be that computer-readable signal media or computer can Storage medium either the two is read arbitrarily to combine.The more specific example of computer readable storage medium is at least (non-poor Property list to the greatest extent) including following:Electrical connection section (electronic device) with one or more wiring, portable computer diskette box (magnetic Device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash Memory), fiber device and portable read-only memory (CDROM).In addition, computer readable storage medium even can be with It is the paper or other suitable media that can print described program on it, because can be for example by being carried out to paper or other media Optical scanner is then handled described electronically to obtain into edlin, interpretation or when necessary with other suitable methods Program is then stored in computer storage.
In embodiments of the present invention, computer-readable signal media can be included in a base band or as a carrier wave part The data-signal of propagation, wherein carrying computer-readable program code.The data-signal of this propagation may be used a variety of Form, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media is also Can be any computer-readable medium other than computer readable storage medium, which can send, pass Either transmission is broadcast for instruction execution system, input method or device use or program in connection.Computer can Reading the program code included on medium can be transmitted with any appropriate medium, including but not limited to:Wirelessly, electric wire, optical cable, penetrate Frequently (Radio Frequency, RF) etc. or above-mentioned any appropriate combination.
It should be appreciated that each section of the present invention can be realized with hardware, software, firmware or combination thereof.Above-mentioned In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage Or firmware is realized.If for example, with hardware come realize in another embodiment, can be under well known in the art Any one of row technology or their combination are realized:With for the logic gates to data-signal realization logic function Discrete logic, have suitable combinational logic gate circuit application-specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that realize all or part of step that above-described embodiment method carries Suddenly it is that relevant hardware can be instructed to complete by program, the program can be stored in a kind of computer-readable storage medium In matter, the program when being executed, one or a combination set of the step of including embodiment of the method.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, it can also That each unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould The form that hardware had both may be used in block is realized, can also be realized in the form of software function module.The integrated module is such as Fruit is realized in the form of software function module and is independent product sale or in use, can also be stored in a computer In readable storage medium storing program for executing.The storage medium can be read-only memory, disk or CD etc..
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in its various change or replacement, These should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with the guarantor of the claim It protects subject to range.

Claims (11)

1. a kind of method that dummy node migrates in distributed cache system, which is characterized in that the method includes:
The distribution situation of the dummy node in distributed cache system on each cache node is calculated, to determine what is migrated Destination virtual node;
Delete the destination virtual node on source cache node;
When completing to delete the operation of the destination virtual node on the source cache node, to target cache node point to be migrated With the destination virtual node.
2. according to the method described in claim 1, it is characterized in that, calculate the void in distributed cache system on each cache node Intend the distribution situation of node, to determine the destination virtual node migrated, including:
The heartbeat signal that the source cache node is sent is received in preset period of time, to determine depositing for the source cache node Situation living.
3. according to the method described in claim 2, it is characterized in that, the source cache node hair is received in preset period of time The heartbeat signal sent, to determine the survival condition of the source cache node, including:
If not receiving the heartbeat signal that the source cache node is sent in preset period of time, the source cache node is detected With the lost contact time of the host node;
If the lost contact time is more than the first preset time, delete described in the source cache node under destination virtual node It is data cached;
If the lost contact time is more than the second preset time, the destination virtual node under the source cache node is migrated To the target cache node;
Wherein, second preset time is more than first preset time and is more than the preset period of time.
4. according to the method described in claim 1, it is characterized in that, distribute destination virtual section to target cache node to be migrated Point, including:
The destination virtual node is distributed to the target cache node;
It detects whether the target cache node increases the destination virtual node, if not increasing, delays again to the target It deposits node and distributes the dummy node.
5. according to the method described in claim 1, it is characterized in that, the method further includes:
After the completion of the target cache node increases the operation of destination virtual node, update is for mapped cache node and virtually The Hash table of node relationships, and updated Hash table is sent to client.
6. the device that dummy node migrates in a kind of distributed cache system, which is characterized in that described device includes:
Computing module is configured to calculate the distribution situation of the dummy node in distributed cache system on each cache node, with true Surely the destination virtual node of progress Data Migration is needed;
Removing module is configured to delete the destination virtual node on source cache node;
Distribution module is configured to when the destination virtual knot removal success in the source cache node, to target to be migrated Cache node distributes destination virtual node.
7. device according to claim 6, which is characterized in that the computing module includes:
Receiving submodule is configured to receive the heartbeat signal that the source cache node is sent in preset period of time, to determine The survival condition of the source cache node.
8. device according to claim 7, which is characterized in that the receiving submodule includes:
First detection sub-module is configured to when the heartbeat signal for not receiving the source cache node transmission in preset period of time When, detect lost contact time of the source cache node and the host node;
Submodule is deleted, is configured to, when the lost contact time being more than the first preset time, delete institute in the source cache node It states data cached under destination virtual node;
Submodule is migrated, is configured to when the lost contact time being more than the second preset time, by the institute under the source cache node Destination virtual node is stated to migrate to the target cache node;
Wherein, second preset time is more than first preset time and is more than the preset period of time.
Wherein, second preset time is more than first preset time and is more than preset period of time.
9. device according to claim 7, which is characterized in that the distribution module includes:
Distribution sub module is configured to distribute the destination virtual node to the target cache node;
Second detection sub-module is configured to detect whether the target cache node increases the destination virtual node, and works as institute When stating target cache node does not increase the destination virtual node, the virtual section is distributed to the target cache node again Point.
10. device according to claim 7, which is characterized in that described device further includes:
Update module is configured to after the completion of the target cache node increases the operation of destination virtual node, updates to reflect The Hash table of cache node and dummy node relationship is penetrated, and updated Hash table is sent to client.
11. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the program is held by processor The method as described in any in claim 1-5 is realized during row.
CN201711433832.2A 2017-12-26 2017-12-26 Method and device for virtual node migration in distributed cache system Active CN108156243B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711433832.2A CN108156243B (en) 2017-12-26 2017-12-26 Method and device for virtual node migration in distributed cache system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711433832.2A CN108156243B (en) 2017-12-26 2017-12-26 Method and device for virtual node migration in distributed cache system

Publications (2)

Publication Number Publication Date
CN108156243A true CN108156243A (en) 2018-06-12
CN108156243B CN108156243B (en) 2021-05-07

Family

ID=62462920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711433832.2A Active CN108156243B (en) 2017-12-26 2017-12-26 Method and device for virtual node migration in distributed cache system

Country Status (1)

Country Link
CN (1) CN108156243B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924244A (en) * 2018-07-24 2018-11-30 广东神马搜索科技有限公司 Distributed system and flow allocation method and device for the system
CN110569225A (en) * 2019-08-26 2019-12-13 网宿科技股份有限公司 Data storage method and system
CN111176783A (en) * 2019-11-20 2020-05-19 航天信息股份有限公司 High-availability method and device for container treatment platform and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413183A (en) * 2011-11-22 2012-04-11 中国联合网络通信集团有限公司 Cloud intelligence switch and processing method and system thereof
CN102479099A (en) * 2010-11-22 2012-05-30 中兴通讯股份有限公司 Virtual machine management system and use method thereof
CN105227541A (en) * 2015-08-21 2016-01-06 华为技术有限公司 A kind of security strategy dynamic migration method and device
CN105591935A (en) * 2015-08-26 2016-05-18 杭州华三通信技术有限公司 Method and device for updating EID-RLOC mapping relation after virtual machine migration
CN105744001A (en) * 2016-04-11 2016-07-06 青岛海信传媒网络技术有限公司 Distributed Caching System Expanding Method, Data Access Method, and Device and System of the Same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479099A (en) * 2010-11-22 2012-05-30 中兴通讯股份有限公司 Virtual machine management system and use method thereof
CN102413183A (en) * 2011-11-22 2012-04-11 中国联合网络通信集团有限公司 Cloud intelligence switch and processing method and system thereof
CN105227541A (en) * 2015-08-21 2016-01-06 华为技术有限公司 A kind of security strategy dynamic migration method and device
CN105591935A (en) * 2015-08-26 2016-05-18 杭州华三通信技术有限公司 Method and device for updating EID-RLOC mapping relation after virtual machine migration
CN105744001A (en) * 2016-04-11 2016-07-06 青岛海信传媒网络技术有限公司 Distributed Caching System Expanding Method, Data Access Method, and Device and System of the Same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924244A (en) * 2018-07-24 2018-11-30 广东神马搜索科技有限公司 Distributed system and flow allocation method and device for the system
CN108924244B (en) * 2018-07-24 2022-02-25 阿里巴巴(中国)有限公司 Distributed system and flow distribution method and device for same
CN110569225A (en) * 2019-08-26 2019-12-13 网宿科技股份有限公司 Data storage method and system
CN111176783A (en) * 2019-11-20 2020-05-19 航天信息股份有限公司 High-availability method and device for container treatment platform and electronic equipment

Also Published As

Publication number Publication date
CN108156243B (en) 2021-05-07

Similar Documents

Publication Publication Date Title
CN105045877B (en) Database data fragment storage method and device, data query method and apparatus
US8380949B2 (en) Managing write operations to an extent of tracks migrated between storage devices
CN106844399B (en) Distributed database system and self-adaptive method thereof
CN103067433B (en) A kind of data migration method of distributed memory system, equipment and system
JP5701398B2 (en) Computer system, data management method and program
CN102708165B (en) Document handling method in distributed file system and device
US11245774B2 (en) Cache storage for streaming data
CN108363813A (en) Date storage method, device and system
US20120110108A1 (en) Computer System with Cooperative Cache
CN105095313B (en) A kind of data access method and equipment
CN105868231A (en) Cache data updating method and device
CN108156243A (en) The method and device that dummy node migrates in distributed cache system
CN106302595A (en) A kind of method and apparatus that server is carried out physical examination
CN106815218A (en) Data bank access method, device and Database Systems
US10922272B2 (en) Providing data across multiple clusters in a single namespace
CN105868234A (en) Update method and device of caching data
US8024377B2 (en) Anti-item for deletion of content in a distributed datastore
JP2019164705A (en) Information processing device
CN110427386A (en) Data processing method, device and computer storage medium
CN110147203A (en) A kind of file management method, device, electronic equipment and storage medium
CN112839076A (en) Data storage method, data reading method, gateway, electronic equipment and storage medium
CN105897754A (en) Data processing system, data pulling method and client
US10261949B2 (en) Packed row representation for efficient network serialization with direct column indexing in a network switch
US10942912B1 (en) Chain logging using key-value data storage
CN106528876B (en) The information processing method and distributed information processing system of distributed system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant