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

Method, device and system for expanding and shrinking capacity of database cluster

A database and cluster technology, applied in the Internet field, can solve problems such as data loss, inability to write, and adverse effects on the system, so as to achieve smooth expansion and solve the effect of data loss.

Active Publication Date: 2020-03-10
ALIBABA GRP HLDG LTD
View PDF6 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, prohibiting hash slot writing may cause long-term non-writability when moving hash slots with a large amount of data, causing long-term adverse effects on systems that rely on Redis clusters
[0007] For the above-mentioned data loss problem caused by the horizontal expansion and contraction of the storage database in the existing technology, no effective solution has been proposed so far

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
  • Method, device and system for expanding and shrinking capacity of database cluster
  • Method, device and system for expanding and shrinking capacity of database cluster
  • Method, device and system for expanding and shrinking capacity of database cluster

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] According to an aspect of the embodiments of the present invention, there is also provided a capacity expansion and contraction system, figure 1 It is a structural diagram of a system for expanding and contracting a database cluster according to Embodiment 1 of the present invention. include:

[0043] The server 10 is used to store the fragmentation information of the database cluster; the access agent 12 is connected to the server 10 and the database cluster 14 respectively, and is used to proxy the access request to the corresponding database node in the database cluster 14 according to the access request; The device 16 is connected to the server 10 and the database cluster 14 respectively, and is used to expand or shrink the database nodes in the database cluster 14, and update the fragmentation information changed after the database node expands or shrinks to the server 10.

[0044] Optionally, the scaling system provided in this application further includes: a loa...

Embodiment 2

[0088] According to an embodiment of the present invention, an embodiment of a method for expanding the capacity of a database cluster is also provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and , although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown or described herein.

[0089] The method embodiment provided in Embodiment 1 of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Take running on a computer terminal as an example, Figure 5 It is a block diagram of the hardware structure of a computer terminal according to a method for expanding the capacity of a database cluster in an embodiment of the present invention. like Figure 5 As shown, the computer terminal 50 may include on...

Embodiment 3

[0122] According to another aspect of the embodiments of the present invention, a method for reducing the capacity of a database cluster is also provided, Figure 7 is a flowchart of a method for shrinking a database cluster according to Embodiment 3 of the present invention. include:

[0123] Step S702, merging the synchronization information of at least one node to be offline through the proxy device;

[0124] Step S704, judging whether the synchronization difference between at least one node to be offline and the proxy device, and whether the synchronization difference between the target shrinking node and the proxy device is greater than a preset threshold;

[0125] Step S706, if the judgment result is no, control at least one node to be offline to prohibit writing, obtain synchronization information from at least one node to be offline, and send the synchronization information to a target that replaces at least one node to be offline Shrink nodes.

[0126] Specifically...

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 method, a device and a system for expanding and shrinking capacity of a database cluster. The method comprises the steps that when the database cluster is expanded, determining the number of target expansion nodes needed by nodes to be expanded in the database cluster; and synchronizing the capacity expansion information of the to-be-expanded node to a proxy device through a copying function of the to-be-expanded node, and synchronizing the capacity expansion information to target capacity expansion nodes corresponding to the target capacity expansion node number. Thetechnical problem of data loss caused in the process of horizontally expanding and shrinking the capacity of the storage database in the prior art is solved.

Description

technical field [0001] The present invention relates to the field of the Internet, in particular, to a method, device and system for expanding and contracting a database cluster. Background technique [0002] As a database for storing data, there is a storage database called Redis in terms of storage technology. Redis is an open source, network-enabled, memory-based, key-value storage database written in ANSI C. [0003] In the process of realizing data storage, Redis cluster provides a certain degree of availability through partitioning, and continues to process commands when a node is down or unreachable in the actual environment. Among them, the Redis cluster is an assembly that provides data sharing among multiple Redis nodes. [0004] Here, in the Redis Cluster-based horizontal expansion scheme, the concept of hash slots is used to distribute data to 16,384 hash slots through a fixed hash algorithm, and each node in the cluster stores a part of the 16,384 hash slots. ...

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): G06F16/27
Inventor 潘家邦
Owner ALIBABA GRP HLDG LTD
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