Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Distributed storage method based on consistent Hash algorithm

A distributed storage and hash algorithm technology, applied in the field of distributed database storage, can solve problems such as bad experience, invalidation of cache memory, and slow server response speed, and achieve the effect of high retrieval efficiency and fast response.

Inactive Publication Date: 2014-09-17
UESTC COMSYS INFORMATION
View PDF2 Cites 47 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This will cause the server to read the data to change, and all the cache memory in the server will be invalidated, thereby reducing the response speed of the server, bringing a very bad experience to the user, and the server is also facing a huge test

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Distributed storage method based on consistent Hash algorithm
  • Distributed storage method based on consistent Hash algorithm
  • Distributed storage method based on consistent Hash algorithm

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment

[0061] Specific embodiments: the implementation of the present invention is explained below by introducing database segmentation technology and consistent hashing steps:

[0062] S1: Considering that the usual hash algorithm maps the value to a 32-bit Key value, that is, the hash value space from 0 to the 2^32-1 power; set this hash value space as a first ( 0) Rings with tails (2^32-1), such as Figure 4 shown.

[0063] S2: Map the object to the hash value space:

[0064] Assuming that four objects object1~object4 are considered, the distribution of the hash value Key on the ring is calculated through the hash function, such as Figure 5 Shown:

[0065] Hash(object1) = Key1;

[0066] ...

[0067] Hash(objectN)=KeyN.

[0068] S3: Map the Cache to the hash value space:

[0069] The basic idea of ​​consistent hashing is to map objects and caches to the same hash value space and use the same hash algorithm;

[0070] Assuming that there are currently 3 caches A, B, and C, t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a distributed storage method based on the consistent Hash algorithm, and belongs to the technical field of distributed database storage. The method comprises the following steps that firstly, a Hash value space is set into a circular ring connected in an end-to-end mode; secondly, an object is mapped into the Hash value space; thirdly, a Cache is mapped to the same Hash value space into which the object is mapped, and the same Hash algorithm is used; fourthly, the object is mapped into the Cache; fifthly, the Cache is removed or added. The distributed storage method has the following advantages that the data retrieving efficiency is high, corresponding data can be obtained in corresponding servers every time retrieving is carried out, and response can be fast made; when the number of the servers is increased or reduced, an existing distributed environment cannot be greatly affected, and only the storage of part of data can be affected while the Hash server cannot be changed.

Description

technical field [0001] The invention belongs to the technical field of distributed database storage, and in particular relates to a distributed storage method based on a consistent hash algorithm. Background technique [0002] With the advent of the cloud era, big data has attracted more and more attention. Big data is often used to describe the large volumes of unstructured and semi-structured data that a company creates that takes an inordinate amount of time to store in a database. Big data is often associated with distributed systems, because real-time storage of large data sets requires a framework like the programming model Map Reduce to distribute work to hundreds or thousands of computers. [0003] In a traditional distributed system, if these big data are simply hashed and processed in a distributed manner, then when the number of distributed servers is frequently increased or deleted, the hash results will be recalculated and regenerated. This will cause the serv...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/24552G06F16/2255G06F16/2471G06F16/27G06F16/325G06F16/86
Inventor 唐雪飞张小盼楚龙辉王淋铱
Owner UESTC COMSYS INFORMATION
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products