WO2017097059A1 - 分布式数据库系统及其自适应方法 - Google Patents

分布式数据库系统及其自适应方法 Download PDF

Info

Publication number
WO2017097059A1
WO2017097059A1 PCT/CN2016/103964 CN2016103964W WO2017097059A1 WO 2017097059 A1 WO2017097059 A1 WO 2017097059A1 CN 2016103964 W CN2016103964 W CN 2016103964W WO 2017097059 A1 WO2017097059 A1 WO 2017097059A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
node
copy
nodes
fragment
Prior art date
Application number
PCT/CN2016/103964
Other languages
English (en)
French (fr)
Inventor
郑国斌
肖旸
章恩华
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017097059A1 publication Critical patent/WO2017097059A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases

Definitions

  • the present disclosure relates to the field of databases, for example, to a distributed database system and an adaptive method thereof.
  • Distributed database is generally a database cluster system with multiple data nodes with computing, storage and network communication functions. It has high performance and high reliability. It has been widely used in telecommunications, banking, internet and other industries. Distributed database can be used.
  • the data access node is composed of a data access agent node and a data storage node.
  • the data storage node is divided into multiple data storage clusters according to data keywords.
  • Each data storage cluster has one data storage primary node and multiple data storage standby nodes, and the primary node can provide Read and write data service, the standby node only provides the read data service, the data written by the master node is copied to the standby node; the data access proxy node can be responsible for proxying the data access request of the data visitor, and forwarding to the corresponding data storage cluster correspondingly Data storage node processing; this kind of distributed database has many data nodes, and the data nodes depend on each other. There are low access efficiency, node building data capacity and unbalance, data distribution is difficult to adjust, data is difficult to migrate smoothly, and state maintenance is complicated. And other issues.
  • the processing method may be: dividing the data into multiple fragments according to the HASH value of the range or data keyword, and evenly distributing the fragments to the data nodes according to the consistent HASH algorithm, but For the copy (backup) distribution of each slice, the uniformity between nodes is not considered; the above-based consistency HASH distribution method may bring a new problem, that is, when the nodes are increased or decreased, sometimes the adjusted fragments are few. Sometimes the number of shards is large, and the adjustment of data shards between nodes is unpredictable, resulting in the number of data fragments that may be migrated may be uncontrollable.
  • the present disclosure provides a distributed database system and an adaptive method thereof, which can improve the problem of unbalanced load between nodes in a distributed database system, difficulty in adjusting data distribution, unsmooth data migration, and complicated maintenance.
  • the embodiment of the present disclosure discloses a distributed database system, where the system includes a control node, a client application programming interface (API), and a data node, where
  • API application programming interface
  • control node configured to manage a data node of the system, calculate a data route of the system, and broadcast to the client API and the data node;
  • the client API is configured to provide an interface for reading/writing data to the data visitor, and the received data operation request is forwarded to the corresponding data node according to the locally cached data route;
  • a data node configured to store data fragments, and to process received data operation requests based on locally cached data routes.
  • the foregoing data node is deployed in the foregoing system in a virtual machine or a computing storage host manner.
  • the client API is operated by a data visitor in a dynamic library or a plug-in manner.
  • control node is configured to monitor the number and state changes of the data nodes in the real-time monitoring system, and perform node expansion/reduction operation when the number of data nodes changes; and update the data routing when the data node status changes.
  • the client API is configured to calculate a data fragment corresponding to the request data according to the data keyword in the received data operation request, and search for a data node where each data fragment is located in the locally cached data route. And forwarding the data operation request to the corresponding data node according to the locally cached data node selection rule.
  • the data node is configured to: after receiving the data operation request, find, in the locally cached data route, whether the data fragment in the data operation request is stored in the data node; and in the foregoing data fragmentation
  • the data node in which the data fragment is located is searched in the locally cached data route, and the data operation request is forwarded to the found data node; when the data fragment is stored in the data node, Execute the above data operation request and return a data operation response to the data visitor.
  • the foregoing data node is configured to periodically report its own state to the control node; and report the state of the self to the control node in real time when the link changes;
  • the above control node is set to periodically update the data route.
  • the foregoing data node is configured to perform a data recovery operation and a data copy operation
  • the foregoing control node is configured to divide the data node according to a preset domain division rule.
  • the embodiment of the present invention discloses an adaptive method for a distributed database system. After the system is powered on, the method performs:
  • the control node calculates the data route of the system and broadcasts it to the client API and all data nodes;
  • the client API receives the data operation request of the visitor, and forwards the request to the corresponding data node according to the locally cached data route;
  • the data node processes the received data operation request and returns a data operation response to the visitor.
  • the foregoing control node may further perform:
  • Data nodes are partitioned according to preset zoning rules.
  • the foregoing zoning rule is: if the number of hosts/servers to which the data node belongs is 1, the data node is divided into a left domain or a right domain; and if the number of hosts/servers to which the data node belongs is greater than or equal to 2, According to the principle of uniform distribution of hosts/servers to which the data nodes belong, the data nodes are divided into left and right domains, so that the data nodes belonging to the same host/server are located in the same domain.
  • the data node is divided into the left domain; if the total number of data nodes is greater than or equal to 2, the data node is divided into the left domain and the right domain according to the host/server to which the node belongs, so that each domain is under The data nodes belong to the same host/server.
  • control node calculates the number of data fragments to be distributed on each data node according to the number of data nodes and the number of data fragments of the system, and generates a data route.
  • the step that the client API forwards the request to the corresponding data node according to the locally cached data route may be:
  • the above data operation requests are respectively forwarded to the found data nodes according to a preset data node selection rule.
  • the foregoing data node selection rule may be:
  • the type of the data operation request is determined, and if it is a write operation, the copy number of the data fragment and the status of the data node in each of the data nodes are checked. And sending the data operation request to a data node with a normal state and a small copy number; if it is a read operation, sending the data operation request to the data node with the least load.
  • the data node processes the received data operation request by:
  • the data cache in the locally cached data route Querying, in the locally cached data route, whether the data fragment in the data operation request is stored in the data node; when the data cache in the locally cached data route is found, the data fragment in the data operation request is stored in the data node.
  • the data operation request is executed, and the data operation response is returned to the data visitor; when the data fragment in the data operation request is not found in the locally cached data route, the data fragment in the data operation request is locally cached.
  • the data route finds the data node where the data fragment is located, and forwards the data operation request to the found data node.
  • the foregoing execution data operation request may be:
  • the data operation request is a write operation
  • the data is sliced according to the operation mode of the visitor. a local copy to add, modify, or delete;
  • the data operation request is a read operation
  • the data is read from the local copy stored in the data slice.
  • the data copy process is performed, which may be:
  • control node may also execute during the running of the system:
  • the node expansion operation is performed; if the data node is deleted, the node reduction operation is performed.
  • the foregoing node expansion operation may further include:
  • a third copy is allocated to the data segment to be migrated on the newly added data node, and the data route of the system is recalculated and broadcasted;
  • the step of calculating the first copy data fragment list and the second copy data fragmentation list to be migrated to the newly added data node may be:
  • the first copy of all the data fragments to be migrated from the original data node constitutes the first copy data fragment list of the newly added data node, and the second copy of all the data fragments to be migrated from the original data node A second copy of the data fragmentation list that makes up the new data node.
  • the foregoing preset expansion rule may be:
  • the foregoing node reduction operation may include:
  • the step of calculating the first copy data fragment list and the second copy data fragment list on each of the remaining nodes may be:
  • the first copy and the second copy of the data slice on the data node to be deleted are allocated to the remaining data nodes, and the first copy data fragment list and the first node on each remaining node are obtained. Two copies of the data fragmentation list.
  • the preset shrinkage rule may be:
  • the foregoing data fragment distribution principle may be:
  • the number of data fragments on each data node is as equal as possible
  • the first copy and the second copy of each data slice are distributed over data nodes of different domains
  • a second copy of all first copy data fragments on each data node is evenly distributed across all data nodes in the foreign domain.
  • the foregoing data node recovers data by the following steps:
  • the recovery is completed and the status is reported to the control node.
  • the increased data node is a data node newly added to the system
  • the deleted data node may include: a data node that needs to be deleted because the burden is less than a preset value, and a data node that is required to be deleted due to receiving a user deletion instruction.
  • the client API determines the number of fragments of the requested data by taking a HASH value for the data keyword and then taking a modulus value of the total number of data fragments of the HASH value.
  • the embodiment of the present disclosure can access the node without a special agent, the data access path is shorter, and the efficiency is higher; the data fragment is stored and managed, the data node has no active/standby points, and the multiple copies of the same piece of data can be copied to each other.
  • the load between nodes in the distributed database is more balanced; the data routing is automatically calculated and distributed, the data migration process is controllable, smoother and more uniform, without manual intervention, and the access is not interrupted.
  • Embodiments of the present disclosure also disclose a non-transitory computer readable storage medium storing computer executable instructions for performing an adaptive method of the distributed database system described above.
  • Embodiments of the present disclosure also disclose an electronic device including one or more processors, a memory, and one or more programs, the one or more programs being stored in a memory when processed by one or more When the device is executed, the adaptive method of the above distributed database system is executed.
  • FIG. 1 is a schematic diagram of a framework of a distributed database system according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of an embodiment of a method for adapting a distributed database system according to an embodiment of the present disclosure
  • FIG. 3 is a data node discovered in an adaptive method of a distributed database system according to an embodiment of the present disclosure.
  • FIG. 4 is a flowchart of an embodiment of a data node state management process in a distributed database system adaptive method according to an embodiment of the present disclosure
  • FIG. 5 is a flowchart of an embodiment of data replication in a method for adaptively implementing a distributed database system according to an embodiment of the present disclosure
  • FIG. 6 is a flowchart of an embodiment of a node expansion operation in a method for adapting a distributed database system according to an embodiment of the present disclosure
  • FIG. 7 is a flowchart of an embodiment of a node reduction operation in a method for adapting a distributed database system according to an embodiment of the present disclosure
  • FIG. 8 is a flowchart of an embodiment of a data node recovery data process in a distributed database system adaptive method according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of hardware of an electronic device according to an embodiment of the present disclosure.
  • the distributed database may have the following problems:
  • the elastic scaling of the data nodes is normal, and the distribution of data on the data nodes needs to be adjusted frequently. It may be necessary to manually execute commands or restart to adjust the number. According to the distribution or data distribution adjustment process is long, which brings greater risks to the stable operation of distributed databases and service quality;
  • the primary and secondary unidirectional replications are used between the active and standby nodes of the data storage.
  • the primary node is faulty. You may need to re-elect the new primary node.
  • the system status maintenance is complicated.
  • embodiments of the present disclosure provide a distributed database system and an adaptive method thereof.
  • FIG. 1 it is a schematic diagram of a framework of a distributed database system according to an embodiment of the present disclosure; this embodiment includes a control node 10 , a client API 20 , and a data node 30 .
  • a distributed database system is included. 4 data nodes 30; among them,
  • the control node 10 is configured to manage the data node 30 of the system, and the data route of the computing system is broadcasted to the client API 20 and the data node 30;
  • the above zoning rules can be:
  • the data node is divided into a left domain or a right domain; if the number of hosts/servers to which the data node belongs is greater than or equal to 2, the host/server according to the data node is uniformly distributed. Principle (even if the number of hosts/servers distributed in the left and right domains is as equal as possible), divide the data nodes into left and right domains so that the data nodes belonging to the same host/server are in the same domain.
  • each domain has 2 data nodes;
  • the data nodes numbered 1, 2, and 3 belong to the first host/server, and the data node numbered 4 belongs to the second host/server, and the data nodes 1, 2 that belong to the first host/server and 3 strokes Divided into the left domain, the data node 4 belonging to the second host/server is divided into the right domain, then the left domain has 3 data nodes;
  • the data node is divided into a left domain; if the total number of data nodes is greater than or equal to 2, the data node is divided into a left domain and a right domain according to the host/server to which the node belongs; The data nodes underneath belong to the same host/server.
  • control node 10 calculates the data route to meet the following data fragmentation principle:
  • the number of data fragments on each data node is as equal as possible
  • the first copy and the second copy of each data slice are distributed over data nodes of different domains
  • the second copy of all the first copy data fragments on each data node is evenly distributed on all the data nodes in the foreign domain; for example, the current data node is located in the left domain, and there are a total of 10 first copies of the data fragments, according to the above distribution
  • the second copy of the 10 data fragments should be evenly distributed on all data nodes in the right domain. Assuming that there are 2 data nodes in the right domain, the above 10 data fragments are distributed on each data node in the right domain. 5 of the second copies.
  • the distributed database system has four data nodes 30, and a total of 16 data fragments are stored, and the first copies of the data fragments are respectively marked with numbers 1-16; Marked by the number 1'-16', each data node 30 holds a first copy of 4 data slices and a second copy of 4 data slices; optionally, data fragmentation in the first copy The data fragmentation in the second copy is completely different.
  • the client API 20 is configured to provide an interface for the data visitor to read/write data, and the received data operation request is routed according to the locally cached data to the corresponding data node 30;
  • the algorithm for calculating the data fragmentation may be the key to the data
  • the word takes the HASH value, and then determines the number of fragments of the requested data by taking the modulus value of the total number of data fragments of the HASH value; or dividing the data fragment according to the prefix and suffix range of the data keyword;
  • the client API 20 is operated by a data visitor in a dynamic library/plugin mode
  • the data node 30 is deployed in the system as a virtual machine or a computing storage host, and can be configured as a left or right domain;
  • Data fragmentation refers to dividing data into multiple fragments according to data keywords. Different pieces of data have different data. Each data fragment has a first copy, a second copy, and a third copy. The third copy is only increasing. Temporary use in the process of subtracting data nodes, the data between multiple copies is the same, and multiple copies of the same data slice are stored in data nodes of different domains according to the principle of data slice distribution;
  • the data operation request includes a read and write operation; and may be: after receiving the data operation request, searching for the data operation request in the locally cached data route Whether the data fragment is stored in the data node 30; and when the data fragment is not stored in the data node 30, the data node 30 where the data fragment is located is searched in the locally cached data route, and Forwarding the data operation request to the found data node 30; executing the data operation request when the data slice is stored in the data node 30, and returning a data operation response to the data visitor;
  • the data slice changes for example, the data slice content change after the write operation is performed, the changed data or the full data is recorded, and the data copy operation is performed; the changed data or the full data is copied to other data nodes containing the same data slice. 30;
  • the state of the self is reported to the control node 10 periodically; and when the link changes, the state of the self is reported to the control node 10 in real time.
  • the topology of the distributed database system of the embodiment of the present disclosure is hidden from the data visitor, and the decoupling of the distributed database and the data visitor can be implemented.
  • FIG. 2 it is a flowchart of an embodiment of a method for implementing a distributed database system according to an embodiment of the present disclosure; this embodiment includes S101-S107.
  • the system is powered on, and the control node 10 divides the data node 30 according to a preset domain division rule, and then calculates the data route of the system, and broadcasts to the client API 20 and all the data nodes 30;
  • the first copy list and the second copy list of the data fragments to be distributed on each data node 30 are calculated, and a data route is generated.
  • the control node 10 may also be responsible for data node discovery and state management during system operation, as shown in FIG. 3 and FIG. 4 respectively;
  • the client API 20 receives the data operation request of the visitor
  • the number of fragments of the requested data is determined by adopting a HASH value for the data keyword, and then taking the modulus value of the total number of data fragments for the HASH value; or dividing the data according to the prefix and suffix range of the data keyword. sheet;
  • the data node 30 corresponding to each data segment is searched in the locally cached data route, and the data operation request is forwarded to the corresponding data node 30 according to a preset data node selection rule;
  • Data routing is the correspondence between each data fragment and data node 30.
  • the data node selection rule may be: when the number of data nodes 30 corresponding to the found data fragment is 1, the data operation request is directly forwarded to the data node 30;
  • the type of the data operation request is determined, and if it is a write operation, the copy number of the data fragment in each data node 30 is viewed. And the state of the data node 30, the data operation request is sent to the data node 30 whose state is normal and the copy number is small; if it is a read operation, the data operation request is sent to the data node 30 with the least load.
  • the data operation request received by the data node 30 finds in the locally cached data route whether the data fragment in the data operation request is stored in the data node 30; when searching in the locally cached data route When the data fragment in the data operation request is stored in the data node 30, then S106 is performed; when the data fragment in the data cache is not found in the locally cached data route, the data fragment is stored in the data node 30. At time S105 is performed;
  • this step by parsing the data keyword in the data operation request, it can be checked whether the data fragment of the request data belongs to the local node; when the data cache in the locally cached data route is searched, the data fragment in the data operation request is stored in the data node. In the case of 30, the data fragment corresponding to the request data is stored in the data node 30, and when the data fragment in the data operation request is not found in the locally cached data route, the data fragment is stored in the data node 30. The data fragment corresponding to the request data is not stored in the data node 30.
  • the data operation request can be:
  • the data operation request is a write operation, adding, modifying, or deleting the copy of the data slice stored locally according to the operation mode of the visitor;
  • the execution may be performed as The data copying process shown in FIG. 5; that is, after the data node 30 modifies the local data, the changed data needs to be copied to the data node 30 where the other copies of the same slice are located.
  • the data node 30 where the data fragment is located is searched in the locally cached data route, and the data operation request is forwarded to the corresponding data node that communicates with the local node according to a preset data node selection rule.
  • the data fragment corresponding to the data operation request is in the data node 30, it is processed locally, and the local data is read and written; if the data fragment corresponding to the data operation request is not in the data node 30, it is forwarded to the corresponding node for processing.
  • FIG. 3 it is a flowchart of an embodiment of a data node discovery process in a distributed database system adaptive method according to an embodiment of the present disclosure; this embodiment includes S201-S203.
  • control node 10 real-time monitoring whether there is a data node 30 added or deleted in the system, if it is found that the data node 30 is newly added, then executing S202; if it is found that the data node 30 is deleted, executing S203;
  • the newly added data node is the newly added data node
  • the deleted data node may include: a data node that needs to be deleted because the burden is less than a preset value, and a data node that is required to be deleted due to receiving a user deletion instruction.
  • the node expansion operation can be as shown in Figure 6;
  • the node reduction operation can be as shown in FIG. 7.
  • FIG. 4 it is a flowchart of an embodiment of a data node state management process in a distributed database system adaptive method according to an embodiment of the present disclosure; this embodiment includes S301-S303.
  • control node 10 receives the self status reported by the data node 30;
  • FIG. 5 it is a flowchart of a data replication embodiment in a distributed database system adaptive method according to an embodiment of the present disclosure; this embodiment includes S401-S403.
  • the data node 30 performing the write operation records data or full data of the data slice change of the current write operation
  • the data slice or the full data of the data slice change is copied to the data node 30 where the remaining copies of the data slice are located.
  • Copying the changed data or the full data to the data node 30 where the other copies of the same slice are located may include allowing the data node 30 storing the first copy to write the data, copying the changed data or the full data to the slice. 2.
  • the data node 30 where the third copy is located also allows the copied data or full data to be copied to the first and third copies of the slice after the data node 30 storing the second or third copy writes the data.
  • the data node 30 where the first and second copies are located that is, the mutual copying of the data copies is allowed, and the conflict of the same data between the copies of the same slice may be solved by the timestamp, that is, by comparing the data. Update the timestamp to determine whether to change the data by merging, overwriting, or discarding the change.
  • the data node of the copied data can complete the corresponding data update synchronously, and can also complete the corresponding data update asynchronously.
  • FIG. 6 it is a flowchart of a node expansion operation in a distributed database system adaptive method according to an embodiment of the present disclosure; this embodiment includes S501-S506.
  • control node 10 calculates a first copy data fragment list and a second copy data fragment list to be migrated to the newly added data node 30;
  • the average number of data fragments to be stored by each data node is calculated, which should be less than the current data fragment number of the original data node 30;
  • All of the first copies of the data fragments to be migrated from the original data node 30 constitute a first copy data fragment list of the new data node 30, and all data fragments to be migrated from the original data node 30
  • the second copy constitutes a second copy data fragment list of the newly added data node 30; the data in the list at this time is empty;
  • a third copy is allocated to the data segment to be migrated on the newly added data node 30; Calculate the data route of the system and broadcast it;
  • the data node recovery data process can be as shown in FIG. 8;
  • the preset expansion rule may be:
  • FIG. 7 it is a flowchart of a preferred embodiment of a node reduction operation in a distributed database system adaptive method according to an embodiment of the present disclosure; this embodiment includes S601-S607.
  • control node 10 calculates a first copy data fragment list and a second copy data fragment list of each of the remaining data nodes 30; this step may include:
  • the average number of data fragments to be stored by each data node 30 in the remaining data nodes 30 is calculated, which should be more than before the node is reduced;
  • the first and second copies of the data slice on the data node 30 to be deleted are allocated to the remaining data nodes 30, and the first copy data fragment list on each remaining node is obtained. And a second copy data list list;
  • the data node 30 recovers the data process as shown in FIG. 8;
  • the data node 30 copy data process can be as shown in FIG. 5;
  • the default reduction rule can be:
  • FIG. 8 it is a flowchart of an embodiment of a data node recovery data process in a distributed database system adaptive method according to an embodiment of the present disclosure; this embodiment includes S701-S703.
  • the data node 30 receiving the data fragment stores the received data fragment into the corresponding third copy
  • Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions for performing the distributed system adaptive method described above.
  • FIG. 9 it is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure.
  • the electronic device includes:
  • a processor 810 and a memory 820 may further include a communication interface 830 and a bus 840.
  • the processor 810, the memory 820, and the communication interface 830 can complete communication with each other through the bus 840.
  • Communication interface 830 can be used for information transmission.
  • Processor 810 can invoke logic instructions in memory 820 to perform the distributed database system adaptation method of the above-described embodiments.
  • the logic instructions in the memory 820 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in the embodiments of the present disclosure.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • a medium that can store program code, or a transitory storage medium including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • the program when executed, may include a flow of an embodiment of the method described above, wherein the computer readable storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory. (RAM), etc.
  • the computer readable storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory. (RAM), etc.
  • the embodiment of the present disclosure provides a distributed database system and an adaptive method thereof, which can make the data access path shorter and more efficient; and the data node has no active/standby points, so that the system load is more balanced; the data migration process is smoother. And even.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种分布式数据库系统及其自适应方法,所述系统包括控制节点、客户端API及数据节点,控制节点设置为管理系统的数据节点,计算系统的数据路由并广播给客户端API及数据节点;客户端API设置为为数据访问者提供读/写数据的接口并将接收到的数据操作请求按照本地缓存的数据路由,转发给相应的数据节点;数据节点设置为存储数据分片,以及根据本地缓存的数据路由,处理收到的数据操作请求。

Description

分布式数据库系统及其自适应方法 技术领域
本公开涉及数据库领域,例如涉及一种分布式数据库系统及其自适应方法。
背景技术
分布式数据库一般是有多台具有计算、存储、网络通讯功能的数据节点构成的数据库集群系统,具有高性能、高可靠的特点,已在电信、银行、互联网等行业广泛使用;分布式数据库可以由数据访问代理节点和数据存储节点组成,数据存储节点按照数据关键字被分成多个数据存储集群,每个数据存储集群有1个数据存储主节点和多个数据存储备节点,主节点可以提供读写数据服务,备节点仅提供读数据服务,主节点写入的数据会复制到备节点;数据访问代理节点可以负责代理数据访问者的数据操作请求,并转发到对应的数据存储集群的相应数据存储节点处理;这种分布式数据库因数据节点较多,数据节点间相互依赖,存在访问效率低、节点建数据容量和符合不均衡、数据分布难以调整和数据难以平滑迁移,以及状态维护复杂等问题。
对于以上分布式数据库的问题,通常处理方式可以是:把数据按照范围或者数据关键字的HASH值划分为多个分片,再按照一致性HASH算法,将分片均匀分布到数据节点上,但对于每个分片的副本(备份)分布未考虑节点间的均匀性;以上基于一致性HASH分布方式又可能带来了新的问题,即在增减节点时,有时调整的分片很少,有时调整的分片较多,数据分片在节点间调整是不可预见的,导致迁移的数据分片数量可能不可控。
发明内容
本公开提供一种分布式数据库系统及其自适应方法,可以改善分布式数据库系统内的节点间负荷不均衡、数据分布难以调整、数据迁移不平滑及维护复杂的问题。
本公开实施例公开了一种分布式数据库系统,上述系统包括控制节点、客户端应用程序编程接口(Application Programming Interface,API)及数据节点,其中,
控制节点,设置为管理系统的数据节点,计算系统的数据路由并广播给客户端API及数据节点;
客户端API,设置为为数据访问者提供读/写数据的接口,并将接收到的数据操作请求按照本地缓存的数据路由,转发给相应的数据节点;
数据节点,设置为存储数据分片,以及根据本地缓存的数据路由,处理收到的数据操作请求。
可选地,上述数据节点以虚拟机或者计算存储主机方式部署在上述系统中。
可选地,上述客户端API以动态库或插件方式供数据访问者操作。
可选地,上述控制节点,设置为实时监控系统中数据节点的数量及状态变化,并在数据节点数量变化时,执行节点扩容/缩容操作;在数据节点状态变化时,更新数据路由中对应数据节点的状态并广播更新后的数据路由。
可选地,上述客户端API,设置为根据收到数据操作请求中的数据关键字,计算请求数据对应的数据分片,并在本地缓存的数据路由中查找每个数据分片所在的数据节点;以及按照本地缓存的数据节点选取规则,将上述数据操作请求转发给相应的数据节点。
可选地,上述数据节点,设置为在收到数据操作请求后,在本地缓存的数据路由中查找上述数据操作请求中的数据分片是否存储在本数据节点中;并在上述数据分片未存储在本数据节点时,在本地缓存的数据路由中查找上述数据分片所在的数据节点,并将上述数据操作请求转发给找到的数据节点;在上述数据分片存储在本数据节点中时,执行上述数据操作请求,并向数据访问者返回数据操作响应。
可选地,上述数据节点,设置为周期性向上述控制节点上报自身状态;以及在链路变化时,实时向控制节点上报自身状态;
上述控制节点,设置为周期性更新数据路由。
可选地,上述数据节点,设置为执行数据恢复操作及数据复制操作;
上述控制节点,设置为按照预设的分域规则,对数据节点进行分域。
本公实施例公开了一种分布式数据库系统的自适应方法,上述方法在系统上电后,执行:
控制节点计算系统的数据路由并广播给客户API及所有数据节点;
客户端API接收访问者的数据操作请求,按照本地缓存的数据路由,将上述请求转发给对应的数据节点;以及
数据节点处理收到的数据操作请求,并返回数据操作响应给访问者。
可选地,上述控制节点在计算系统的数据路由前,还可以执行:
按照预设的分域规则,对数据节点进行分域。
可选地,上述分域规则为:若数据节点归属的主机/服务器数量为1,则将所述数据节点划分为左域或右域;若数据节点归属的主机/服务器数量大于等于2,则按照数据节点归属的主机/服务器均匀分布原则,将数据节点划分为左域和右域,使属于同一主机/服务器的数据节点位于同一域。若数据节点总数为1,则将上述数据节点划分为左域;若数据节点总数大于等于2,则按照节点归属的主机/服务器,将数据节点划分为左域和右域,使每个域下的数据节点属于同一主机/服务器。
可选地,上述控制节点根据系统的数据节点数量及数据分片数量,计算每个数据节点上需要分布的数据分片数量,生成数据路由。
可选地,上述客户端API按照本地缓存的数据路由,将上述请求转发给对应的数据节点步骤可以为:
根据数据操作请求中的数据关键字,计算相应的数据分片;
在本地缓存的数据路由中查找每个数据分片对应的数据节点;以及
按照预设的数据节点选择规则,将上述数据操作请求分别转发给找到的数据节点。
可选地,上述数据节点选取规则可以为:
当查找到的数据分片对应的数据节点数为1时,直接将上述数据操作请求转发给上述数据节点;以及
当查找到的数据分片对应的数据节点数大于1时,判断上述数据操作请求的类型,若为写操作,则查看上述每个数据节点中的上述数据分片的副本号及数据节点的状态,将上述数据操作请求发送给状态正常且副本号小的数据节点;若为读操作,则将上述数据操作请求发送给负荷最小的数据节点。
可选地,上述数据节点通过如下方法处理收到的数据操作请求:
在本地缓存的数据路由中查找上述数据操作请求中的数据分片是否存储在本数据节点中;当在本地缓存的数据路由中查找到上述数据操作请求中的数据分片存储在本数据节点中时,则执行上述数据操作请求,并向数据访问者返回数据操作响应;当在本地缓存的数据路由中未查找上述数据操作请求中的数据分片存储在本数据节点中时,在本地缓存的数据路由中查找上述数据分片所在的数据节点,将上述数据操作请求转发给找到的数据节点。
可选地,上述执行数据操作请求可以为:
当上述数据操作请求为写操作时,根据访问者的操作方式,对数据分片存 储于本地的副本进行增加、修改或删除操作;以及
当上述数据操作请求为读操作时,从数据分片存储于本地的副本中读取数据。
可选地,上述方法数据操作请求为写操作时,在处理完上述数据操作请求后,执行数据复制流程,可以为:
记录数据分片变更的数据或者全数据;以及
在本地缓存的数据路由中查找上述数据分片其余副本所在的数据节点,向数据分片其余副本所在的数据节点复制上述数据分片变更的数据或全数据。
可选地,上述控制节点在系统运行过程中,还可以执行:
实时监控系统中是否有数据节点新增或者删除,若有数据节点新增,则执行节点扩容操作;若有数据节点删除,则执行节点缩容操作。
可选地,上述节点扩容操作还可以包括:
计算要迁移到新增数据节点上的第一副本数据分片列表及第二副本数据分片列表;
在新增数据节点上为待迁入数据分片分配第三副本,重新计算系统的数据路由并广播;
等待新增数据节点恢复数据;
收到新增数据节点上报的自身状态,根据预设的扩容规则,重新计算系统的数据路由并广播;
通知所有数据节点删除本地所有数据分片的第三副本;以及
确认所有数据节点删除完成后,删除本地数据路由中的第三副本,重新计算系统的数据路由并广播。
可选地,上述计算要迁移到新增数据节点上的第一副本数据分片列表及第二副本数据分片列表步骤可以为:
用数据分片总数除以包含新增数据节点在内的数据节点总数,计算出每个数据节点要存储的平均数据分片数量;
用每个数据节点的当前数据分片数量减去计算得到的平均数据分片数量,计算出从每个原有数据节点应迁移到新增数据节点的数据分片数量;以及
所有要从原有数据节点中迁出的数据分片的第一副本组成新增数据节点的第一副本数据分片列表,所有要从原有数据节点中迁出的数据分片的第二副本组成新增数据节点的第二副本数据分片列表。
可选地,上述预设的扩容规则可以为:
通知原有数据节点将本地待迁移到新增数据节点上的数据分片的第一副本切换为第三副本;同时通知新增数据节点将对应的数据分片的第三副本切换为第一副本;以及
通知原有数据节点将本地待迁移到新增数据节点上的数据分片的第二副本切换为第三副本;同时通知新增数据节点将对应的数据分片的第三副本切换为第二副本。
可选地,上述节点缩容操作可以包括:
计算各剩余节点上第一副本数据分片列表和第二副本数据分片列表;
在剩余数据节点上为待迁入数据分片分配第三副本,重新计算系统的数据路由并广播;
等待其余数据节点恢复数据;
等待其余数据节点复制数据;
收到其余数据节点上报的自身状态,根据预设的缩容规则,重新计算系统的数据路由并广播;
通知所有数据节点删除本地所有数据分片的第三副本;以及
确认所有数据节点删除完成后,删除本地数据路由中的第三副本,重新计算系统的数据路由并广播。
可选地,上述计算每个剩余节点上第一副本数据分片列表和第二副本数据分片列表步骤可以为:
用数据分片总数除以剩余数据节点数,计算出剩余数据节点中每个数据节点要存储的平均数据分片数量;
用平均数据分片数量减去每个剩余数据节点上当前数据分片数量,计算出每个剩余数据节点上应从待关闭节点迁入的数据分片数;以及
根据预设的数据分片分布原则,将待删除数据节点上的数据分片第一副本和第二副本,分配到剩余数据节点上,得到每个剩余节点上第一副本数据分片列表和第二副本数据分片列表。
可选地,上述预设的缩容规则可以为:
通知待删除数据节点将待迁移数据分片的第一副本切换为第三副本;同时通知存储有上述数据分片第三副本的剩余数据节点将上述数据分片的第三副本切换为第一副本;以及
通知待删除数据节点将待迁移数据分片的第二副本切换为第三副本;同时通知存储有上述数据分片第三副本的剩余数据节点将上述数据分片的第三副本 切换为第二副本。
可选地,上述数据分片分布原则可以为:
每个数据节点上的数据分片数量尽量相同;且
每个数据分片的第一副本和第二副本分布在不同域的数据节点上;以及
每个数据节点上所有第一副本数据分片的第二副本均匀分布在异域的所有数据节点上。
可选地,上述数据节点通过如下步骤恢复数据:
查询本地数据路由,获取本节点上第一副本数据分片的第三副本所在的数据节点;
向第三副本所在的数据节点复制相应数据分片;以及
恢复完成,向控制节点上报自身状态。
可选地,上述增加的数据节点为新加入系统的数据节点;
上述删除的数据节点可以包括:因负担小于预设值而需要删除的数据节点及因收到用户删除指令而要求删除的数据节点。
可选地,上述客户端API通过对数据关键字取HASH值,再对HASH值取数据分片总数的模值方式来确定请求数据的分片数量。
本公开实施例可以无需经过专门的代理访问节点,数据访问路径更短,效率更高;数据分片存储和管理,数据节点无主备之分,同分片的多副本数据可相互复制,可以使得分布式数据库的节点间负载更加均衡;数据路由自动计算和分发,数据迁移过程可控,更加平滑和均匀,无需人工干预,且不会中断访问。
本公开实施例还公开了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述分布式数据库系统的自适应方法。
本公开实施例还公开了一种电子设备,该电子设备包括一个或多个处理器、存储器以及一个或多个程序,所述一个或多个程序存储在存储器中,当被一个或多个处理器执行时,执行上述分布式数据库系统的自适应方法。
附图说明
图1是本公开实施例所述分布式数据库系统的框架示意图;
图2是本公开实施例所述分布式数据库系统自适应方法实施例流程图;
图3是本公开实施例所述分布式数据库系统自适应方法中数据节点发现过 程实施例流程图;
图4是本公开实施例所述分布式数据库系统自适应方法中数据节点状态管理过程实施例流程图;
图5是本公开实施例所述分布式数据库系统自适应方法中数据复制实施例流程图;
图6是本公开实施例所述分布式数据库系统自适应方法中节点扩容操作实施例流程图;
图7是本公开实施例所述分布式数据库系统自适应方法中节点缩容操作实施例流程图;
图8是本公开实施例所述分布式数据库系统自适应方法中数据节点恢复数据过程实施例流程图;以及
图9是本公开实施例提供的一种电子设备的硬件结构示意图。
具体实施方式
应当理解,此处所描述的可选实施例仅用以解释本公开,并不用于限定本公开。在不冲突的情况下,本公开实施例以及实施例中的技术特征可以相互组合。
在相关技术中,由于分布式数据库的数据节点繁多,数据节点之间相互依赖而使得分布式数据库可能存在以下问题:
1、访问效率低
分布式数据库中有专门的数据访问代理节点,可能延长了数据访问者的数据访问路径,降低了数据访问者的处理效率;
2、节点间数据容量和负荷不均衡
数据存储节点间有主备之分,使得在写数据的频率较高时,只能在主节点上写入数据,可能导致主节点的负荷较重,易达到性能瓶颈,而数据备节点因只提供读服务,且有多个节点,资源利用不充分,导致数据节点间数据容量和负荷不均衡,部分数据节点存在性能瓶颈或者资源浪费;当某个数据节点故障后,其上面的数据只能被单个或者部分数据节点(备用节点)分担处理,加剧节点间负载不均衡;
3、数据分布难以调整,数据难以平滑迁移
一旦增减数据节点时,例如在虚拟化环境下,数据节点的弹性伸缩是常态,需经常调整数据在数据节点上的分布,可能需人工执行命令或者重启来调整数 据的分布或者数据分布调整的过程较长,给分布式数据库稳定运行和服务质量带来较大的风险;
4、状态维护复杂
数据存储主备节点间采用主备单向复制,主节点故障,可能需要重新选举新的主节点,系统状态维护复杂;
基础上述问题,本公开实施例提供了一种分布式数据库系统及其自适应方法。
如图1所示,是本公开实施例所述分布式数据库系统的框架示意图;本实施例包括控制节点10、客户端API20、数据节点30,在本公开实施例中,以分布式数据库系统包括4个数据节点30;其中,
控制节点10,设置为管理系统的数据节点30,计算系统的数据路由并广播给客户端API 20及数据节点30;可以包括:
周期性更新数据路由并广播;
实时监控系统中数据节点30的数量及状态变化,并在系统中的数据节点30的数量变化时,执行节点扩容/缩容操作;
在数据节点30状态变化时,更新数据路由中对应数据节点30的状态并广播更新后的数据路由;以及
按照预设的分域规则,对数据节点30进行分域;
上述分域规则可以为:
若数据节点归属的主机/服务器数量为1,则将所述数据节点划分为左域或右域;若数据节点归属的主机/服务器数量大于等于2,则按照数据节点归属的主机/服务器均匀分布原则(即使分布在左域和右域中的主机/服务器数量尽量相同),将数据节点划分为左域和右域,使属于同一主机/服务器的数据节点位于同一域。
例如,如图1所示,将4个数据节点依次从左到右编号为1-4;若4个数据节点归属于同1个主机/服务器,则将4个数据节点全部划分到左域或者右域;若4个数据节点归属于同2个主机/服务器,假设编号为1和2的数据节点归属于第一主机/服务器,编号3和4的数据节点归属于第二主机/服务器;则将归属于第一主机/服务器的数据节点1和2划分为左域,将归属于第二主机/服务器的数据节点3和4划分为右域,那么每个域下均拥有2个数据节点;或者假设编号为1、2和3的数据节点归属于第一主机/服务器,编号为4的数据节点归属于第二主机/服务器,则将归属于第一主机/服务器的数据节点1、2和3划 分为左域,将归属于第二主机/服务器的数据节点4划分为右域,那么左域拥有3个数据节点;右域拥有1个数据节点;
若数据节点总数为1,则将所述数据节点划分为左域;若数据节点总数大于等于2,则按照节点归属的主机/服务器,将数据节点划分为左域和右域;使每个域下的数据节点属于同一主机/服务器。
为了实现数据分片的均衡和数据的可靠性,控制节点10计算数据路由可以满足以下数据分片分布原则:
每个数据节点上的数据分片数量尽量相同;且
每个数据分片的第一副本和第二副本分布在不同域的数据节点上;以及
每个数据节点上所有第一副本数据分片的第二副本均匀分布在异域的所有数据节点上;例如当前数据节点位于左域,其上共有10个数据分片的第一副本,按照以上分布原则,这10个数据分片的第二副本应均匀分布在右域的所有数据节点上,假设右域有2个数据节点,则右域的每个数据节点上分布有上述10个数据分片的第二副本中的5个。
如图1所示,本实施例中,分布式数据库系统共有4个数据节点30,共存储有16个数据分片,数据分片的第一副本分别用数字1-16标记;第二副本分别用数字1′-16′标记,每个数据节点30上均保存4个数据分片的第一副本和4个数据分片的第二副本;可选地,第一副本中的数据分片与第二副本中的数据分片完全不同。
客户端API 20,设置为为数据访问者提供读/写数据的接口,并将接收到的数据操作请求按照本地缓存的数据路由,发送给相应的数据节点30;可以为:
根据收到数据操作请求中的数据关键字,计算对应的数据分片,并在本地缓存的数据路由中查找每个数据分片所在的数据节点30;计算数据分片的算法可以是对数据关键字取HASH值,再对HASH值取数据分片总数的模值方式来确定请求数据的分片数量;也可以按照数据关键字的前缀、后缀范围来划分数据分片;
按照本地缓存的数据节点选取规则,将所述数据操作请求转发给相应的数据节点30;
客户端API 20以动态库/插件方式供数据访问者操作;
数据节点30,以虚拟机或者计算存储主机方式部署在系统中,可被配置归属为左域或者右域;设置为:
存储数据分片;
数据分片是指根据数据关键字把数据切分为多个分片,不同分片的数据不同,每个数据分片有第一副本、第二副本和第三副本,第三副本只在增减数据节点过程中临时使用,多个副本间的数据是相同的,且同一数据分片的多个副本按照数据分片分布原则,被存储在不同域的数据节点上;
缓存收到的数据路由,以及处理收到的数据操作请求,数据操作请求包括读、写操作;可以为:在收到数据操作请求后,在本地缓存的数据路由中查找所述数据操作请求中的数据分片是否存储在本数据节点30中;并在所述数据分片未存储在本数据节点30中时,在本地缓存的数据路由中查找所述数据分片所在的数据节点30,并将所述数据操作请求转发给找到的数据节点30;在所述数据分片存储在本数据节点30中时,执行所述数据操作请求,并向数据访问者返回数据操作响应;
重启或者数据路由变化时,执行数据恢复操作;
在数据分片变化时,例如执行写操作后数据分片内容变更,记录变更的数据或全数据,并执行数据复制操作;将变更的数据或者全数据复制到含有相同数据分片的其他数据节点30上;
周期性向所述控制节点10上报自身状态;以及在链路变化时,实时向控制节点10上报自身状态。
本公开实施例分布式数据库系统的拓扑对数据访问者隐藏,可以实现分布式数据库和数据访问者的解耦。
如图2所示,是本公开实施例所述分布式数据库系统自适应方法实施例流程图;本实施例包括S101-S107。
在S101中,系统上电,控制节点10按照预设的分域规则,对数据节点30进行分域,然后计算系统的数据路由,并广播给客户API 20及所有数据节点30;
本步骤根据系统的数据节点30数量、数据分片数量及预设的路由计算原则,计算每个数据节点30上需要分布的数据分片的第一副本列表和第二副本列表,生成数据路由。
控制节点10在系统运行过程中,还可以负责数据节点发现及状态管理,过程分别如图3及图4所示;
在S102中,系统初始化完成后,客户端API 20接收访问者的数据操作请求;
在S103中,根据数据操作请求中的数据关键字,计算相应的数据分片;
本步骤通过采用对数据关键字取HASH值,再对HASH值取数据分片总数的模值的方式来确定请求数据的分片数量;也可以按照数据关键字的前缀、后缀范围来划分数据分片;
在S104中,在本地缓存的数据路由中查找每个数据分片对应的数据节点30,按照预设的数据节点选取规则,将所述数据操作请求分别转发给相应的数据节点30;
数据路由即为每个数据分片和数据节点30的对应关系。
数据节点选取规则可以为:当查找到的数据分片对应的数据节点30数为1时,直接将所述数据操作请求转发给所述数据节点30;
当查找到的数据分片对应的数据节点30数大于1时,判断所述数据操作请求的类型,若为写操作,则查看所述每个数据节点30中的所述数据分片的副本号及数据节点30的状态,将所述数据操作请求发送给状态正常且副本号小的数据节点30;若为读操作,则将所述数据操作请求发送给负荷最小的数据节点30。
在S105中,数据节点30收到的数据操作请求,在本地缓存的数据路由中查找所述数据操作请求中的数据分片是否存储在本数据节点30中;当在本地缓存的数据路由中查找所述数据操作请求中的数据分片存储在本数据节点30中时,则执行S106;当在本地缓存的数据路由中未查找所述数据操作请求中的数据分片存储在本数据节点30中时,执行S107;
本步骤通过解析数据操作请求中的数据关键字,可以查看请求数据的数据分片是否属于本节点;当在本地缓存的数据路由中查找所述数据操作请求中的数据分片存储在本数据节点30中时,则所述请求数据对应的数据分片存储在本数据节点30,当在本地缓存的数据路由中未查找所述数据操作请求中的数据分片存储在本数据节点30中时,所述请求数据对应的数据分片未存储在本数据节点30。
在S106中,执行所述数据操作请求,向数据访问者返回数据操作响应,当前数据分片处理结束;
本步骤中,执行数据操作请求可以为:
当所述数据操作请求为写操作时,根据访问者的操作方式,对数据分片存储于本地的副本进行增加、修改或删除操作;以及
当所述数据操作请求为读操作时,从数据分片存储于本地的副本中读取数据。
在数据操作请求为写操作时,处理完所述数据操作请求后,还可以执行如 图5所示的数据复制流程;即在数据节点30修改本地的数据后,需要把变更后的数据复制到同分片的其他副本所在的数据节点30上。
在S107中,本地缓存的数据路由中查找所述数据分片所在的数据节点30,按照预设的数据节点选取规则,将所述数据操作请求转发给相应的与本节点通信正常的数据节点。
即若数据操作请求对应的数据分片在本数据节点30,则在本地处理,读写本地的数据;若数据操作请求对应的数据分片不在本数据节点30,则转发到对应的节点处理。
如图3所示,是本公开实施例所述分布式数据库系统自适应方法中数据节点发现过程实施例流程图;本实施例包括S201-S203。
在S201中,控制节点10实时监控系统中是否有数据节点30新增或者删除,若发现有数据节点30新增,则执行S202;若发现有数据节点30删除,则执行S203;
新增的数据节点即为新加入的数据节点;
删除的数据节点可以包括:因负担小于预设值而需要删除的数据节点及因收到用户删除指令而要求删除的数据节点。
在S202中,执行节点扩容操作,当前发现处理结束;
节点扩容操作可以如图6所示;
在S203中,执行节点缩容操作,当前发现处理结束。
节点缩容操作可以如图7所示。
如图4所示,是本公开实施例所述分布式数据库系统自适应方法中数据节点状态管理过程实施例流程图;本实施例包括S301-S303。
在S301中,控制节点10收到数据节点30上报的自身状态;
在S302中,查看所述状态,为若正常,则当前状态处理结束;若为异常,则执行S303;
在S303中,更新数据路由中所述数据节点30的状态,并广播更新后的数据路由。
如图5所示,是本公开实施例所述分布式数据库系统自适应方法中数据复制实施例流程图;本实施例包括S401-S403。
在S401中,执行写操作的数据节点30记录本次写操作的数据分片变更的数据或者全数据;
在S402中,在本地缓存的数据路由中查找所述数据分片其余副本所在的数据节点30;
在S403中,向数据分片其余副本所在的数据节点30复制所述数据分片变更的数据或全数据。
复制变更的数据或全数据到同分片的其他副本所在的数据节点30,可以包括允许存储有第一副本的数据节点30写入数据后,复制变更的数据或全数据到该分片的第二、第三副本所在的数据节点30,也允许在存储有第二或者第三副本的数据节点30写入数据后,复制变更的数据或全数据到该分片的第一、第三副本或者第一、第二副本所在的数据节点30,即允许数据副本间的相互复制,相同分片的副本间的相同数据相互复制可能存在的冲突问题,可通过时间戳来解决,即通过比较数据的更新时间戳,来确定是通过合并、覆盖来变更数据还是放弃变更。
数据复制过程中,被复制数据的数据节点,可同步完成相应数据更新,也可异步完成相应数据更新。
如图6所示,是本公开实施例所述分布式数据库系统自适应方法中节点扩容操作实施例流程图;本实施例包括S501-S506。
在S501中,控制节点10计算要迁移到新增数据节点30上的第一副本数据分片列表及第二副本数据分片列表;可以包括:
用数据分片总数除以包含新增数据节点30在内的数据节点总数,计算出每个数据节点要存储的平均数据分片数量,应比原有数据节点30的当前数据分片数量少;
用每个原有数据节点30的当前数据分片数量减去计算得到的平均数据分片数量,计算出从每个原有数据节点30应迁移到新增数据节点30的数据分片数量;以及
所有要从原有数据节点30中迁出的数据分片的第一副本组成新增数据节点30的第一副本数据分片列表,所有要从原有数据节点30中迁出的数据分片的第二副本组成新增数据节点30的第二副本数据分片列表;此时的列表中的数据为空;
在S502中,在新增数据节点30上为待迁入数据分片分配第三副本;重新 计算系统的数据路由并广播;
在S503中,等待新增数据节点30恢复数据;
数据节点恢复数据过程可以如图8所示;
在S504中,收到新增数据节点30上报的自身状态,根据预设的扩容规则,重新计算系统的数据路由并广播;
所述预设的扩容规则可以为:
通知原有数据节点30将本地待迁移到新增数据节点30上的数据分片的第一副本切换为第三副本;同时通知新增数据节点将对应的数据分片的第三副本切换为第一副本;以及
通知原有数据节点30将本地待迁移到新增数据节点30上的数据分片的第二副本切换为第三副本;同时通知新增数据节点30将对应的数据分片的第三副本切换为第二副本。
在S505中,通知所有数据节点30删除本地所有数据分片的第三副本;
在S506中,确认所有数据节点30删除完成后,删除本地数据路由中的第三副本,重新计算系统的数据路由并广播。
如图7所示,是本公开实施例所述分布式数据库系统自适应方法中节点缩容操作优选实施例流程图;本实施例包括S601-S607。
在S601中,控制节点10计算各剩余数据节点30的第一副本数据分片列表及第二副本数据分片列表;本步骤可以包括:
用数据分片总数除以剩余数据节点30数,计算出剩余数据节点30中每个数据节点30要存储的平均数据分片数量,应比减少节点前要多;
用平均数据分片数量减去每个剩余数据节点30上当前数据分片数量,计算出每个剩余数据节点30上应从待关闭节点迁入的数据分片数;以及
根据预设的数据分片分布原则,将待删除数据节点30上的数据分片第一副本和第二副本,分配到剩余数据节点30上,得到每个剩余节点上第一副本数据分片列表和第二副本数据列表列表;
在S602中,在剩余数据节点30上为待迁入数据分片分配第三副本,重新计算系统的数据路由并广播;
在S603中,等待剩余数据节点30恢复数据;
数据节点30恢复数据过程可以如图8所示;
在S604中,等待剩余数据节点30复制数据;
数据节点30复制数据过程可以如图5所示;
在S605中,收到剩余数据节点30上报的自身状态,根据预设的缩容规则,重新计算系统的数据路由并广播;
预设的缩容规则可以为:
通知待删除数据节点30将待迁移数据分片的第一副本切换为第三副本;同时通知存储有所述数据分片第三副本的剩余数据节点30将所述数据分片的第三副本切换为第一副本;以及
通知待删除数据节点30将待迁移数据分片的第二副本切换为第三副本;同时通知存储有所述数据分片第三副本的剩余数据节点30将所述数据分片的第三副本切换为第二副本。
在S606中,通知所有数据节点30删除本地所有数据分片的第三副本;
在S607中,确认所有数据节点30删除完成后,删除本地数据路由中的第三副本,重新计算系统的数据路由并广播。
如图8所示,是本公开实施例所述分布式数据库系统自适应方法中数据节点恢复数据过程实施例流程图;本实施例包括S701-S703。
在S701中,查询本地数据路由,获取本节点上第一副本数据分片的第三副本所在的数据节点30;
在S702中,向第三副本所在的数据节点30复制相应数据分片;
收到数据分片的数据节点30,将收到的数据分片存入对应的第三副本中;
在S703中,所有第一副本数据分片均恢复完成后,向控制节点10上报自身状态。
本公开实施例还提供一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述分布式系统自适应方法。
如图9所示,是本公开实施例提供的一种电子设备的硬件结构示意图,如图9所示,该电子设备包括:
处理器(processor)810和存储器(memory)820;还可以包括通信接口(Communications Interface)830和总线840。
其中,处理器810、存储器820和通信接口830可以通过总线840完成相互间的通信。通信接口830可以用于信息传输。处理器810可以调用存储器820中的逻辑指令,以执行上述实施例的分布式数据库系统自适应方法。
此外,上述的存储器820中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质,也可以是暂态存储介质。
最后需要说明的是,本领域普通技术人员可理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来执行相关的硬件来完成的,该程序可存储于一个非暂态计算机可读存储介质中,该程序在执行时,可包括如上述方法的实施例的流程,其中,该计算机可读存储介质可以为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。
工业实用性
本公开实施例提供了一种分布式数据库系统及其自适应方法,能够使得数据访问路径更短,效率更高;且数据节点无主备之分,使得系统负载更加均衡;数据迁移过程更加平滑和均匀。

Claims (29)

  1. 一种分布式数据库系统,包括控制节点、客户端应用程序编程接口API及数据节点,其中,
    控制节点,设置为管理系统的数据节点,计算系统的数据路由并广播给客户端API及数据节点;
    客户端API,设置为为数据访问者提供读/写数据的接口,并将接收到的数据操作请求按照本地缓存的数据路由,转发给相应的数据节点;
    数据节点,设置为存储数据分片,以及根据本地缓存的数据路由,处理收到的数据操作请求。
  2. 如权利要求1所述的系统,其中,所述数据节点以虚拟机或者计算存储主机方式部署在所述系统中。
  3. 如权利要求1所述的系统,其中,所述客户端API以动态库或插件方式供数据访问者操作。
  4. 如权利要求1-3任一项所述的系统,其中,
    所述控制节点,设置为实时监控系统中数据节点的数量及状态变化,并在数据节点数量变化时,执行节点扩容/缩容操作;在数据节点状态变化时,更新数据路由中对应数据节点的状态并广播更新后的数据路由。
  5. 如权利要求1-3任一项所述的系统,其中,
    所述客户端API,设置为根据收到数据操作请求中的数据关键字,计算请求数据对应的数据分片,并在本地缓存的数据路由中查找每个数据分片所在的数据节点;以及按照本地缓存的数据节点选取规则,将所述数据操作请求转发给相应的数据节点。
  6. 如权利要求4所述的系统,其中,
    所述数据节点,设置为在收到数据操作请求后,在本地缓存的数据路由中查找所述数据操作请求中的数据分片是否存储在本数据节点中;并在所述数据分片未存储在本数据节点时,在本地缓存的数据路由中查找所述数据分片所在的数据节点,并将所述数据操作请求转发给找到的数据节点;在所述数据分片存储在本数据节点中时,执行所述数据操作请求,并向数据访问者返回数据操作响应。
  7. 如权利要求1所述的系统,其中,
    所述数据节点,设置为周期性向所述控制节点上报自身状态;以及在链路变化时,实时向控制节点上报自身状态;以及
    所述控制节点,设置为周期性更新数据路由。
  8. 如权利要求1所述的系统,其中,所述数据节点,设置为执行数据恢复操作及数据复制操作;
    所述控制节点,设置为按照预设的分域规则,对数据节点进行分域。
  9. 一种分布式数据库系统的自适应方法,包括:在所述系统上电后,
    控制节点计算系统的数据路由并广播给客户API及所有数据节点;
    客户端API接收访问者的数据操作请求,按照本地缓存的数据路由,将所述请求转发给对应的数据节点;以及
    数据节点处理收到的数据操作请求,并返回数据操作响应给访问者。
  10. 如权利要求9所述的方法,在所述控制节点在计算系统的数据路由前,还包括:
    按照预设的分域规则,对数据节点进行分域。
  11. 如权利要求10所述的方法,其中,所述分域规则为:若数据节点归属的主机/服务器总数数量为1,则将所述数据节点划分为左域或右域;若数据节点归属的主机/服务器数量总数大于等于2,则按照数据节点归属的主机/服务器均匀分布原则,将数据节点划分为左域和右域,使每个域下的数据节点属于同一主机/服务器使属于同一主机/服务器的数据节点位于同一域。
  12. 如权利要求9或10所述的方法,其中,所述控制节点根据系统的数据节点数量及数据分片数量,计算每个数据节点上需要分布的数据分片数量,生成数据路由。
  13. 如权利要求9或10所述的方法,其中,所述客户端API按照本地缓存的数据路由,将所述请求转发给对应的数据节点包括:
    根据数据操作请求中的数据关键字,计算相应的数据分片;
    在本地缓存的数据路由中查找每个数据分片对应的数据节点;以及
    按照预设的数据节点选择规则,将所述数据操作请求分别转发给找到的数据节点。
  14. 如权利要求13所述的方法,其中,所述数据节点选取规则为:
    当查找到的数据分片对应的数据节点数为1时,直接将所述数据操作请求转发给所述数据节点;以及
    当查找到的数据分片对应的数据节点数大于1时,判断所述数据操作请求的类型,若为写操作,则查看所述每个数据节点中的所述数据分片的副本号及数据节点的状态,将所述数据操作请求发送给状态正常且副本号小的数据节点;若为读操作,则将所述数据操作请求发送给负荷最小的数据节点。
  15. 如权利要求9或10所述的方法,其中,所述数据节点通过如下方法处理收到的数据操作请求:
    在本地缓存的数据路由中查找所述数据操作请求中的数据分片是否存储在本数据节点中;若是,则执行所述数据操作请求,并向数据访问者返回数据操作响应;否则,在本地缓存的数据路由中查找所述数据分片所在的数据节点,将所述数据操作请求转发给找到的数据节点。
  16. 如权利要求15所述的方法,其中,所述执行数据操作请求为:
    当所述数据操作请求为写操作时,根据访问者的操作方式,对数据分片存储于本地的副本进行增加、修改或删除操作;以及
    当所述数据操作请求为读操作时,从数据分片存储于本地的副本中读取数据。
  17. 如权利要求16所述的方法,其中,所述方法数据操作请求为写操作时,在处理完所述数据操作请求后,执行数据复制流程,为:
    记录数据分片变更的数据或者全数据;以及
    在本地缓存的数据路由中查找所述数据分片其余副本所在的数据节点,向数据分片其余副本所在的数据节点复制所述数据分片变更的数据或全数据。
  18. 如权利要求9或10所述的方法,其中,所述控制节点在系统运行过程中包括:
    实时监控系统中是否有数据节点新增或者删除,若有数据节点新增,则执行节点扩容操作;若有数据节点删除,则执行节点缩容操作。
  19. 如权利要求18所述的方法,其中,所述节点扩容操作包括:
    计算要迁移到新增数据节点上的第一副本数据分片列表及第二副本数据分片列表;
    在新增数据节点上为待迁入数据分片分配第三副本,重新计算系统的数据路由并广播;
    等待新增数据节点恢复数据;
    收到新增数据节点上报的自身状态,根据预设的扩容规则,重新计算系统的数据路由并广播;
    通知所有数据节点删除本地所有数据分片的第三副本;以及
    确认所有数据节点删除完成后,删除本地数据路由中的第三副本,重新计算系统的数据路由并广播。
  20. 如权利要求19所述的方法,其中,所述计算要迁移到新增数据节点上 的第一副本数据分片列表及第二副本数据分片列表包括:
    用数据分片总数除以包含新增数据节点在内的数据节点总数,计算出每个数据节点要存储的平均数据分片数量;
    用每个数据节点的当前数据分片数量减去计算得到的平均数据分片数量,计算出从每个原有数据节点应迁移到新增数据节点的数据分片数量;以及
    所有要从原有数据节点中迁出的数据分片的第一副本组成新增数据节点的第一副本数据分片列表,所有要从原有数据节点中迁出的数据分片的第二副本组成新增数据节点的第二副本数据分片列表。
  21. 如权利要求19所述的方法,其中,所述预设的扩容规则为:
    通知原有数据节点将本地待迁移到新增数据节点上的数据分片的第一副本切换为第三副本;同时通知新增数据节点将对应的数据分片的第三副本切换为第一副本;以及
    通知原有数据节点将本地待迁移到新增数据节点上的数据分片的第二副本切换为第三副本;同时通知新增数据节点将对应的数据分片的第三副本切换为第二副本。
  22. 如权利要求18所述的方法,其中,所述节点缩容操作包括:
    计算每个剩余节点上第一副本数据分片列表和第二副本数据分片列表;
    在剩余数据节点上为待迁入数据分片分配第三副本,重新计算系统的数据路由并广播;
    等待其余数据节点恢复数据;
    等待其余数据节点复制数据;
    收到其余数据节点上报的自身状态,根据预设的缩容规则,重新计算系统的数据路由并广播;
    通知所有数据节点删除本地所有数据分片的第三副本;以及
    确认所有数据节点删除完成后,删除本地数据路由中的第三副本,重新计算系统的数据路由并广播。
  23. 如权利要求22所述的方法,其中,所述计算每个剩余节点上第一副本数据分片列表和第二副本数据分片列表步骤具体为:
    用数据分片总数除以剩余数据节点数,计算出剩余数据节点中每个数据节点要存储的平均数据分片数量;
    用平均数据分片数量减去每个剩余数据节点上当前数据分片数量,计算出每个剩余数据节点上应从待关闭节点迁入的数据分片数;以及
    根据预设的数据分片分布原则,将待删除数据节点上的数据分片第一副本和第二副本,分配到剩余数据节点上,得到每个剩余节点上第一副本数据分片列表和第二副本数据分片列表。
  24. 如权利要求22所述的方法,其中,所述预设的缩容规则为:
    通知待删除数据节点将待迁移数据分片的第一副本切换为第三副本;同时通知存储有所述数据分片第三副本的剩余数据节点将所述数据分片的第三副本切换为第一副本;以及
    通知待删除数据节点将待迁移数据分片的第二副本切换为第三副本;同时通知存储有所述数据分片第三副本的剩余数据节点将所述数据分片的第三副本切换为第二副本。
  25. 如权利要求23所述的方法,其中,所述数据分片分布原则为:
    每个数据节点上的数据分片数量尽量相同;且
    每个数据分片的第一副本和第二副本分布在不同域的数据节点上;以及
    每个数据节点上所有第一副本数据分片的第二副本均匀分布在异域的所有数据节点上。
  26. 如权利要求19或22所述的方法,其中,所述等待新增数据节点恢复数据包括:
    查询本地数据路由,获取本节点上第一副本数据分片的第三副本所在的数据节点;
    向第三副本所在的数据节点复制相应数据分片;以及
    恢复完成,向控制节点上报自身状态。
  27. 如权利要求18所述的方法,其中,
    所述增加的数据节点为新加入系统的数据节点;
    所述删除的数据节点包括:因负担小于预设值而需要删除的数据节点及因收到用户删除指令而要求删除的数据节点。
  28. 如权利要求13所述的方法,其中,所述客户端API通过对数据关键字取HASH值,再对HASH值取数据分片总数的模值方式来确定请求数据的分片数量。
  29. 一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求9-28任一项的分布式数据库系统的自适应方法。
PCT/CN2016/103964 2015-12-07 2016-10-31 分布式数据库系统及其自适应方法 WO2017097059A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510890348.7 2015-12-07
CN201510890348.7A CN106844399B (zh) 2015-12-07 2015-12-07 分布式数据库系统及其自适应方法

Publications (1)

Publication Number Publication Date
WO2017097059A1 true WO2017097059A1 (zh) 2017-06-15

Family

ID=59012671

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/103964 WO2017097059A1 (zh) 2015-12-07 2016-10-31 分布式数据库系统及其自适应方法

Country Status (2)

Country Link
CN (1) CN106844399B (zh)
WO (1) WO2017097059A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844399A (zh) * 2015-12-07 2017-06-13 中兴通讯股份有限公司 分布式数据库系统及其自适应方法
CN107579865A (zh) * 2017-10-18 2018-01-12 北京奇虎科技有限公司 分布式代码服务器的权限管理方法、装置及系统
CN110175069A (zh) * 2019-05-20 2019-08-27 广州南洋理工职业学院 基于广播信道的分布式事务处理系统及方法
CN111835848A (zh) * 2020-07-10 2020-10-27 北京字节跳动网络技术有限公司 数据分片方法、装置、电子设备及计算机可读介质
CN112214466A (zh) * 2019-07-12 2021-01-12 海能达通信股份有限公司 分布式集群系统及数据写入方法、电子设备、存储装置
CN113312005A (zh) * 2021-06-22 2021-08-27 青岛理工大学 基于区块链的物联网数据扩容存储方法、系统及计算设备
CN117667944A (zh) * 2023-12-12 2024-03-08 支付宝(杭州)信息技术有限公司 用于分布式图数据库的副本扩容方法、装置及系统

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273187A (zh) * 2017-06-29 2017-10-20 深信服科技股份有限公司 读取位置获取方法及装置、计算机装置、可读存储介质
CN108073696B (zh) * 2017-12-11 2020-10-27 厦门亿力吉奥信息科技有限公司 基于分布式内存数据库的gis应用方法
CN108319656A (zh) * 2017-12-29 2018-07-24 中兴通讯股份有限公司 实现灰度发布的方法、装置及计算节点和系统
CN108845892A (zh) * 2018-04-19 2018-11-20 北京百度网讯科技有限公司 分布式数据库的数据处理方法、装置、设备和计算机存储介质
CN108712488B (zh) * 2018-05-11 2021-09-10 北京奇虎科技有限公司 一种基于区块链的数据处理方法、装置、区块链系统
CN108664222B (zh) * 2018-05-11 2020-05-15 北京奇虎科技有限公司 一种区块链系统及其应用方法
CN108737534B (zh) * 2018-05-11 2021-08-24 北京奇虎科技有限公司 一种基于区块链的数据传输方法、装置、区块链系统
CN108881415B (zh) * 2018-05-31 2020-11-17 广州亿程交通信息集团有限公司 分布式实时大数据分析系统
CN109189561A (zh) * 2018-08-08 2019-01-11 广东亿迅科技有限公司 一种基于mpp架构的事务处理系统及其方法
CN109933568A (zh) * 2019-03-13 2019-06-25 安徽海螺集团有限责任公司 一种工业大数据平台系统及其查询方法
CN111090687B (zh) * 2019-12-24 2023-03-10 腾讯科技(深圳)有限公司 数据处理方法及装置、系统、计算机可读存储介质
WO2021147926A1 (en) * 2020-01-20 2021-07-29 Huawei Technologies Co., Ltd. Methods and systems for hybrid edge replication
CN111291124A (zh) * 2020-02-12 2020-06-16 杭州涂鸦信息技术有限公司 一种数据存储方法及其系统和设备
CN111400112B (zh) * 2020-03-18 2021-04-13 深圳市腾讯计算机系统有限公司 分布式集群的存储系统的写入方法、装置及可读存储介质
CN111538772B (zh) * 2020-04-14 2023-07-04 北京宝兰德软件股份有限公司 数据的交换处理方法、装置、电子设备及存储介质
CN111338806B (zh) * 2020-05-20 2020-09-04 腾讯科技(深圳)有限公司 一种业务控制方法及装置
CN113535656B (zh) * 2021-06-25 2022-08-09 中国人民大学 数据访问方法、装置、设备及存储介质
CN114237520B (zh) * 2022-02-28 2022-07-08 广东睿江云计算股份有限公司 一种ceph集群数据均衡方法以及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095806A (zh) * 2012-12-20 2013-05-08 中国电力科学研究院 一种面向大电网的实时数据库系统的负载均衡管理系统
CN103870602A (zh) * 2014-04-03 2014-06-18 中国科学院地理科学与资源研究所 数据库空间分片复制方法及系统
CN104239417A (zh) * 2014-08-19 2014-12-24 天津南大通用数据技术股份有限公司 一种分布式数据库数据分片后动态调整方法及装置
WO2015000359A1 (zh) * 2013-07-02 2015-01-08 华为技术有限公司 分布式存储系统、集群节点及其区间管理方法
CN104615657A (zh) * 2014-12-31 2015-05-13 天津南大通用数据技术股份有限公司 一种节点支持多数据分片的分布式集群的扩容和缩容方法

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761407B1 (en) * 2006-10-10 2010-07-20 Medallia, Inc. Use of primary and secondary indexes to facilitate aggregation of records of an OLAP data cube
CN104380690B (zh) * 2012-06-15 2018-02-02 阿尔卡特朗讯 用于推荐服务的隐私保护系统的架构
CN103780482B (zh) * 2012-10-22 2017-06-27 华为技术有限公司 一种获取内容方法及用户设备、缓存节点
CN103838770A (zh) * 2012-11-26 2014-06-04 中国移动通信集团北京有限公司 一种数据逻辑分区的方法和系统
CN103078927B (zh) * 2012-12-28 2015-07-22 合一网络技术(北京)有限公司 一种key-value数据分布式缓存系统及其方法
CN103324539B (zh) * 2013-06-24 2017-05-24 浪潮电子信息产业股份有限公司 一种作业调度管理系统及方法
CN103475566A (zh) * 2013-07-10 2013-12-25 北京发发时代信息技术有限公司 一种实时消息交换平台及分布式集群组建方法
CN103516809A (zh) * 2013-10-22 2014-01-15 浪潮电子信息产业股份有限公司 一种高扩展、高性能的分布式存储体系结构
CN104317899A (zh) * 2014-10-24 2015-01-28 西安未来国际信息股份有限公司 一种大数据分析与处理系统及访问方法
CN104333512B (zh) * 2014-10-30 2017-07-28 北京思特奇信息技术股份有限公司 一种分布式内存数据库访问系统及方法
CN105007238B (zh) * 2015-07-22 2018-04-24 中国船舶重工集团公司第七0九研究所 轻量级跨平台消息中间件的实现方法及系统
CN106844399B (zh) * 2015-12-07 2022-08-09 中兴通讯股份有限公司 分布式数据库系统及其自适应方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095806A (zh) * 2012-12-20 2013-05-08 中国电力科学研究院 一种面向大电网的实时数据库系统的负载均衡管理系统
WO2015000359A1 (zh) * 2013-07-02 2015-01-08 华为技术有限公司 分布式存储系统、集群节点及其区间管理方法
CN103870602A (zh) * 2014-04-03 2014-06-18 中国科学院地理科学与资源研究所 数据库空间分片复制方法及系统
CN104239417A (zh) * 2014-08-19 2014-12-24 天津南大通用数据技术股份有限公司 一种分布式数据库数据分片后动态调整方法及装置
CN104615657A (zh) * 2014-12-31 2015-05-13 天津南大通用数据技术股份有限公司 一种节点支持多数据分片的分布式集群的扩容和缩容方法

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844399A (zh) * 2015-12-07 2017-06-13 中兴通讯股份有限公司 分布式数据库系统及其自适应方法
CN106844399B (zh) * 2015-12-07 2022-08-09 中兴通讯股份有限公司 分布式数据库系统及其自适应方法
CN107579865A (zh) * 2017-10-18 2018-01-12 北京奇虎科技有限公司 分布式代码服务器的权限管理方法、装置及系统
CN110175069A (zh) * 2019-05-20 2019-08-27 广州南洋理工职业学院 基于广播信道的分布式事务处理系统及方法
CN110175069B (zh) * 2019-05-20 2023-11-14 广州南洋理工职业学院 基于广播信道的分布式事务处理系统及方法
CN112214466A (zh) * 2019-07-12 2021-01-12 海能达通信股份有限公司 分布式集群系统及数据写入方法、电子设备、存储装置
CN111835848A (zh) * 2020-07-10 2020-10-27 北京字节跳动网络技术有限公司 数据分片方法、装置、电子设备及计算机可读介质
CN111835848B (zh) * 2020-07-10 2022-08-23 北京字节跳动网络技术有限公司 数据分片方法、装置、电子设备及计算机可读介质
CN113312005A (zh) * 2021-06-22 2021-08-27 青岛理工大学 基于区块链的物联网数据扩容存储方法、系统及计算设备
CN117667944A (zh) * 2023-12-12 2024-03-08 支付宝(杭州)信息技术有限公司 用于分布式图数据库的副本扩容方法、装置及系统

Also Published As

Publication number Publication date
CN106844399B (zh) 2022-08-09
CN106844399A (zh) 2017-06-13

Similar Documents

Publication Publication Date Title
WO2017097059A1 (zh) 分布式数据库系统及其自适应方法
US10901796B2 (en) Hash-based partitioning system
US11513708B2 (en) Optimized deduplication based on backup frequency in a distributed data storage system
CN108810041B (zh) 一种分布式缓存系统的数据写入及扩容方法、装置
US10534776B2 (en) Proximity grids for an in-memory data grid
US9395933B2 (en) Distributed storage system, distributed storage method, and program and storage node for distributed storage
CN108418900B (zh) 一种服务器集群系统中的缓存方法、写入点客户端和读客户端
US10296594B1 (en) Cloud-aware snapshot difference determination
JP5952960B2 (ja) 計算機システム、計算機システム管理方法及びプログラム
US20140351636A1 (en) Method, device, and system for data reconstruction
US9031906B2 (en) Method of managing data in asymmetric cluster file system
US20140324905A1 (en) Computer system, data management method, and program
WO2012051845A1 (zh) 一种数据迁移的方法及系统
US20120246206A1 (en) File server system and storage control method
US11023433B1 (en) Systems and methods for bi-directional replication of cloud tiered data across incompatible clusters
US20190310922A1 (en) Multi-replica data restoration method and apparatus
CN113010496A (zh) 一种数据迁移方法、装置、设备和存储介质
US11231862B1 (en) Localized lookups for efficient database service request processing
KR20190139095A (ko) 분산 캐시 환경에서 니어 캐시를 제어하는 방법 및 이를 이용한 분산 캐시 서버
JP7398567B2 (ja) 動的適応型パーティション分割
US11194501B2 (en) Standby copies withstand cascading fails
US11216204B2 (en) Degraded redundant metadata, DRuM, technique
US10324750B2 (en) Computer system, computer system management method and program
CN114063884A (zh) 扩展存储系统的分区方法、设备和计算机程序产品
Gulyani et al. Reducing Fragment Oscillation of Dynamic Fragment Allocation in Non-Replicated Distributed Database System

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16872251

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16872251

Country of ref document: EP

Kind code of ref document: A1