CN107357896A - Expansion method, device, system and the data base cluster system of data-base cluster - Google Patents

Expansion method, device, system and the data base cluster system of data-base cluster Download PDF

Info

Publication number
CN107357896A
CN107357896A CN201710569900.1A CN201710569900A CN107357896A CN 107357896 A CN107357896 A CN 107357896A CN 201710569900 A CN201710569900 A CN 201710569900A CN 107357896 A CN107357896 A CN 107357896A
Authority
CN
China
Prior art keywords
data
database node
base cluster
node
online database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710569900.1A
Other languages
Chinese (zh)
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 Xiaodu Information Technology Co Ltd
Original Assignee
Beijing Xiaodu Information 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 Xiaodu Information Technology Co Ltd filed Critical Beijing Xiaodu Information Technology Co Ltd
Priority to CN201710569900.1A priority Critical patent/CN107357896A/en
Publication of CN107357896A publication Critical patent/CN107357896A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06F16/214Database migration support
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models

Abstract

The embodiment of the present disclosure discloses a kind of expansion method of data-base cluster, device, system and data base cluster system.Wherein, the data-base cluster includes multiple online database nodes and extending database node, and the data-base cluster provides data bank service, and the database request received is distributed to the multiple online database node;Methods described includes:It is less than the triggering information of predetermined threshold value in response to the remaining memory capacity of the data-base cluster, determines the migrating data at least one online database node in the data-base cluster;The migrating data is synchronized on the extending database node;The migrating data at least one online database node is deleted.Embodiment of the disclosure can migrate the partial data on online database node to extending database node in the case where not cutting off database group service, realizes the thermomigration process of data, improves Consumer's Experience.

Description

Expansion method, device, system and the data base cluster system of data-base cluster
Technical field
This disclosure relates to field of computer technology, more particularly to a kind of expansion method of data-base cluster, device, system and Data base cluster system.
Background technology
Data-base cluster is exactly to utilize at least two or multiple database nodes, forms a virtual centralized database and patrols Image is collected, as single database system, transparent data, services are provided to client.In client, a database Cluster is like a service entities, but in fact data-base cluster is made up of one group of service entities.With the use of application system Family is measured and the increase of visit capacity, and data-base cluster needs to be extended up or out, extended up including to single data Storehouse node addition hardware device is upgraded to a large database node;Refer to add more same type numbers to external expansion According to storehouse node and by data and workload equiblibrium mass distribution among these database nodes.
The content of the invention
The embodiment of the present disclosure provide a kind of expansion method of data-base cluster, device, system, data base cluster system and Computer-readable recording medium.
In a first aspect, a kind of expansion method of data-base cluster, the data-base cluster are provided in the embodiment of the present disclosure Including multiple online database nodes and extending database node, the data-base cluster provides data bank service, and will receive To database request distribute to the multiple online database node;Methods described includes:
It is less than the triggering information of predetermined threshold value in response to the remaining memory capacity of the data-base cluster, determines the data Migrating data in the cluster of storehouse at least one online database node;The data-base cluster includes multiple online database sections Point and extending database node, the data-base cluster provide data bank service, and by the database request received distribute to The multiple online database node;
The migrating data is synchronized on the extending database node;
The migrating data at least one online database node is deleted.
With reference in a first aspect, the migrating data is synchronized to by the disclosure in the first implementation of first aspect On the extending database node, including:
Lock at least one online database node;
Demarcate the current log of the database log file of at least one online database node;
Unlock at least one online database node;
The migrating data is migrated into the extending database node;
At least one online database node is locked again;
Daily record data updates the expansion according to caused by after the current log demarcated in the database log file Open up the migrating data on database node;
Unlock at least one online database node.
With reference to the first of first aspect or first aspect implementation, the disclosure is in second of realization side of first aspect In formula, after the migrating data at least one online database node is deleted, in addition to:
The request of data allocation strategy in the data-base cluster is changed, so that the request to the migrating data is allocated To the extending database node.
With reference to the first implementation of first aspect, first aspect or second of implementation of first aspect, this public affairs It is opened in the third implementation of first aspect, determines in the data-base cluster at least one online database node Migrating data, including:
The data of the earliest predefined size of storage time are defined as the migrating data.
Second of implementation or first of the first implementation, first aspect with reference to first aspect, first aspect The third implementation of aspect, the disclosure is in the 4th kind of implementation of first aspect, the multiple online database section Point has identical attribute, and the attribute of the extending database node is different from the attribute of the multiple online database node.
Second of implementation, first party of the first implementation, first aspect with reference to first aspect, first aspect The third implementation in face or the 4th of first aspect the kind of implementation, five kind implementation of the disclosure in first aspect In, the memory capacity of the extending database node is more than the memory capacity of any of the multiple online database node; Storage performance of the storage performance of the extending database node less than any of the multiple online database node.
Second aspect, the embodiment of the present disclosure provide a kind of flash chamber of data-base cluster, and described device includes:
Determining module, the memory capacity for being configured to respond to the data-base cluster are less than the triggering letter of predetermined threshold value Breath, determines the migrating data at least one online database node in the data-base cluster;The data-base cluster includes Multiple online database nodes and extending database node, the data-base cluster provide data bank service, and will receive Database request is distributed to the multiple online database node;
Synchronization module, it is configured as the migrating data being synchronized in the extending database node;
Removing module, it is configured as deleting the migrating data at least one online database node.
With reference to second aspect, in the first implementation of second aspect, the synchronization module includes the disclosure:
First locking submodule, is configured as locking at least one online database node;
Demarcate submodule, be configured as demarcating at least one online database node database log file work as Preceding daily record;
First unblock submodule, is configured as unlocking at least one online database node;
Sub-module stored, it is configured as migrating the migrating data into the extending database node;
Second locking submodule, is configured as locking at least one online database node again;
Submodule is updated, is configured as according to caused by after the current log demarcated in the database log file Daily record data updates the migrating data on the extending database node;
Second unblock submodule, is configured as unlocking at least one online database node.
With reference to second aspect or the first implementation in the second face, second implementation of the disclosure in second aspect In, also include after the removing module:
Submodule is changed, is configured as changing the request of data allocation strategy in the data-base cluster, so as to described The request of migrating data is allocated to the extending database node.
With reference to the first implementation of second aspect, second aspect or second of implementation of second aspect, this public affairs It is opened in the third implementation of second aspect, the determining module includes:
Determination sub-module, it is configured as the data of the earliest predefined size of storage time being defined as the transport number According to.
Second of implementation or second of the first implementation, second aspect with reference to second aspect, second aspect The third implementation of aspect, the disclosure is in the 4th kind of implementation of second aspect, the multiple online database section Point has identical attribute, and the attribute of the extending database node is different from the attribute of the multiple online database node.
Second of implementation, second party of the first implementation, second aspect with reference to second aspect, second aspect The third implementation in face or the 4th of second aspect the kind of implementation, five kind implementation of the disclosure in second aspect In, the memory capacity of the extending database node is more than the memory capacity of any of the multiple online database node; The storage performance of the extending database node is less than any of the multiple online database node storage performance.
The function can be realized by hardware, and corresponding software can also be performed by hardware and is realized.The hardware or Software includes one or more modules corresponding with above-mentioned function phase.
In a possible design, the structure of the flash chamber of data-base cluster includes memory and processor, institute State memory be used for store one or more support data base set in the above-mentioned first aspect of flash chamber execution of data-base cluster The computer instruction of the expansion method of group, the processor, which is configurable for performing the computer stored in the memory, to be referred to Order.The flash chamber of the data-base cluster can also include communication interface, for the flash chamber of data-base cluster and other Equipment or communication.
The third aspect, the embodiment of the present disclosure provide a kind of data base cluster system, including:
Multiple online database nodes, the data-base cluster distribute data storage request to the multiple online data Storehouse node;
Extending database node;
Controller, the controller includes memory and processor, wherein the memory storage has computer program, institute State the step of program is executed by processor to realize first aspect methods described.
Fourth aspect, the embodiment of the present disclosure provide a kind of capacity-enlarging system of data-base cluster, including memory and processing Device;Wherein,
The memory is used to store one or more computer instruction, wherein, one or more computer instruction The step of by the computing device to realize first aspect methods described.
5th aspect, the embodiment of the present disclosure provide a kind of computer-readable recording medium, are stored thereon with computer journey Sequence, the computer program is processed the step of realizing first aspect methods described when performing.
The technical scheme that the embodiment of the present disclosure provides can include the following benefits:
In embodiment of the disclosure when the memory capacity of data-base cluster reaches predetermined threshold, by multiple online databases Partial data on node is migrated to extending database node, and is responded by extending database node to the migrating data Request, and respond other requests by multiple online database nodes.By embodiment of the disclosure, database can not cut off In the case of group service, the partial data on online database node is migrated to extending database node, realizes data Thermomigration process, improve Consumer's Experience;The memory space of online database node is discharged simultaneously, is continued by online database Node provides the user operational data storage, and migrating data requested service is provided the user by extending database node, without increasing Add high performance hardware device, save cost.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
With reference to accompanying drawing, by the detailed description of following non-limiting embodiment, the further feature of the disclosure, purpose and excellent Point will be apparent.In the accompanying drawings:
Fig. 1 shows the exemplary system architecture figure that can apply the embodiment of the present disclosure.
Fig. 2 shows the flow chart of the expansion method of the data-base cluster according to the embodiment of the disclosure one.
Fig. 3 shows the flow chart of the step 202 according to Fig. 2 illustrated embodiments.
Fig. 4 shows the structured flowchart of the flash chamber of the data-base cluster according to the embodiment of the disclosure one.
Fig. 5 shows the structured flowchart of the synchronization module 402 according to Fig. 4 illustrated embodiments.
Fig. 6 is adapted for the department of computer science of the expansion method for realizing the data-base cluster according to the embodiment of the disclosure one The structural representation of system.
Embodiment
Hereinafter, the illustrative embodiments of the disclosure will be described in detail with reference to the attached drawings, so that those skilled in the art can Easily realize them.In addition, for the sake of clarity, the portion unrelated with description illustrative embodiments is eliminated in the accompanying drawings Point.
In the disclosure, it should be appreciated that the term of " comprising " or " having " etc. is intended to refer to disclosed in this specification Feature, numeral, step, behavior, part, part or presence of its combination, and be not intended to exclude other one or more features, Numeral, step, behavior, part, part or its combination there is a possibility that or be added.
It also should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the disclosure It can be mutually combined.Describe the disclosure in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Database node:Refer to a certain relevant database on backstage, that is to say, that after a database node refers to One single database of platform.
Data-base cluster:Refer to and connected physically scattered multiple data storage cells using information autobahn Unified database, data-base cluster may include multiple database nodes to composition one in logic.
In prior art, when carrying out dilatation by way of adding hardware to each database node of data-base cluster, The problem of bringing is the waste of hardware, disposable investment increase;Single node architecture may eventually reach a bottleneck and have no Method realizes further effectively extension;It is embodied in the surprising expensive hardware equipment of diminishing return rate or price; System cannot get sustainable extension, it is impossible to tackle the problem at its root.By adding new database section to data-base cluster , it is necessary to cut off the storage service of all database nodes during the mode dilatation of point, and in migrating data, spend the time compared with It is long, cause that for a long time storage service can not be provided the user, take time and effort, Consumer's Experience is poor;Meanwhile based on data-base cluster Requirement of real-time, the database node (including new database node) in data-base cluster needs higher with combination property Hardware device, and this means need higher cost.
In accordance with an embodiment of the present disclosure, it is less than in the memory capacity of the data-base cluster including multiple online database nodes During predetermined threshold, the dilatation operation of trigger data storehouse cluster.In the dilation process of data-base cluster, by newly adding spreading number According to storehouse node, and after the migrating data determined at least one online database node is synchronized on extending database node, Former migrating data on online database node is deleted, and changes the request that the migrating data is provided by extending database node Service.In embodiment of the disclosure when the memory capacity of data-base cluster reaches predetermined threshold, by multiple online database sections Partial data on point is migrated to extending database node, and the migrating data is asked by the response of extending database node Ask, and other requests are responded by multiple online database nodes.By embodiment of the disclosure, data base set can not cut off In the case of group business, the partial data on online database node is migrated to extending database node, realizes data Thermomigration process, improve Consumer's Experience;The memory space of online database node is discharged simultaneously, is continued by online database section Point provides the user operational data storage, and migrating data requested service is provided the user by extending database node, without increase High performance hardware device, saves cost.
Fig. 1 shows the exemplary system architecture 100 that can apply the embodiment of the present disclosure.
As shown in figure 1, system architecture 100 can include terminal device 101,102, network 103, data base cluster system 104.Network 103 is used for the medium that communication link is provided between terminal device 101,102, data base cluster system 200.Network 103 can include various connection types, such as wired, wireless communication link or fiber optic cables etc..
Terminal device 101,102, data base cluster system 104 can be interacted by network 103 between each other, with receive or Send message etc..Various telecommunication customer end applications, such as browser application, antivirus can be installed on terminal device 101,102 Class application, searching class application, social platform application, mailbox client, JICQ etc..
Terminal device 101,102 can support types of applications such as browser application, the application of antivirus class, searching class application etc. The various electronic equipments being mounted thereon, including but not limited to smart mobile phone, intelligent watch, tablet personal computer, personal digital assistant, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image Expert's compression standard audio aspect 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic shadow As expert's compression standard audio aspect 4) player, pocket computer on knee and desktop computer etc..
Data base cluster system 104 includes multiple online database nodes 1041, at least one expansible database node 1042, other servers that various services are provided can also be included, data base cluster system 104 provides the user database sector Business, user can be by terminal devices 101 or 102 to the data storage of data base cluster system 104, or from data-base cluster system The request of system 104 accesses data, and data base cluster system 104 is used to distribute the data storage request of user to multiple online datas Storehouse is connect on node.Other servers in data base cluster system 104 can also be to the offer branch such as types of applications of client The background server held, Cloud Server etc..
Other servers on data base cluster system 104 such as can be stored, be generated at the processing to the data received, And result is fed back into terminal device.
It should be noted that the expansion method for the data base cluster system that the embodiment of the present disclosure is provided can be by database Other servers in group system 104 perform, can also be by online database node 1041 and/or extending database node Computing device on 1042.The flash chamber for the data base cluster system that the embodiment of the present disclosure provides may be provided at data base set On other servers of group's system 104, online database node 1041 and/or extending database node 1042 can also be set On.
It should be understood that online database node and extension in terminal device, network and data base cluster system in Fig. 1 The number of database node is only schematical.According to realizing needs, can have any number of terminal device, network, Online database node and extending database node.
Fig. 2 is refer to, it illustrates the flow 200 of one embodiment of the expansion method of data-base cluster.The flow 200 Available in the electronic equipment with certain storage and computing capability.In order to make it easy to understand, in the present embodiment, with reference to the database The expansion method of cluster is applied particularly in the server for data-base cluster progress dilatation.Flow 200 comprises the following steps 201-203, wherein:
In step 201, it is less than the triggering information of predetermined threshold value in response to the remaining memory capacity of the data-base cluster, Determine the migrating data at least one online database node in the data-base cluster;Data-base cluster includes multiple online Database node and extending database node, it is described state data-base cluster provide data bank service, and by request of data distribute to The multiple online database node;
In step 202, the migrating data is synchronized on the extending database node;
In step 203, the migrating data at least one online database node is deleted.
In the present embodiment, in the case where the remaining memory capacity of data-base cluster is reduced to below predetermined threshold, triggering The dilatation operation of data-base cluster.In the dilation process of data-base cluster, first have at least one in determination data-base cluster Migrating data on online database node, and migrating data is synchronized to extending database node, delete afterwards at least one Migrating data on online database node, request of the user to migrating data is responded by extending database node, by it is multiple Line database node responds other data of user.This mode of the present embodiment, it is possible to achieve in line number in data-base cluster According to the thermophoresis of data on the node of storehouse, i.e., in the case of being responded without cut-out to the database request of user, to data-base cluster Effective dilatation is carried out.
In the present embodiment, data-base cluster includes multiple online database nodes and extending database node, for for use Family provides data bank service, and multiple online database nodes are the database entity for providing the user database manipulation in real time, and Extending database node is the database entity for the data manipulation for providing the user migrating data in real time.In client, number According to storehouse collection images of a group of characters centralized database, data-base cluster is receiving the database request of client (including data storage request, number According to renewal request, data access request, data removal request etc.) after, by database request according to equilibrium assignment mode or other The method of salary distribution is distributed to multiple online database nodes.It is each in line number in data-base cluster under the mode of equilibrium assignment It is basically identical according to the size of data stored on the node of storehouse;Of course, it should be understood that under other methods of salary distribution, it is each online The size of data difference stored on database node may be larger.
In one embodiment, the remaining memory capacity of data-base cluster whether be less than predetermined threshold value judgment mode can wrap Include two kinds:Total remaining memory capacity in one, data-base cluster (the remaining memory capacity of i.e. multiple online database nodes it With) whether it is less than predetermined threshold value;Secondly, in data-base cluster any one online database node remaining memory capacity whether Less than predetermined threshold value.Former mode is more suitable under the data balancing method of salary distribution, and the residue of each online database node is deposited The roughly the same situation of capacity is stored up, and the remaining memory capacity that latter approach is more suitable for each online database node is each not Identical situation.It specifically can select which kind of judgment mode used according to actual conditions, not be limited herein.
In one embodiment, migrating data can be the partial data on online database node or whole numbers According to.And the online database node (needing to carry out the online database node of Data Migration) for selecting to carry out dilatation can be institute There is online database node (such as to there are the feelings of identical memory capacity for equilibrium assignment data and each online database node Condition) or partial database line node, specifically memory capacity can be selected to use up online according to actual conditions Database node carries out Data Migration.Under normal circumstances, used to not influence user, i.e. data-base cluster continues as user and carried While for database service, when carrying out dilatation, a part of data on online database node can be selected to be migrated, and The partial data can be the longer data of storage time.For example, the number before N is stored on online database node so far According to will be used up in the remaining memory capacity that the online database node is judged by some modes after M months, now It may be selected, using the data before N-1 as migrating data, to can be combined with predefined size certainly to determine migrating data.Example Such as, the size for pre-defining the data for needing to migrate out on online database node when carrying out dilatation every time is X, then is migrating When, in chronological sequence the data of order Backwards selection X sizes since a data of oldest stored are as migrating data.
In one embodiment, Fig. 3 is refer to, it illustrates the implementing procedure of step 202 in disclosure above-described embodiment.Such as Shown in Fig. 3, step 202 comprises the steps 301-307.Wherein,
In step 301, at least one online database node is locked;
In step 302, the current log of the database log file of at least one online database node is demarcated;
In step 303, at least one online database node is unlocked;
In step 304, the migrating data is migrated into the extending database node;
In step 305, at least one online database node is locked again;
Within step 306, the daily record number according to caused by after the current log demarcated in the database log file According to the migrating data updated on the extending database node;
In step 307, at least one online database node is unlocked.
In the present embodiment, when the migrating data on online database node is synchronized into extending database node, if Migrating data is huger, it may be necessary to and the time of cost is longer, and during this period of time, if user is to online database section Migrating data on point updates, and can cause migrating data on extending database node and real data is inconsistent asks Topic.And migrating data and the online data that can ensure to be synchronized on extending database node by the above-mentioned steps of the present embodiment Migrating data on the node of storehouse is consistent.
Database log file can record the renewal operation occurred in database in real time, in the synchronous mistake of migrating data Cheng Zhong, if there is any data renewal operation to the migrating data, database log file can all be recorded.Therefore, if Migrating data can be obtained from the database journal data for starting to be synchronized to during completing synchronization, and according to the database journal number According to the migrating data on renewal extending database node, it becomes possible to keep the uniformity of migrating data.In the present embodiment, it will move Before shifting data are synchronized to extending database node from online database node, first lock in line database node and (suspend Respond the database request of user), and the current log of the database log file of online database node is demarcated (i.e. to data The current log position of storehouse journal file carries out mark, to indicate the log recording at first in database log file, To determine the migrating data of extending database node is updated since any bar log recording in continuous step after an action of the bowels), it Online database node is unlocked afterwards (time that the process of mark spent is carried out to database log file in Millisecond, therefore It is very short to the time of online database node locking, hardly have influence on the use of user);Demarcating database journal After current log in file, start the migrating data on online database node moving to extending database node, herein Migration refer to migrating data being copied to extending database node from online database node, the time that this process is spent regards Depending on migrating data size, possible a few minutes, even several hours, tens hours.But no matter time length, during this Online database node is constantly in online service state, therefore does not interfere with user's use.Migrating data all moves to expansion After opening up database node, in order to keep data consistency, it can migrated by the record renewal in database log file During caused user to migrating data renewal operation.During this, online database node can be locked again, is prevented User operates to the migrating data on online database node at no point in the update process, afterwards further according to database log file Migrating data caused by after middle demarcated current log record on daily record data renewal extending database node, has updated Into rear unblock online database node, migrating data is finally completed from online database node to the synchronization of extending database node Process.The time length of this renewal process depends primarily on number that the change to migrating data operates etc., lies substantially in the second Rank, therefore, on influenceing almost to can be ignored caused by user.
It should be noted that in certain embodiments, can be synchronous by the migrating data on an online database node To multiple extending database nodes, the migrating data on an online database node can also be synchronized to a growth data Storehouse node, the migrating data on multiple online database nodes can also be synchronized to multiple extending database nodes etc., specifically It can be set according to actual conditions, as long as data are consistent before and after ensureing migration, be not particularly limited herein.
In one embodiment, after the migrating data on online database node being synchronized into extending database node, also Migrating data on online database node is deleted, and changes the request service that migrating data is provided by extending database node, To reach the purpose of data cluster dilatation.That is, after completing to migrate, space is released on online database node, The purpose of data cluster dilatation is realized, while any request operation service of the subsequent user to migrating data is all by growth data Storehouse node provides.As above described in some embodiments, migrating data can select the longer historical data of some storage times or Person user's request data infrequently are not therefore high for the performance requirement of extending database node as migrating data, can be with The cost of data-base cluster dilatation is reduced to a certain extent.Quality-of-service based requirement, in data-base cluster in line number The higher hardware device of some performances would generally be used according to storehouse node, such as uses solid state hard disc, and the price of solid state hard disc is held high Expensive, especially Large Copacity solid state hard disc cost is higher used by the server of some Large Copacities, either by add it is new The still dilatation by way of increasing hard disk to online database node of line database node, it can all cause cost unprecedented soaring. And stored in the disclosure by using the extending database node (for example with the server of capacity mechanical hard disk) of low cost The data that some historical datas or user infrequently access, and use the online database node of high cost to provide the user number According to business such as library storages, the dilatation purpose of data-base cluster while Consumer's Experience is not reduced, can be reached.
In one embodiment, the default request of data allocation strategy of data-base cluster generally use, the user that will be received On request distribution to each online database node, database service is provided the user by each online database node afterwards. For example, data-base cluster uses equilibrium assignment strategy, then user generates an order by client application system, and this is ordered Singly after being submitted in data base cluster system, data base cluster system is that the order produces an ID number, afterwards by hashing letter Number be calculated hashed value corresponding to the ID number (obtained hashed value corresponds with online database node, for example, have 8 Line database node, then the result of hash function is that hashed value has 8 kinds, the corresponding online database node of every kind of hashed value), The online database node according to corresponding to hashed value is encouraged Order splitting caused by the user and carried out to the online database node Storage, the subsequently access to the order is also after obtaining hashed value by same mode, from online data corresponding to hashed value The order data is operated on the node of storehouse.Default request of data allocation strategy can be configured according to actual conditions, It is not limited herein.
In one embodiment, after the migrating data at least one online database node is deleted, in addition to: The request of data allocation strategy in the data-base cluster is changed, so that the request to the migrating data is allocated to the expansion Open up database node.According to original request of data allocation strategy, request of the user to migrating data can still be assigned to original On online database node, and, it is necessary to change original request of data after migrating data is synchronized to extending database node Allocation strategy, can be allocated to extending database node in request of the user to migrating data, rather than original is in line number According to storehouse node.For example, be performed as described above described in example, if request of data allocation strategy is equilibrium assignment used by data-base cluster Strategy, as being allocated by the way of hash, then when changing Request Distribution Policy, if user generates data access Request, be online database node A corresponding to the hashed value that the request ID of the data access is calculated by hash, and There is partial data to be migrated to extending database node B on line database node A, now also need to determine that request ID is corresponding Data whether be migrating data, if migrating data, then the request of the user is distributed to extending database node B, it is no Then distribute to online database node A.It is specific that how to judge to ask data corresponding to ID whether to be that migrating data can have a variety of Mode, such as can be judged by the ID scopes of migrating data, should if request ID is in the ID scopes of migrating data The data access request of user is directed to extending database node, is otherwise still directed to online database node A.Certainly for New data storage request, still distribute to online database node, extending database node according to Request Distribution Policy and only carry For the requested service of migrating data.
In one embodiment, the migrating data at least one online database node is determined, including:By storage time most The data of early predefined size are defined as the migrating data.In the present embodiment, predefined size refers to by pre-defined Mode determine go out the data volume size to be migrated gone out on online database node, the predefined size can be according to online The total memory capacity of database node, the data storage size received daily with memory capacity and data base cluster system It is determined that such as the total memory capacity that connects of online database it is smaller, with the storage number that memory capacity is larger and/or receives daily In the case of more, a larger predefined size can be set, it is larger to be migrated out from online database node The data of amount, discharge memory space more on online database node.It can specifically be set according to actual conditions, do not limited herein System.Storage time refers to be stored in earliest a part of data on online database node at first, can be with online database node The earliest a data of upper storage starts, and the data of predefined size is selected backward according to time order and function, as migration Data.By this mode of this implementation, mainly the longer historical data of storage time is migrated to extending database node On, because user infrequently accesses this kind of data, therefore the requirement of real-time to it etc. is relatively low, is migrated to performance Larger puzzlement will not be substantially caused on relatively low extending database node to user.
In one embodiment, the multiple online database node has identical attribute, the extending database node Attribute be different from the multiple online database node attribute.The attribute of online database node includes but is not limited to hardware The type of equipment, performance, memory capacity size etc., the performance of online database node including but not limited to memory size, CPU again Running speed etc..The expansion method for the data-base cluster that disclosure above-described embodiment proposes can preferably be applied to identical Multiple online database nodes of attribute, and use in the data base cluster system of equilibrium assignment principle, the data-base cluster system Multiple online database nodes in system can use the hardware device of high cost, there is provided the database service of high quality;It is and new The extending database node of addition can use the hardware device with multiple online database node different attributes, can be capacity Bigger but lower performance equipment, as online database node can use Fixed disk, and extending database node can use Mechanical hard disk, by this setup can the dilatation of data-base cluster its advantage is highlighted from cost.
The embodiment of the present disclosure also proposed a kind of flash chamber of data-base cluster.Fig. 4 is refer to, it illustrates an implementation The structured flowchart schematic diagram of the flash chamber of data-base cluster in example.The flash chamber of the data-base cluster includes determining module 401st, synchronization module 402 and removing module 403.Wherein,
The remaining memory capacity that determining module 401 is configured to respond to the data-base cluster is less than touching for predetermined threshold value Photos and sending messages, determine the migrating data at least one online database node in the data-base cluster;The data-base cluster Including multiple online database nodes and extending database node, the data-base cluster provides data bank service, and will receive To database request distribute to the multiple online database node;
Synchronization module 402 is configured as the migrating data being synchronized in the extending database node;
Removing module 403 is configured as deleting the migrating data at least one online database node
In the present embodiment, in the case where the remaining memory capacity of data-base cluster is reduced to below predetermined threshold, triggering The dilatation operation of data-base cluster.In the dilation process of data-base cluster, first have at least one in determination data-base cluster Migrating data on online database node, and migrating data is synchronized to extending database node, delete afterwards at least one Migrating data on online database node, request of the user to migrating data is responded by extending database node, by it is multiple Line database node responds other data of user.This mode of the present embodiment, it is possible to achieve in line number in data-base cluster According to the thermophoresis of data on the node of storehouse, i.e., in the case of being responded without cut-out to the database request of user, to data-base cluster Effective dilatation is carried out.
In the present embodiment, data-base cluster includes multiple online database nodes and extending database node, for for use Family provides data bank service, and multiple online database nodes are the database entity for providing the user database manipulation in real time, and Extending database node is the database entity for the data manipulation for providing the user migrating data in real time.In client, number According to storehouse collection images of a group of characters centralized database, data-base cluster is receiving the database request of client (including data storage request, number According to renewal request, data access request, data removal request etc.) after, by database request according to equilibrium assignment mode or other The method of salary distribution is distributed to multiple online database nodes.It is each in line number in data-base cluster under the mode of equilibrium assignment It is basically identical according to the size of data stored on the node of storehouse;Of course, it should be understood that under other methods of salary distribution, it is each online The size of data stored on database node has certain difference.
In one embodiment, the remaining memory capacity of data-base cluster whether be less than predetermined threshold value judgment mode can wrap Include two kinds:Total remaining memory capacity in one, data-base cluster (the remaining memory capacity of i.e. multiple online database nodes it With) whether it is less than predetermined threshold value;Secondly, in data-base cluster any one online database node remaining memory capacity whether Less than predetermined threshold value.Former mode is more suitable under the data balancing method of salary distribution, and the residue of each online database node is deposited The roughly the same situation of capacity is stored up, and the remaining memory capacity that latter approach is more suitable for each online database node is each not Identical situation.It specifically can select which kind of judgment mode used according to actual conditions, not be limited herein.
In one embodiment, migrating data can be the partial data on online database node or whole numbers According to.And the online database node (needing to carry out the online database node of Data Migration) for selecting to carry out dilatation can be institute There is online database node (such as to there are the feelings of identical memory capacity for equilibrium assignment data and each online database node Condition) or partial database line node, specifically memory capacity can be selected to use up online according to actual conditions Database node carries out Data Migration.Under normal circumstances, used to not influence user, i.e. data-base cluster continues as user and carried While for database service, when carrying out dilatation, a part of data on online database node can be selected to be migrated, and The partial data can be the longer data of storage time.For example, the number before N is stored on online database node so far According to will be used up in the remaining memory capacity that the online database node is judged by some modes after M months, now It may be selected, using the data before N-1 as migrating data, to can be combined with predefined size certainly to determine migrating data.Example Such as, the size for pre-defining the data for needing to migrate out on online database node when carrying out dilatation every time is X, then is migrating When, in chronological sequence the data of order Backwards selection X sizes since a data of oldest stored are as migrating data.
In one embodiment, Fig. 5 is refer to, it illustrates wherein one of synchronization module 402 in disclosure above-described embodiment Structured flowchart under kind embodiment.As shown in figure 5, synchronization module 402 includes the first locking submodule 501, demarcation submodule 502nd, the first unblock submodule 503, sub-module stored 504, second lock submodule 505, renewal submodule 506 and second unlocks Submodule 507.Wherein,
First locking submodule 501 is configured as locking at least one online database node;
Demarcation submodule 502 is configured as demarcating the database log file of at least one online database node Current log;
First unblock submodule 503 is configured as unlocking at least one online database node;
Sub-module stored 504 is configured as migrating the migrating data into the extending database node;
Second locking submodule 505 is configured as locking at least one online database node again;
Renewal submodule 506 is configured as producing according to after the current log demarcated in the database log file Daily record data update the migrating data on the extending database node;
Second unblock submodule 507 is configured as unlocking at least one online database node.In the present embodiment, , may if migrating data is huger when migrating data on online database node is synchronized into extending database node Need time for spending longer, and during this period of time, if user has done more to the migrating data on online database node Newly, the problem of migrating data and inconsistent real data on extending database node can be caused.And pass through the upper of the present embodiment The migrating data that stating step can ensure to be synchronized on extending database node is with the migrating data on online database node Consistent.
Database log file can record the renewal operation occurred in database in real time, in the synchronous mistake of migrating data Cheng Zhong, if there is any data renewal operation to the migrating data, database log file can all be recorded.Therefore, if Migrating data can be obtained from the database journal data for starting to be synchronized to during completing synchronization, and according to the database journal number According to the migrating data on renewal extending database node, it becomes possible to keep the uniformity of migrating data.In the present embodiment, it will move Before shifting data are synchronized to extending database node from online database node, first lock in line database node and (suspend Respond the database request of user), and the current log of the database log file of online database node is demarcated (i.e. to data The current log position of storehouse journal file carries out mark, to indicate the log recording at first in database log file, To determine the migrating data of extending database node is updated since any bar log recording in continuous step after an action of the bowels), it Online database node is unlocked afterwards (time that the process of mark spent is carried out to database log file in Millisecond, therefore It is very short to the time of online database node locking, hardly have influence on the use of user);Demarcating database journal After current log in file, start the migrating data on online database node moving to extending database node, herein Migration refer to migrating data being copied to extending database node from online database node, the time that this process is spent regards Depending on migrating data size, possible a few minutes, even several hours, tens hours.But no matter time length, during this Online database node is constantly in online service state, therefore does not interfere with user's use.Migrating data all moves to expansion After opening up database node, in order to keep data consistency, it can migrated by the record renewal in database log file During caused user to migrating data renewal operation.During this, online database node can be locked again, is prevented User operates to the migrating data on online database node at no point in the update process, afterwards further according to database log file Migrating data caused by after middle demarcated current log record on daily record data renewal extending database node, has updated Into rear unblock online database node, migrating data is finally completed from online database node to the synchronization of extending database node Process.The time length of this renewal process depends primarily on number that the change to migrating data operates etc., lies substantially in the second Rank, therefore, on influenceing almost to can be ignored caused by user.
It should be noted that in certain embodiments, can be synchronous by the migrating data on an online database node To multiple extending database nodes, the migrating data on an online database node can also be synchronized to a growth data Storehouse node, the migrating data on multiple online database nodes can also be synchronized to multiple extending database nodes etc., specifically It can be set according to actual conditions, as long as data are consistent before and after ensureing migration, be not particularly limited herein.
In one embodiment, the migrating data on online database node is synchronized to extending database by synchronization module 402 After node, removing module 403 also deletes the migrating data on online database node, and changes and carried by extending database node For the request service of migrating data, to reach the purpose of data cluster dilatation.That is, after completing to migrate, in line number According to space is released on the node of storehouse, the purpose of data cluster dilatation is realized, while subsequent user please to any of migrating data Operation service is asked all to be provided by extending database node.As above described in some embodiments, migrating data can select some to deposit The data of time longer historical data or user's request infrequently are stored up as migrating data, therefore for extending database section The performance requirement of point is not high, can reduce the cost of data-base cluster dilatation to a certain extent.Quality-of-service based requirement, Online database node in data-base cluster would generally use the higher hardware device of some performances, such as use solid state hard disc Deng, and solid state hard disc is expensive, Large Copacity solid state hard disc cost is higher especially used by the server of some Large Copacities, Either adding new online database node still to online database node by dilatation by way of increasing hard disk, all Cost can be caused unprecedented soaring.And by using the extending database node of low cost (for example with capacity mechanical in the disclosure The server of hard disk) come the data that store some historical datas or user infrequently accesses, and use high cost in line number The business such as database purchase are provided the user according to storehouse node, data-base cluster can be reached while Consumer's Experience is not reduced Dilatation purpose.
In one embodiment, the default request of data allocation strategy of data-base cluster generally use, the user that will be received On request distribution to each online database node, database service is provided the user by each online database node afterwards. For example, data-base cluster uses equilibrium assignment strategy, then user generates an order by client application system, and this is ordered Singly after being submitted in data base cluster system, data base cluster system is that the order produces an ID number, afterwards by hashing letter Number be calculated hashed value corresponding to the ID number (obtained hashed value corresponds with online database node, for example, have 8 Line database node, then the result of hash function is that hashed value has 8 kinds, the corresponding online database node of every kind of hashed value), The online database node according to corresponding to hashed value is encouraged Order splitting caused by the user and carried out to the online database node Storage, the subsequently access to the order is also after obtaining hashed value by same mode, from online data corresponding to hashed value The order data is operated on the node of storehouse.Default request of data allocation strategy can be configured according to actual conditions, It is not limited herein.
In one embodiment, after the removing module 403 of above-described embodiment, in addition to:Modified module, it is configured as changing Request of data allocation strategy in the data-base cluster, so that the request to the migrating data is allocated to the spreading number According to storehouse node.According to original request of data allocation strategy, request of the user to migrating data can still be assigned to former online On database node, and, it is necessary to change original request of data distribution after migrating data is synchronized to extending database node Strategy, can be allocated to extending database node in request of the user to migrating data, rather than former online database Node.For example, be performed as described above described in example, if request of data allocation strategy is equilibrium assignment plan used by data-base cluster Slightly, as being allocated by the way of hash, then when changing Request Distribution Policy, if user generates data access Request, it is online database node A that the request ID of the data access, which passes through corresponding to the hashed value that hash is calculated, and online There is partial data to be migrated to extending database node B on database node A, now also need to determine corresponding to request ID Whether data are migrating data, if migrating data, are then distributed the request of the user to extending database node B, otherwise Distribute to online database node A.It is specific how to judge to ask whether data corresponding to ID are that migrating data have a variety of sides Formula, such as can be judged by the ID scopes of migrating data, if request ID is in the ID scopes of migrating data, this is used The data access request at family is directed to extending database node, is otherwise still directed to online database node A.Certainly for new Data storage request, still distribute to online database node, extending database node according to Request Distribution Policy and only provide The requested service of migrating data.
In one embodiment, the determining module 401 in above-described embodiment includes:Determination sub-module, it is configured as storing The time data of predefined size earliest are defined as the migrating data.In the present embodiment, predefined size refers to by pre- What the mode first defined determined goes out the data volume size to be migrated gone out on online database node, and the predefined size can root The storage number received daily with memory capacity and data base cluster system according to the total memory capacity of online database node, Determined according to size, for example, the total memory capacity that online database connects it is smaller, with memory capacity is larger and/or receives daily In the case that data storage is more, a larger predefined size can be set, to be migrated out from online database node Larger amount of data are gone, discharge memory space more on online database node.It can specifically be set according to actual conditions, herein It is not limited.Storage time refers to be stored in earliest a part of data on online database node at first, can be with online data The earliest a data stored on the node of storehouse starts, and selectes the data of predefined size backward according to time order and function, is made For migrating data.By this mode of this implementation, mainly the longer historical data of storage time is migrated to growth data On the node of storehouse, because user infrequently accesses this kind of data, therefore the requirement of real-time to it etc. is relatively low, is migrated Larger puzzlement will not be substantially caused to user on the extending database node relatively low to performance.
In one embodiment, the multiple online database node has identical attribute, the extending database node Attribute be different from the multiple online database node attribute.The attribute of online database node includes but is not limited to hardware The type of equipment, performance, memory capacity size etc., the performance of online database node including but not limited to memory size, CPU again Running speed etc..The expansion method for the data-base cluster that disclosure above-described embodiment proposes can preferably be applied to identical Multiple online database nodes of attribute, and use in the data base cluster system of equilibrium assignment principle, the data-base cluster system Multiple online database nodes in system can use the hardware device of high cost, there is provided the database service of high quality;It is and new The extending database node of addition can use the hardware device with multiple online database node different attributes, can be capacity Bigger but lower performance equipment, as online database node can use Fixed disk, and extending database node can use Mechanical hard disk, by this setup can the dilatation of data-base cluster its advantage is highlighted from cost.
It will be understood by those skilled in the art that the flash chamber 400 of above-mentioned data-base cluster is also including some other known Structure, such as processor, memory etc., in order to unnecessarily obscure embodiment of the disclosure, these known structures are in Fig. 4 It is not shown.
In addition, the disclosure, which discloses, additionally provides a kind of data base cluster system 104, as shown in Figure 1 multiple can be included Online database node 1041 and extending database node 1042, the data-base cluster 104 by data storage request distribute to The multiple online database node;The data base cluster system 100 also includes processing unit, in response to the data The remaining memory capacity of storehouse cluster is less than the triggering information of predetermined threshold value, determines at least one in line number in the data-base cluster According to the migrating data on the node of storehouse;The migrating data is synchronized in the extending database node;Will be described at least one The migrating data on online database node is deleted.Database migration system, can include data offer end and data connect Receiving end.Processing unit is used for the expansion method for realizing the data-base cluster described in above-described embodiment, and detail can be found in The expansion method for the data-base cluster stated, will not be repeated here.
Below with reference to Fig. 6, it illustrates suitable for for realizing the computer system 600 of the processing unit of the embodiment of the present disclosure Structural representation.
As shown in fig. 6, computer system 600 includes CPU (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into program in random access storage device (RAM) 603 from storage part 608 and Perform various appropriate actions and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.
CPU601, ROM602 and RAM603 are connected with each other by bus 604.Input/output (I/O) interface 605 also connects It is connected to bus 604.
I/O interfaces 605 are connected to lower component:Importation 606 including keyboard, mouse etc.;Penetrated including such as negative electrode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 608 including hard disk etc.; And the communications portion 609 of the NIC including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net performs communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc., it is arranged on as needed on driver 610, in order to read from it Computer program be mounted into as needed storage part 608.
Especially, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being tangibly embodied in machine readable Computer program on medium, the computer program include the program code for being used for the method shown in execution flow chart.At this In the embodiment of sample, the computer program can be downloaded and installed by communications portion 609 from network, and/or from removable Medium 611 is unloaded to be mounted.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system, method and computer of the various embodiments of the disclosure Architectural framework in the cards, function and the operation of program product.At this point, each square frame in course diagram or block diagram can be with A part for a module, program segment or code is represented, a part for the module, program segment or code includes one or more For realizing the executable instruction of defined logic function.It should also be noted that some as replace realization in, institute in square frame The function of mark can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actual On can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also It is noted that the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart, Ke Yiyong Function as defined in execution or the special hardware based system of operation are realized, or can be referred to specialized hardware and computer The combination of order is realized.
Being described in unit or module involved in disclosure embodiment can be realized by way of software, also may be used Realized in a manner of by hardware.Described unit or module can also be set within a processor, these units or module Title do not form restriction to the unit or module in itself under certain conditions.
As on the other hand, the disclosure additionally provides a kind of computer-readable recording medium, the computer-readable storage medium Matter can be the computer-readable recording medium included in device described in above-mentioned embodiment;Can also be individualism, Without the computer-readable recording medium in supplying equipment.Computer-readable recording medium storage has one or more than one journey Sequence, described program is used for performing by one or more than one processor is described in disclosed method.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the disclosure, however it is not limited to the technology that the particular combination of above-mentioned technical characteristic forms Scheme, while should also cover in the case where not departing from the inventive concept, carried out by above-mentioned technical characteristic or its equivalent feature The other technical schemes for being combined and being formed.Such as features described above has similar work(with the (but not limited to) disclosed in the disclosure The technical scheme that the technical characteristic of energy is replaced mutually and formed.
The present disclosure discloses A1, a kind of expansion method of data-base cluster, methods described includes:In response to the database The remaining memory capacity of cluster is less than the triggering information of predetermined threshold value, determines at least one online data in the data-base cluster Migrating data on the node of storehouse;The data-base cluster includes multiple online database nodes and extending database node, described Data-base cluster provides data bank service, and database request is distributed to the multiple online database node;Moved described Data syn-chronization is moved to the extending database node;By the migrating data at least one online database node Delete.A2, the method according to A1, the migrating data is synchronized on the extending database node, including:Locking institute State at least one online database node;Demarcate the current of the database log file of at least one online database node Daily record;Unlock at least one online database node;The migrating data is migrated into the extending database node; At least one online database node is locked again;According to the current log demarcated in the database log file it Caused daily record data updates the migrating data on the extending database node afterwards;Unlock described at least one in line number According to storehouse node.A3, the method according to A1, the migrating data at least one online database node is deleted Afterwards, in addition to:The request of data allocation strategy in the data-base cluster is changed, so that the request quilt to the migrating data Distribute to the extending database node.A4, the method according to A1, determine at least one online in the data-base cluster Migrating data on database node, including:The data of the earliest predefined size of storage time are defined as the transport number According to.A5, the method according to A1, the multiple online database node have identical attribute, the extending database section The attribute of point is different from the attribute of the multiple online database node.A6, the method according to A1, the extending database The memory capacity of node is more than the memory capacity of any of the multiple online database node;The extending database node Storage performance less than any of the multiple online database node storage performance.
The disclosure also discloses B7, a kind of flash chamber of data-base cluster, and described device includes:Determining module, by with The memory capacity being set in response to the data-base cluster is less than the triggering information of predetermined threshold value, determines in the data-base cluster Migrating data at least one online database node;The data-base cluster includes multiple online database nodes and extension Database node, the data-base cluster provides data bank service, and the database request received is distributed to the multiple Online database node;Synchronization module, it is configured as the migrating data being synchronized in the extending database node;Delete Module, it is configured as deleting the migrating data at least one online database node.B8, according to B7 Device, the synchronization module include:First locking submodule, is configured as locking at least one online database node; Submodule is demarcated, is configured as demarcating the current log of the database log file of at least one online database node; First unblock submodule, is configured as unlocking at least one online database node;Sub-module stored, it is configured as institute Migrating data is stated to migrate into the extending database node;Second locking submodule, be configured as locking again it is described at least One online database node;Submodule is updated, is configured as working as the day before yesterday according to what is demarcated in the database log file Daily record data updates the migrating data on the extending database node caused by after will;Second unblock submodule, quilt It is configured to unlock at least one online database node.B9, the device according to B7, the removing module also wrap afterwards Include:Submodule is changed, is configured as changing the request of data allocation strategy in the data-base cluster, so as to the transport number According to request be allocated to the extending database node.B10, the device according to B7, the determining module include:It is determined that Submodule, it is configured as the data of the earliest predefined size of storage time being defined as the migrating data.B11, according to B7 Described device, the multiple online database node have identical attribute information, the attribute of the extending database node Different from the attribute information of the multiple online database node.B12, the device according to B7, the extending database section The memory capacity of point is more than the memory capacity of any of the multiple online database node;The extending database node Storage performance is less than any of the multiple online database node storage performance.
The disclosure also discloses C13, a kind of data base cluster system, including:Multiple online database nodes, the data Storehouse cluster distributes data storage request to the multiple online database node;Extending database node;Controller, the control Device processed includes memory and processor, wherein the memory storage has a computer program, described program be executed by processor with The step of realizing any one of A1-A6 methods describeds.
The disclosure also discloses D14, a kind of capacity-enlarging system of data-base cluster, including memory and processor;Wherein, institute State memory be used for store one or more computer instruction, wherein, one or more computer instruction is by the processing The step of device is performed to realize any one of A1-A6 methods describeds.
The disclosure also discloses E15, a kind of computer-readable recording medium, is stored thereon with computer program, the calculating Machine program is processed the step of realizing any one of A1-A6 methods describeds when performing.

Claims (10)

1. a kind of expansion method of data-base cluster, it is characterised in that methods described includes:
It is less than the triggering information of predetermined threshold value in response to the remaining memory capacity of the data-base cluster, determines the data base set Migrating data in group at least one online database node;The data-base cluster include multiple online database nodes and Extending database node, the data-base cluster provides data bank service, and database request is distributed to the multiple online Database node;
The migrating data is synchronized on the extending database node;
The migrating data at least one online database node is deleted.
2. according to the method for claim 1, it is characterised in that the migrating data is synchronized to the extending database section Point on, including:
Lock at least one online database node;
Demarcate the current log of the database log file of at least one online database node;
Unlock at least one online database node;
The migrating data is migrated into the extending database node;
At least one online database node is locked again;
Daily record data updates the spreading number according to caused by after the current log demarcated in the database log file According to the migrating data on the node of storehouse;
Unlock at least one online database node.
3. according to the method for claim 1, it is characterised in that described at least one online database node After migrating data is deleted, in addition to:
The request of data allocation strategy in the data-base cluster is changed, so that the request to the migrating data is allocated to institute State extending database node.
4. according to the method for claim 1, it is characterised in that determine at least one online data in the data-base cluster Migrating data on the node of storehouse, including:
The data of the earliest predefined size of storage time are defined as the migrating data.
5. according to the method for claim 1, it is characterised in that the multiple online database node has identical category Property, the attribute of the extending database node is different from the attribute of the multiple online database node.
6. according to the method for claim 1, it is characterised in that the memory capacity of the extending database node is more than described The memory capacity of any of multiple online database nodes;The storage performance of the extending database node is less than the multiple The storage performance of any of online database node.
7. a kind of flash chamber of data-base cluster, it is characterised in that described device includes:
Determining module, the memory capacity for being configured to respond to the data-base cluster are less than the triggering information of predetermined threshold value, really Migrating data in the fixed data-base cluster at least one online database node;
Synchronization module, it is configured as the migrating data being synchronized in the extending database node;
Removing module, it is configured as deleting the migrating data at least one online database node.
A kind of 8. data base cluster system, it is characterised in that including:
Multiple online database nodes, the data-base cluster distribute data storage request to the multiple online database section Point;
Extending database node;
Controller, the controller includes memory and processor, wherein the memory storage has computer program, the journey The step of sequence is executed by processor to realize any one of claim 1-6 methods described.
9. a kind of capacity-enlarging system of data-base cluster, it is characterised in that including memory and processor;Wherein,
The memory is used to store one or more computer instruction, wherein, one or more computer instruction is by institute The step of computing device is stated to realize any one of claim 1-6 methods described.
10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program quilt The step of processing realizes any one of claim 1-6 methods described when performing.
CN201710569900.1A 2017-07-13 2017-07-13 Expansion method, device, system and the data base cluster system of data-base cluster Pending CN107357896A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710569900.1A CN107357896A (en) 2017-07-13 2017-07-13 Expansion method, device, system and the data base cluster system of data-base cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710569900.1A CN107357896A (en) 2017-07-13 2017-07-13 Expansion method, device, system and the data base cluster system of data-base cluster

Publications (1)

Publication Number Publication Date
CN107357896A true CN107357896A (en) 2017-11-17

Family

ID=60292479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710569900.1A Pending CN107357896A (en) 2017-07-13 2017-07-13 Expansion method, device, system and the data base cluster system of data-base cluster

Country Status (1)

Country Link
CN (1) CN107357896A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943589A (en) * 2017-11-29 2018-04-20 苏宁云商集团股份有限公司 The management method and device of a kind of data buffer storage
CN108647270A (en) * 2018-04-28 2018-10-12 尚谷科技(天津)有限公司 A method of the Data Migration based on fault-tolerant time daily record
CN108804038A (en) * 2018-05-29 2018-11-13 新华三技术有限公司 Method, apparatus, server and the computer-readable medium of daily record data migration
CN108897808A (en) * 2018-06-16 2018-11-27 王梅 A kind of method and system carrying out data storage in cloud storage system
CN109067649A (en) * 2018-07-31 2018-12-21 平安科技(深圳)有限公司 node processing method and device, storage medium and electronic equipment
CN109614386A (en) * 2018-09-28 2019-04-12 阿里巴巴集团控股有限公司 Data processing method, device, server and computer readable storage medium
CN109783577A (en) * 2019-01-05 2019-05-21 咪付(广西)网络技术有限公司 A kind of cloud database elastic telescopic method based on strategy
CN109828960A (en) * 2018-12-14 2019-05-31 平安科技(深圳)有限公司 Log library expansion method, system, computer installation and readable storage medium storing program for executing
CN109947531A (en) * 2019-02-27 2019-06-28 广东唯一网络科技有限公司 The expanding storage depth method, apparatus and storage medium of super fusion all-in-one machine
CN110019148A (en) * 2018-09-07 2019-07-16 网联清算有限公司 Database volume management method, device, storage medium and computer equipment
CN110209652A (en) * 2019-05-20 2019-09-06 平安科技(深圳)有限公司 Tables of data moving method, device, computer equipment and storage medium
CN110502582A (en) * 2019-08-27 2019-11-26 江苏华库数据技术有限公司 A kind of on-line rapid estimation method of distributed data base
CN110674095A (en) * 2019-09-27 2020-01-10 浪潮电子信息产业股份有限公司 CTDB cluster expansion method, device, equipment and readable storage medium
CN110737717A (en) * 2018-07-03 2020-01-31 北京国双科技有限公司 database migration method and device
CN110851427A (en) * 2019-11-19 2020-02-28 泰康保险集团股份有限公司 Database capacity changing method and device
CN110858194A (en) * 2018-08-16 2020-03-03 北京京东尚科信息技术有限公司 Method and device for expanding database
CN110874384A (en) * 2018-09-03 2020-03-10 阿里巴巴集团控股有限公司 Database cluster capacity expansion method, device and system
CN111339055A (en) * 2020-02-07 2020-06-26 浪潮软件股份有限公司 Big data cluster capacity expansion method and device
CN111563069A (en) * 2020-05-06 2020-08-21 杭州安恒信息技术股份有限公司 Probe configuration method and system of industrial control equipment
CN111723148A (en) * 2020-04-10 2020-09-29 浙江大华技术股份有限公司 Data storage method and device, storage medium and electronic device
CN113553314A (en) * 2021-07-16 2021-10-26 北京天融信网络安全技术有限公司 Service processing method, device, equipment and medium of super-convergence system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291450A (en) * 2011-08-08 2011-12-21 浪潮电子信息产业股份有限公司 Data online hierarchical storage method in cluster storage system
CN105468473A (en) * 2014-07-16 2016-04-06 北京奇虎科技有限公司 Data migration method and data migration apparatus
CN106294471A (en) * 2015-06-03 2017-01-04 中兴通讯股份有限公司 Data Migration processing method and processing device
CN106843755A (en) * 2017-01-04 2017-06-13 北京百度网讯科技有限公司 For the data balancing method and device of server cluster
CN106844510A (en) * 2016-12-28 2017-06-13 北京五八信息技术有限公司 The data migration method and device of a kind of distributed experiment & measurement system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291450A (en) * 2011-08-08 2011-12-21 浪潮电子信息产业股份有限公司 Data online hierarchical storage method in cluster storage system
CN105468473A (en) * 2014-07-16 2016-04-06 北京奇虎科技有限公司 Data migration method and data migration apparatus
CN106294471A (en) * 2015-06-03 2017-01-04 中兴通讯股份有限公司 Data Migration processing method and processing device
CN106844510A (en) * 2016-12-28 2017-06-13 北京五八信息技术有限公司 The data migration method and device of a kind of distributed experiment & measurement system
CN106843755A (en) * 2017-01-04 2017-06-13 北京百度网讯科技有限公司 For the data balancing method and device of server cluster

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943589A (en) * 2017-11-29 2018-04-20 苏宁云商集团股份有限公司 The management method and device of a kind of data buffer storage
CN108647270A (en) * 2018-04-28 2018-10-12 尚谷科技(天津)有限公司 A method of the Data Migration based on fault-tolerant time daily record
CN108804038A (en) * 2018-05-29 2018-11-13 新华三技术有限公司 Method, apparatus, server and the computer-readable medium of daily record data migration
CN108897808A (en) * 2018-06-16 2018-11-27 王梅 A kind of method and system carrying out data storage in cloud storage system
CN108897808B (en) * 2018-06-16 2023-11-24 王梅 Method and system for storing data in cloud storage system
CN110737717A (en) * 2018-07-03 2020-01-31 北京国双科技有限公司 database migration method and device
CN109067649A (en) * 2018-07-31 2018-12-21 平安科技(深圳)有限公司 node processing method and device, storage medium and electronic equipment
CN109067649B (en) * 2018-07-31 2021-06-22 平安科技(深圳)有限公司 Node processing method and device, storage medium and electronic equipment
CN110858194A (en) * 2018-08-16 2020-03-03 北京京东尚科信息技术有限公司 Method and device for expanding database
CN110874384B (en) * 2018-09-03 2023-05-02 阿里巴巴集团控股有限公司 Method, device and system for expanding and shrinking capacity of database cluster
CN110874384A (en) * 2018-09-03 2020-03-10 阿里巴巴集团控股有限公司 Database cluster capacity expansion method, device and system
CN110019148A (en) * 2018-09-07 2019-07-16 网联清算有限公司 Database volume management method, device, storage medium and computer equipment
CN110019148B (en) * 2018-09-07 2021-05-25 网联清算有限公司 Database capacity management method and device, storage medium and computer equipment
CN109614386A (en) * 2018-09-28 2019-04-12 阿里巴巴集团控股有限公司 Data processing method, device, server and computer readable storage medium
CN109614386B (en) * 2018-09-28 2023-09-22 创新先进技术有限公司 Data processing method, device, server and computer readable storage medium
CN109828960A (en) * 2018-12-14 2019-05-31 平安科技(深圳)有限公司 Log library expansion method, system, computer installation and readable storage medium storing program for executing
CN109783577A (en) * 2019-01-05 2019-05-21 咪付(广西)网络技术有限公司 A kind of cloud database elastic telescopic method based on strategy
CN109783577B (en) * 2019-01-05 2021-10-08 咪付(广西)网络技术有限公司 Strategy-based cloud database elastic expansion method
CN109947531A (en) * 2019-02-27 2019-06-28 广东唯一网络科技有限公司 The expanding storage depth method, apparatus and storage medium of super fusion all-in-one machine
CN109947531B (en) * 2019-02-27 2021-05-07 广东唯一网络科技有限公司 Storage capacity expansion method and device of super-fusion all-in-one machine and storage medium
CN110209652B (en) * 2019-05-20 2024-02-02 平安科技(深圳)有限公司 Data table migration method, device, computer equipment and storage medium
CN110209652A (en) * 2019-05-20 2019-09-06 平安科技(深圳)有限公司 Tables of data moving method, device, computer equipment and storage medium
CN110502582A (en) * 2019-08-27 2019-11-26 江苏华库数据技术有限公司 A kind of on-line rapid estimation method of distributed data base
CN110502582B (en) * 2019-08-27 2022-06-10 江苏华库数据技术有限公司 Online capacity expansion method of distributed database
CN110674095A (en) * 2019-09-27 2020-01-10 浪潮电子信息产业股份有限公司 CTDB cluster expansion method, device, equipment and readable storage medium
CN110674095B (en) * 2019-09-27 2022-06-10 浪潮电子信息产业股份有限公司 CTDB cluster expansion method, device and equipment and readable storage medium
CN110851427A (en) * 2019-11-19 2020-02-28 泰康保险集团股份有限公司 Database capacity changing method and device
CN111339055A (en) * 2020-02-07 2020-06-26 浪潮软件股份有限公司 Big data cluster capacity expansion method and device
CN111339055B (en) * 2020-02-07 2023-08-01 浪潮软件股份有限公司 Big data cluster capacity expansion method and device
CN111723148A (en) * 2020-04-10 2020-09-29 浙江大华技术股份有限公司 Data storage method and device, storage medium and electronic device
CN111563069B (en) * 2020-05-06 2023-09-19 杭州安恒信息技术股份有限公司 Probe configuration method and system of industrial control equipment
CN111563069A (en) * 2020-05-06 2020-08-21 杭州安恒信息技术股份有限公司 Probe configuration method and system of industrial control equipment
CN113553314A (en) * 2021-07-16 2021-10-26 北京天融信网络安全技术有限公司 Service processing method, device, equipment and medium of super-convergence system

Similar Documents

Publication Publication Date Title
CN107357896A (en) Expansion method, device, system and the data base cluster system of data-base cluster
US11675811B2 (en) Storage constrained synchronization of shared content items
CN106156359B (en) A kind of data synchronization updating method under cloud computing platform
US9442997B2 (en) Idle state triggered constrained synchronization of shared content items
CN104881466B (en) The processing of data fragmentation and the delet method of garbage files and device
WO2021103403A1 (en) Blockchain transaction information management method and device, computer device and storage medium
US20160226970A1 (en) Storage Constrained Synchronization of Content Items Based on Predicted User Access to Shared Content Items Using Retention Scoring
CN112181309A (en) Online capacity expansion method for mass object storage
US20190121874A1 (en) Storage space manager
US10248705B2 (en) Storage constrained synchronization of shared content items
CN107426319B (en) Store controlled shared content item synchronous method, system and storage medium
US9292454B2 (en) Data caching policy in multiple tenant enterprise resource planning system
CN106933868A (en) A kind of method and data server for adjusting data fragmentation distribution
US20200145362A1 (en) Large data management in communication applications through multiple mailboxes
CN107633045A (en) The statistical method and its system of tenant data capacity in a kind of cloud storage service
US20200293546A1 (en) Storage Constrained Synchronization Engine
CN103049574A (en) Key value system and key value method for implementation of dynamic duplicates of documents
WO2018140840A1 (en) Management of cloud-based shared content using predictive cost modeling
CN110784498B (en) Personalized data disaster tolerance method and device
CN113095778A (en) Architecture for managing mass data in communication application through multiple mailboxes
CN110083417A (en) User interface response method and device
CN104813304B (en) Identify the shared content by service memory
CN107181773A (en) Data storage and data managing method, the equipment of distributed memory system
JP2004139200A (en) File management program and file management system
CN116991815B (en) Log collection method, device, equipment and medium of distributed storage 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171117