WO2012069091A1 - Real time database system - Google Patents
Real time database system Download PDFInfo
- Publication number
- WO2012069091A1 WO2012069091A1 PCT/EP2010/068312 EP2010068312W WO2012069091A1 WO 2012069091 A1 WO2012069091 A1 WO 2012069091A1 EP 2010068312 W EP2010068312 W EP 2010068312W WO 2012069091 A1 WO2012069091 A1 WO 2012069091A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- database
- replica
- master
- master database
- partition
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2094—Redundant storage or storage space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/278—Data partitioning, e.g. horizontal or vertical partitioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/1658—Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit
- G06F11/1662—Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit the resynchronized component or unit being a persistent storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
Definitions
- the present invention relates to a real time database system configured to store a database content with a plurality of data sets, the database content being partitioned in different partitions.
- the invention furthermore relates to a method for operating the real time database system.
- replica databases are essentially idle, attending only replication of data updates and waiting for a single failure -single and unknown- that will affect a single instance among them.
- Complementary approaches target specific niches and are complex to implement, none of them addressing the basic problem of the inefficiency, which is having dedicated master and replica databases devoted to the same and equal partitions (see Kossmann et al. mentioned above).
- Devoting redundant resources to secondary tasks does not help solving the problem, as the system has to be dimensioned for big traffic even in a faulty state. Even worse, extra capacity is needed for helping in recovery tasks in the partitions replicas, e.g. synchronisation and replica consistency assurance when a failed server is recovering with simultaneous incoming traffic.
- a real time database system configured to store a database content with a plurality of data sets.
- the database content is partitioned in different partitions and the system comprises a plurality of master databases, each master database containing a partition of the database content, each partition being provided on a different physical storage unit.
- the database system furthermore comprises at least one replica database, each replica database containing subpartitions of the partitions stored in the master databases.
- at least one distributor is provided configured to route a request for a data set to the master database where the data set to which the request refers to is provided and configured to divide each partition into several subpartitions.
- At least one replicator configured to generate a replica of each subpartition and configured to store each replica on a replica database, wherein the at least one replicator stores the replicas of each subpartition in such a way that the replicas of one partition are contained on different physical storage units, on a physical storage unit other than the corresponding partition and on another physical storage unit other than the replicator generating the replica of said one partition.
- the distributor is configured to route a replication request for a subpartition to the replicator responsible for said subpartition.
- the present database system allows distributing traffic and replication over a plurality of physical storage units, so as to share load changes among such storage units. In this way, a minimum extra capacity is needed in the storage units.
- the workload distribution is achieved inter alia by partitioning the database content into different partitions and by further partitioning the partitions into subpartitions.
- the presence of 2xN physical storage units/servers for N master databases and replica databases is not necessary, wherein only N+k, k ⁇ N storage units being needed.
- An effective cluster replication and resilience scenarios are obtained by implementing a distributed database having an N+k redundancy. As a result, just a minor delta capacity is required to support fault resilience.
- the at least one distributor may be configured to detect a failure of a master database, wherein, when the at least one distributor detects a failure of the master database, it routes requests for data sets contained on the failed master database to the replica databases where the replica of the failed master databases are provided, the replicas of the failed master database becoming the master databases for subpartitions of the failed master database during the failure of the master database.
- This further helps to share load changes due to failure or recovery. Additional capacity needed for fault resilience scenarios is just proportional to the number of simultaneous failures instead of being proportional to both the number of simultaneous failures and the total system capacity.
- failures have a reduced impact due to the distribution across available physical storage units in failure or recovery scenarios. Furthermore, recovery times are greatly improved.
- the invention furthermore relates to a method for operating a real time database system storing the database content with a plurality of data sets.
- the method comprises the steps of partitioning the database content into different partitions provided on different master databases, each partition being provided on a different physical storage unit.
- a request for a data set of the database content is distributed by at least one distributor to the master database where the data set to which the request refers to is provided.
- each partition is divided into several subpartitions by the at least one distributor and a replica of each subpartition is generated by at least one replicator, each replica being stored on a replica database, wherein the replicas of each subpartition are stored in such a way that the replicas of one partition are contained on different physical storage units, on another physical storage unit other than the corresponding partition and on another physical storage unit other than the replicator generating the replica of said one partition.
- a replication request for a subpartition is routed by the distributor to the replicator responsible for said subpartition.
- a failure of a master database may be detected, wherein, if said failure of the master database is detected, requests for data sets contained on the failed master database are distributed by the at least one distributor to the replicas of the failed master database, the replicas of the failed master database becoming the master database for subpartitions of the failed master database during the failure of the master database.
- Fig. 1 shows a first embodiment of a real time database system
- Fig. 2 shows another embodiment of the real time database system with specialized replica servers
- Fig. 3 shows a traffic distribution scenario in a normal operating mode and when a failure of a master database is detected
- Fig. 4 shows the traffic distribution during a master database recovery after a failure
- Fig. 5 shows a traffic distribution when a replicator fails and recovers after a failure
- Fig. 6 shows a hybrid database that is used as a replica database to store the replicas
- Fig. 7 shows a further embodiment of the real-time database system
- Fig. 8 shows still another embodiment of the real-time database system.
- Fig. 1 an embodiment is shown where the data content of a real time database system is distributed to five different physical storage units or servers, called server A to server E in the embodiment shown.
- the real time database shown in Fig. 1 can, by way of example contain a subscriber registry of a mobile communications network containing the subscriber related information of a subscriber to a mobile communications network.
- the database content is partitioned into five partitions P1 to P5, each partition P1 to P5 being provided in a corresponding master database 10 to 50.
- a data request for data contained on the database system is directed to a node 50 from where the request is distributed to one of the distributors 1 , 2, 3, 4 or 5, which are configured to route the request for a data set contained on the database system to the master database, where the data set/partition to which the request refers to, is provided.
- the node 50 may comprise a control unit (not shown) which distributes the request to the different distributors 1 to 5 in dependence on the load of the different distributors or in dependence on a predefined distribution scheme.
- replicator 1 comprises a replicator, i.e. the replicator 100, 200, 300, 400, 500 in the example shown.
- the replicator is responsible for the generation of replicas of the subpartitions which are stored on replica databases 1 10, 210, 310, 410 and 510, respectively.
- the replicator can take care of the replication flow using standard replication algorithms and operation logs, the replicator monitoring a replica nodes (replica databases) by means of hello protocols or being sensitive to distributed traffic operation results and keeps the distributor updated on the storage unit's health. In addition, it also optimizes operation logs and defines affected data instances as subject to store data on a disk memory area or working memory are in the replica databases 1 10 to 510, as will be described in further detail with reference to Fig. 6 further below.
- the distributors 1 to 5 distribute the input and replication traffic onto the master databases 10 to 50, their replicators 100 to 500 and the replica databases 1 10 to 510.
- the distributors have this role in normal and failure situations.
- the distributors implement data allocation policies and keep track of partition and servers status by means of hello protocols or being sensitive to distributed traffic operation results, then redistributing load upon server failure and recovery.
- Fig. 1 it is possible to distribute traffic, fail over replication and recovery and all other meaningful data processes across a plurality of database servers, here the servers A to E (physical storage units), so as to share the load changes due to failure recovery or other events among the different physical data storage units. In this way, just a minimum extra capacity is needed in the different servers for attending those events.
- the workload distribution is obtained inter alia by partitioning the database content into first partitions P1 to P5.
- the replicator on each server generates a replica of each partition by generating smaller mini partitions for each partition.
- the replicator generates mini partitions 1 1 , 12, 13, 14 to replicate the content of partition P1 , these mini partitions 1 1 to 14 being stored on server B, server E, server D and server C, respectively. Furthermore, the partition P2 is further partitioned into mini partitions 21 to 24, the partition P3, partitions 31 to 34 etc.
- Each mini partition can then be further divided into micro partitions which are shown in the embodiment of Fig. 1 for mini partitions 51 to 54.
- the micro partitions are especially used for a recovery process after a failure of one of the master databases 10 to 50.
- Fig. 1 The allocation of the different partitions and mini partitions to the different physical storage units is visible in Fig. 1 for an homogenous embodiment meaning that all physical storage units implement the same functions having a distributor in charge of distributing input requests, a master database and a replica database in charge of provided data accessing storage and a replicator in charge of logging updates and replicating them onto the corresponding replicas.
- the partitioning and distribution is obtained by allocating each partition to a separate physical storage unit. Each partition is then split in mini partitions and the replicas of the mini partitions of such a partition are allocated to still other physical storage units using the hybrid databases different to the database holding the original partition.
- each physical storage unit in the embodiment of Fig. 1 comprises a distributor, a replicator, a master database and a replica database.
- a distributor for distributing data
- a replicator for storing data
- master database for storing data
- replica database for storing data
- replica database for storing data.
- a data request for a data set contained in one of the partitions is balanced onto the available distributors 1 to 5 by node 50, the distribution to one of the physical storage units depending on predefined distribution streams or depending on the load of different distributors.
- the distributors 1 to 5 then route the individual query or update requests to the physical storage unit hosting the related partition.
- a data request is distributed by distributor 1 to partition 2 contained in server B of Fig. 1 .
- the distributor orders as well a replication. This order message is shown by the dashed line from distributor 1 to replicator 400 provided on server D in Fig. 1 that will replicate the update on the affected mini partition, e.g. mini partition 23 in server E of Fig. 1 where the affected replica is allocated.
- a server fails, here server E of Fig. 1 , all distributors, e.g. distributor 4 in the embodiment shown will route all requests to partition P5 to the replicas of P5, the mini partitions 51 to 54 distributed on all the other servers (smaller solid line). Thus, the failure load is shared among the other servers. If a replicator fails (not shown in the Fig.) its replication flow is also shared among the remaining replicators in the other nodes. When a server recovers, server E in the embodiment shown, all servers share the load necessary for such a server recovery. All the other servers simultaneously recover their allocated micro partitions in a sequential manner. The black micro partitions shown in Fig. 1 represent the partitions which are recovered at the same time.
- the replica database being a hybrid storage unit is shown in more detail in Fig. 6 and comprises a disk memory area symbolized by reference numeral 1 1 1 and a working memory are 1 12.
- the replica database may be a hybrid storage unit containing a working memory area and a disk memory area, the disk memory area containing the replicas, wherein the hybrid database is configured to move the replica of a master database for which a failure has been detected and which becomes the master database for the failed master database from the disk memory area 1 1 1 to the working memory area 1 12 of the hybrid storage unit. In the working memory area a faster access to the data sets is obtained.
- the working memory area may contain the data sets of the replicas that are used more often than a predefined threshold, or in other words contains the most often data sets of the replicas. This can mean the data sets that were most frequently updated in a defined time period in the past (e.g. one hour) or data sets with undeniable strict response time requirements even under recovery scenarios.
- the replica database can be configured to store replicas from a plurality of master databases.
- a role manager 1 13 may be provided receiving orders from the distributers.
- the manager orders the upload of the data sets of the failed master database contained in the corresponding replicas of the disk memory area to the working memory area where they can be accessed more easily as these data sets now play the role of the master database.
- Fig. 1 it can be seen from the lower part of Fig. 1 , the given table, that more than one replica of a partition may be generated.
- a mini partition index composed of the partition number followed by the mini partition number inside such a partition can be used. It can be seen as well that even for a 1 +1 replication a failure of server E is attended by servers A, B, C and D, respectively, by serving traffic requests or mini partitions 51 , 52, 53 and 54. A double failure on two servers can still be attended by the remaining servers if a triple replication (the master database plus replication 1 and replication 2) in the partitioning scheme used in Fig. 1 is implemented. The remaining servers may still hold the mini partitions corresponding to the failed server partitions.
- a set of replica databases take over the role of a single failed master database, thus reducing the extra computing capacity required on those replica databases.
- multiple replicas of the same mini partition can be implemented as shown in the lower part of Fig. 1 where multiple replicas of mini partitions are allocated to the same physical server making the overall system resilient against multiple simultaneous failures.
- Fig. 1 shows a homogeneous embodiment in which all roles in the system, such as master database, replica database, replicator and distributor are allocated to all nodes
- a heterogeneous embodiment is also possible in which the system rules are allocated to specialized servers, an example being shown in Fig. 2.
- specialized double replica databases are shown along with the partitioning scheme applicable in this case.
- N+K replication properties it is possible with the present invention to provide N+K replication properties, so that for N servers only a fraction of servers K is required for redundancy purposes.
- N servers instead of needing 18 servers for the six partitions and for the two replicas of each partition, only 12 physical storage units are needed in the embodiment of Fig. 2, six for the master databases, three for the first replicas and another three for the second replicas.
- Each of the N+K nodes of the database system can be implemented using heterogeneous servers/storage units , i.e. N active servers and K failover servers, or a homogeneous embodiment can be used where all servers are equal and share active and failover roles by distributing N+K nodes over physical servers.
- each physical storage unit comprises a distributor, a replicator and the master database, the system further comprising specialized physical storage units A-C and X-Z for the replica databases.
- These replica databases can be again hybrid databases as shown in Fig. 6.
- the replica database A can contain the mini partitions 1 1 , 21 , 31 , 41 , 51 and 61 .
- Mini partition 12 is provided on the physical storage unit B as a first replica and on the physical storage unit X for the second replica.
- the mini partitions can be further divided into micro partitions which were shown in Fig. 1 .
- Micro partitioning, a third level of partitioning, and service distribution applies over the mini partitions discussed above.
- the micro partition can be used in the recovery process and by the replicator in the following way:
- the micro partitions can be defined in the replica databases for recovery purposes, so that multiple replica databases can simultaneously feed a restarted master server, thus reducing the recovery time as shown in Fig. 1 where the micro partitions of mini partition 51 , 54, 52 and 53 can be fed to a restarting master database 50 containing partition P5 which restarts after a failure.
- the micro partitions can be used as well for the replicator for fail over purposes, so that the replication logs for a mini partition assigned to a failed replicator are distributed onto the remaining replicators, thus sharing the load among them.
- the mini partitions are the work allocation unit for the replicators.
- the replicator may also work on any set of micro partitions. This could be the case in Fig. 2 in case the replicator role is allocated to all physical storage units or just to the replica databases so that different groups of micro partitions can be used with the same result.
- Micro partitions might be as small as necessary to allow for smooth recovery, thus reducing extra capacity required by recovery processes. Furthermore, it is possible that the same architecture shown in Fig. 1 and 2 can be implemented where only micro partitions are considered and managed from a distribution point, so that traffic, failover, recovery and other processes are shared onto multiple physical storage units and replicas by using micro partitions as a distribution mechanism. In general terms this means that only one sub-partition category is generated, i.e. only micro partitions, whereas in the other partitioning schemes two partitioning levels, the sub partitions and smaller partitions of the sub partitions can be used. In this embodiment the sub partitions correspond to the mini partitions, the smaller partitions corresponding to the micro partitions.
- the at least one replica database can be configured to further partition the replica on a replica database to smaller partitions, wherein, when the master database restarts after a failure, the replica databases are configured to report the smaller partitions comprising the data sets of the restarted master database needed to recover the partition provided on the restarting master database, to the restarted master database.
- the distributors distribute input and replication traffic onto master, replicator and replica databases in normal and failure situations. It keeps track of partitions and server status of all three partitioning levels by means of hello protocols, or being sensitive to distributed traffic operation results. The distributor also redistributes the load upon server failure and recovery.
- the replicator takes care of the replication flow using replication algorithms and operation logs and monitors replica databases, e.g. by means of hello protocols or by being sensitive to distributed traffic operation results.
- the replicator keeps the distributor updated on the replica databases' health. Furthermore, it optimizes operation logs and defines affected data instances as subject to storage in the working memory area or disk memory area in the replica databases.
- the replica databases are databases that attend traffic upon master database failure. The replica databases receive the update of the corresponding master updates and become the master database temporarily for selected data partitions.
- the master database can be the database receiving traffic in the absence of failure.
- a data access request arrives at the distributor, e.g. distributor 1 .
- This distributor is selected by the node 50 either randomly or based on load sharing.
- the distributor selects the master and for updates the replicator, both based on the affected data instance, partitioning scheme and current server status. Read operations are answered by the master database, the rest of the scenario applies to updates.
- the distributor executes a synchronous, e.g. a 2PC or 3PC (two- or three-phase commit) on the master database and replicator, two or three phase commit corresponding to a protocol in which all participating nodes in the distributed system agree to commit a transaction.
- the same replicator instance is always selected for the same micro partition, and multiple replicators are available for different micro partitions in the same partition.
- the replicator is aware of the destination replica databases which can be more than one.
- step 3 of Fig. 3 the operation is synchronously operated and a response message is returned back, both the master database and the replicator maintain the operation log for the related data updates.
- step 4 of Fig. 3 the replicator optimizes the operation log, by way of example it may remove overlapping operations on a certain data set or may group several of them and the replicator may finally order the operation against corresponding replicas for affected objects.
- step 5 the master database is notified back about the operation success and the master database log is updated.
- a master database may fail.
- the traffic of the affected partition is distributed among the replica databases containing the mini partitions.
- These mini partitions may be provided either on the first replica level or on other replica levels.
- the master and the first replica database may fail.
- the traffic is directed over the second replica databases.
- Successive failure of the master and consecutive replica databases are managed in the same way.
- a replica database may fail or the replicator or distributor node may fail and recover.
- a data access request arrives at the system.
- the request can be a read request or an update.
- the distributor has to address a failed node/physical storage unit, either because the monitoring previously informed the distributor of the master database failure (step 6A) or after a failure in executing an update (step 6B).
- the failing database is marked as inactive as preparing a recovery process. Further accesses to the affected partition will happen by distributing the previous load onto the replica databases holding the mini partitions included in the failed master database.
- step 7 the distributor commands the first replica levels databases to become the master for the mini partition related to the failed master database.
- Those replica servers will require operations pending in the affected replicators logs to update the mini partitions to the latest updated status.
- the replica database will start promoting the replica stored in the disk memory area into the working memory area, this happening for all replica database in parallel. Prompt access to such replicas is allowed by in memory caching on those servers for frequency accessed data.
- the master role, the failure, traffic and recovery process can be shared among those multiple levels to further share workload.
- step 8 a new update flow is executed as in the normal mode this time over the new master node for the mini partition where data resides.
- the traffic will be shared among the available replica levels.
- step 9 the operation is synchronously executed and the response is returned back to the entity that was sending the request.
- step 10 the operation is replicated over the next replication levels.
- the master node receives the confirmation of the operation so that the log is cleared.
- the at least one distributor is configured to order a replication of the update to the replicator that generates the replica of the sub-partition in which the data set to which the update refers to is stored.
- step 1 the master node restarts and registers to the distributor as master node.
- the recovered node may read previous database contents from disk or previous data file sets including a time stamp from when to start the recovery process.
- step 2 the distributor commands the start of the recovery scenario optionally indicating a time stamp for recovery.
- step 3 the replica nodes simultaneously report updated micro partitions to the master database one by one or several at a time. The parallel upload reduces the recovery time. The full recovery node capacity is used and the load is distributed onto the replica databases which keep attending input traffic.
- step 4 the recovered micro partitions are reported in sequence to the distributor. In the embodiment shown in Fig. 4 the dark micro partitions are the micro partitions that are already transmitted to the master.
- step 5 of Fig. 4 the replica nodes and the master node receive the confirmation of the micro partition update.
- the micro partitions become the master in the master database and are replicated to the replica databases.
- the replica databases will free the available working memory area space and will start replicating the data onto the disk memory area. This process gradually grows the load on the master node and reduces the load on the replica nodes. As the replica nodes do not play the role of the master node anymore, the working memory area can be freed of the data transmitted to the master.
- steps 6-9 the traffic is shown where the replica database still manages the input traffic for not yet recovered micro partitions. Collisions with the input traffic finish the micro partition recovery that is retried afterwards.
- the replica database recovery is similar to the master database recovery described above.
- the micro partitions from the multiple sources contribute simultaneously and smoothly increase the load on the recovering replica database.
- Contributors to the recovery process can be the master nodes or other replica databases or a combination thereof. In the worst case scenario and if the log sizes are exceeded in the master and replicator nodes, all mini partitions are recovered by means of a gradual micro partition recovery.
- a replicator failure implies the allocation of micro partitions under failed replicator responsibility to other replicator units. This implies as well recovering log file status for transaction still pending in the affected master nodes.
- the distributor detects a replicator failure either by actively monitoring or by a two-phase commit failure (steps 1A or 1 B).
- step 2 the distributor selects a new set of replicators to take the load of the failed one, based on the sharing load of the missing replicator and indicates the changes to the affected master databases.
- the master databases indicate the pending logged operations to the newly assigned replicators.
- the replicators take the responsibility for those operations and start applying them as if they were theirs originally.
- the initially requested operation is executed as in the normal scenario against the newly defined replicator.
- the replication happens and is confirmed for the requested operation.
- those pending logged operations in the master databases are replicated by those replicators which were assigned responsibility for the failed replicator mini partitions.
- the failure of a distributor node and the recovery implies the recovering and coordinating distribution and replication allocation status from remaining distributors by learning changes from responses from a master, replicator, replica databases stating their status for data partitions of different levels.
- each physical storage unit comprises a distributor, a master database, wherein the system further comprises additional physical storage units comprising each a replicator and a replica database.
- a first layer of physical storage units is provided comprising distributors, the system further comprising a second layer of physical storage units comprising the master database, a replicator and the replica database.
- the present invention can be based on at least some of the following principles: a) Multi-level data partitioning, b) splitting a database replica onto many storage units, c) the physical storage units share load on all scenarios, so that the idle capacity is reduced, d) having at least two storage units in charge of data objects and updates, e) decoupling the replication from the input traffic, f) the use of hybrid storage units for the replica databases.
- the amount of available working memory area for real-time purposes is increased, as the system uses traditional hard disks for replicas.
- the allover capacity is increased compared to existing solutions.
- the capacity gain is as well applicable to geographical mirroring, thus adding up additional capacity gains.
- a further advantage can be seen in that the recovery times are greatly improved with a complete control of the recovery process.
- traditional backups are generally not necessary.
- Complementary measures such as log optimization and hybrid data storage for complete or relevant parts of the replicated data are also possible to optimize even more the overall system performance capacity.
- the operation of replicas in the working memory and on disk is particularly suitable for highly scalable and efficient cluster nodes by using technologies such as flash disks.
- the present invention provides a long lasting installation regardless of server hardware evolution by managing small units, micro partitions or sets or them of customizable sizes, so that new servers may be added without disturbance on existing servers.
- the invention can be applied to document databases where the micro partitions can be a small and an individual document allowing the complete and efficient resource control in the case of a system failure.
- the master slave allocation is defined in terms of micro partitions of any size, i.e. all servers manage micro partitions and replication, failover and recovery processes are all shared among all available servers. Multiple roles in the same server in the homogeneous embodiment as disclosed in Fig. 1 are particularly suitable for multi-core CPUs.
- partitions, mini partitions and micro partitions are means to structure data and service flows.
- the invention also applies when such partitions are not explicitly defined as such, but instead data objects are individually allocated following the same schemes, i.e. onto a master database and distributed over multiple replicas so that input traffic, replication traffic and recovery operations are distributed over a set of physical storage units.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to a real time database system configured to store a database content with a plurality of data sets, the database content being partitioned in different partitions (P1-P5). The system comprises a plurality of master databases (10-50), each master database containing a partition of the database content, each partition being provided on a different physical storage unit and at least one replica database (110-510), each replica database containing subpartitions (11-54) of the partitions stored in master databases (10-50). Furthermore, the system comprises at least one distributor (1-5) configured to route a request for a data set to the master database (10-50), where the data set to which the request refers to, is provided, and distributor (1-5) configured to divide each partition (P1-P5) into several subpartitions. Additionally, the system comprises at least one replicator (100-500), configured to generate a replica (11-54) of each subpartition, and configured to store each replica (11 -54) on a replica database (110-510), wherein the at least one replicator (100-500) stores the replicas (11 -54) of each subpartition in such a way that the replicas of one partition are contained on different physical storage units, on a physical storage unit other than the corresponding partition (P1-P5), and on a physical storage unit other than the replicator (100-500) generating the replica (11-54) of said one partition, wherein the distributor is configured to route a replication request for a subpartition to the replicator responsible for said subpartition.
Description
Real Time Database System
Technical Field
The present invention relates to a real time database system configured to store a database content with a plurality of data sets, the database content being partitioned in different partitions. The invention furthermore relates to a method for operating the real time database system.
Background Scalable real time databases are becoming pervasively used in different environments due to requirements originating from telecom and internet environments and due to the performance and scalability rates required by those environments. This trend is even stronger, taking into account that the entire telecommunications networks are being re-architected by standardization groups so that pre-existing telecom network databases are split into two layers, namely the one in charge of implementing real functionality and the one in charge of storing and managing data. These real time databases are expected to achieve a high capacity and scalability. The same trends are applicable to IT environments and late advancements in cloud computing. In the telecom environment the demand on high throughput and minimum latencies can only be achieved by means of in memory databases, meaning databases where data sets are kept in the working memory area.
As a result of previous trends, real time databases are to become pervasive, and as a result of performance and scalability properties required, they must be based on clusters, grids or other scalable architectures.
In any case, and in order to provide the necessary resilience features, several redundant instances are provided, both local and even multiple remote replicas - they are necessary to provide the necessary high availability and geographical redundancy properties. In practice, this can mean a number of four, six or even more replicas in order to widthstand local and remote failures of multiple units and entire sites.
Current solutions, such as those known from Kossmann, Kraska, Loesing: "An Evaluation of Alternative Architectures for Transaction Processing in the Cloud, ACM SIGMOD 10 Proceedings of the 2010 International Conference on Management of Date", are based inter alia on first partitioning data and assigning those data partitions to N individual master databases and finally replicating those partitions, one by one, and in their entirety onto an additional set of N replica database servers, resulting in 2xN servers, 3xN, 4xN servers if resilience against 2, 3 or more simultaneous failures is required.
As a consequence, replica databases are essentially idle, attending only replication of data updates and waiting for a single failure -single and unknown- that will affect a single instance among them. Complementary approaches target specific niches and are complex to implement, none of them addressing the basic problem of the inefficiency, which is having dedicated master and replica databases devoted to the same and equal partitions (see Kossmann et al. mentioned above).
Maintaining such a large number of replicas (1xN, 2xN and so on) implies investment, with operational and general infrastructure costs growing linearly, up to half, two thirds or a higher fraction of computing resources, and increasing when resilience against one to or a higher number of simultaneous failures is needed.
Devoting redundant resources to secondary tasks does not help solving the problem, as the system has to be dimensioned for big traffic even in a faulty state. Even worse, extra capacity is needed for helping in recovery tasks in the partitions
replicas, e.g. synchronisation and replica consistency assurance when a failed server is recovering with simultaneous incoming traffic.
Summarizing, the bigger the system, the more partitions are required and the more reliable the system is required to be, the more replicas are required for each partition. All replicas are provided in an idle state waiting for a failure affecting a single and unknown replica and shall be dimensioned for extra tasks during recovery. All these inefficiencies increase quadratically with factors such as simultaneous scalability, number of partition and number of replicas.
Summarizing, telecommunication database systems are based on working memory area storage in order to comply with latency and throughput requirements. The above mentioned idle resources imply very high costs and sub-optimal capacity. Summary
Accordingly, a need exists to provide a real time database system meeting low latency and high throughput requirements while at the same time requiring little idle physical storage unit space.
This need is met by the features of the independent claims. In the dependent claims, preferred embodiments of the invention are described.
According to a first aspect of the invention, a real time database system configured to store a database content with a plurality of data sets is provided. The database content is partitioned in different partitions and the system comprises a plurality of master databases, each master database containing a partition of the database content, each partition being provided on a different physical storage unit. The database system furthermore comprises at least one replica database, each replica database containing subpartitions of the partitions stored in the master databases. Furthermore, at least one distributor is provided configured to route a request for a data set to the master database where the data set to which the request refers to is
provided and configured to divide each partition into several subpartitions. Furthermore, at least one replicator is provided configured to generate a replica of each subpartition and configured to store each replica on a replica database, wherein the at least one replicator stores the replicas of each subpartition in such a way that the replicas of one partition are contained on different physical storage units, on a physical storage unit other than the corresponding partition and on another physical storage unit other than the replicator generating the replica of said one partition. The distributor is configured to route a replication request for a subpartition to the replicator responsible for said subpartition. The present database system allows distributing traffic and replication over a plurality of physical storage units, so as to share load changes among such storage units. In this way, a minimum extra capacity is needed in the storage units. The workload distribution is achieved inter alia by partitioning the database content into different partitions and by further partitioning the partitions into subpartitions. In the present database system the presence of 2xN physical storage units/servers for N master databases and replica databases is not necessary, wherein only N+k, k<N storage units being needed. An effective cluster replication and resilience scenarios are obtained by implementing a distributed database having an N+k redundancy. As a result, just a minor delta capacity is required to support fault resilience.
According to one embodiment, the at least one distributor may be configured to detect a failure of a master database, wherein, when the at least one distributor detects a failure of the master database, it routes requests for data sets contained on the failed master database to the replica databases where the replica of the failed master databases are provided, the replicas of the failed master database becoming the master databases for subpartitions of the failed master database during the failure of the master database. This further helps to share load changes due to failure or recovery. Additional capacity needed for fault resilience scenarios is just proportional to the number of simultaneous failures instead of being proportional to both the number of simultaneous failures and the total system capacity. Furthermore, failures have a reduced impact due to the distribution across available physical
storage units in failure or recovery scenarios. Furthermore, recovery times are greatly improved.
The invention furthermore relates to a method for operating a real time database system storing the database content with a plurality of data sets. The method comprises the steps of partitioning the database content into different partitions provided on different master databases, each partition being provided on a different physical storage unit. Furthermore, a request for a data set of the database content is distributed by at least one distributor to the master database where the data set to which the request refers to is provided. Additionally, each partition is divided into several subpartitions by the at least one distributor and a replica of each subpartition is generated by at least one replicator, each replica being stored on a replica database, wherein the replicas of each subpartition are stored in such a way that the replicas of one partition are contained on different physical storage units, on another physical storage unit other than the corresponding partition and on another physical storage unit other than the replicator generating the replica of said one partition. A replication request for a subpartition is routed by the distributor to the replicator responsible for said subpartition. In one embodiment, a failure of a master database may be detected, wherein, if said failure of the master database is detected, requests for data sets contained on the failed master database are distributed by the at least one distributor to the replicas of the failed master database, the replicas of the failed master database becoming the master database for subpartitions of the failed master database during the failure of the master database.
Brief Description of the Drawings
The invention will be described in further detail with reference to the accompanying drawings, in which
Fig. 1 shows a first embodiment of a real time database system,
Fig. 2 shows another embodiment of the real time database system with specialized replica servers, Fig. 3 shows a traffic distribution scenario in a normal operating mode and when a failure of a master database is detected,
Fig. 4 shows the traffic distribution during a master database recovery after a failure, Fig. 5 shows a traffic distribution when a replicator fails and recovers after a failure,
Fig. 6 shows a hybrid database that is used as a replica database to store the replicas, Fig. 7 shows a further embodiment of the real-time database system, and Fig. 8 shows still another embodiment of the real-time database system. Detailed Description of the Drawings
In Fig. 1 an embodiment is shown where the data content of a real time database system is distributed to five different physical storage units or servers, called server A to server E in the embodiment shown. The real time database shown in Fig. 1 can, by way of example contain a subscriber registry of a mobile communications network containing the subscriber related information of a subscriber to a mobile communications network.
As shown in Fig. 1 the database content is partitioned into five partitions P1 to P5, each partition P1 to P5 being provided in a corresponding master database 10 to 50. A data request for data contained on the database system is directed to a node 50 from where the request is distributed to one of the distributors 1 , 2, 3, 4 or 5, which are configured to route the request for a data set contained on the database system
to the master database, where the data set/partition to which the request refers to, is provided. The node 50 may comprise a control unit (not shown) which distributes the request to the different distributors 1 to 5 in dependence on the load of the different distributors or in dependence on a predefined distribution scheme. Each physical storage unit in the embodiment shown in Fig. 1 comprises a replicator, i.e. the replicator 100, 200, 300, 400, 500 in the example shown. The replicator is responsible for the generation of replicas of the subpartitions which are stored on replica databases 1 10, 210, 310, 410 and 510, respectively. The replicator can take care of the replication flow using standard replication algorithms and operation logs, the replicator monitoring a replica nodes (replica databases) by means of hello protocols or being sensitive to distributed traffic operation results and keeps the distributor updated on the storage unit's health. In addition, it also optimizes operation logs and defines affected data instances as subject to store data on a disk memory area or working memory are in the replica databases 1 10 to 510, as will be described in further detail with reference to Fig. 6 further below.
The distributors 1 to 5 distribute the input and replication traffic onto the master databases 10 to 50, their replicators 100 to 500 and the replica databases 1 10 to 510. The distributors have this role in normal and failure situations. Furthermore, the distributors implement data allocation policies and keep track of partition and servers status by means of hello protocols or being sensitive to distributed traffic operation results, then redistributing load upon server failure and recovery.
With the system shown in Fig. 1 it is possible to distribute traffic, fail over replication and recovery and all other meaningful data processes across a plurality of database servers, here the servers A to E (physical storage units), so as to share the load changes due to failure recovery or other events among the different physical data storage units. In this way, just a minimum extra capacity is needed in the different servers for attending those events. The workload distribution is obtained inter alia by partitioning the database content into first partitions P1 to P5. The replicator on each server generates a replica of each partition by generating smaller mini partitions for each partition. By way of example, the replicator generates mini partitions 1 1 , 12, 13,
14 to replicate the content of partition P1 , these mini partitions 1 1 to 14 being stored on server B, server E, server D and server C, respectively. Furthermore, the partition P2 is further partitioned into mini partitions 21 to 24, the partition P3, partitions 31 to 34 etc.
Each mini partition can then be further divided into micro partitions which are shown in the embodiment of Fig. 1 for mini partitions 51 to 54. As will be described in further detail below, the micro partitions are especially used for a recovery process after a failure of one of the master databases 10 to 50.
The allocation of the different partitions and mini partitions to the different physical storage units is visible in Fig. 1 for an homogenous embodiment meaning that all physical storage units implement the same functions having a distributor in charge of distributing input requests, a master database and a replica database in charge of provided data accessing storage and a replicator in charge of logging updates and replicating them onto the corresponding replicas.
The partitioning and distribution is obtained by allocating each partition to a separate physical storage unit. Each partition is then split in mini partitions and the replicas of the mini partitions of such a partition are allocated to still other physical storage units using the hybrid databases different to the database holding the original partition.
In other words, each physical storage unit in the embodiment of Fig. 1 comprises a distributor, a replicator, a master database and a replica database. However, as will be explained in further detail below with reference to Fig. 2, this need not necessarily be the case.
Referring again to Fig. 1 a request flow will be discussed in more detail. First of all, a data request for a data set contained in one of the partitions is balanced onto the available distributors 1 to 5 by node 50, the distribution to one of the physical storage units depending on predefined distribution streams or depending on the load of different distributors. The distributors 1 to 5 then route the individual query or update
requests to the physical storage unit hosting the related partition. In the embodiment shown a data request is distributed by distributor 1 to partition 2 contained in server B of Fig. 1 . If the operation is an update, the distributor orders as well a replication. This order message is shown by the dashed line from distributor 1 to replicator 400 provided on server D in Fig. 1 that will replicate the update on the affected mini partition, e.g. mini partition 23 in server E of Fig. 1 where the affected replica is allocated.
In case a server fails, here server E of Fig. 1 , all distributors, e.g. distributor 4 in the embodiment shown will route all requests to partition P5 to the replicas of P5, the mini partitions 51 to 54 distributed on all the other servers (smaller solid line). Thus, the failure load is shared among the other servers. If a replicator fails (not shown in the Fig.) its replication flow is also shared among the remaining replicators in the other nodes. When a server recovers, server E in the embodiment shown, all servers share the load necessary for such a server recovery. All the other servers simultaneously recover their allocated micro partitions in a sequential manner. The black micro partitions shown in Fig. 1 represent the partitions which are recovered at the same time. The replica database being a hybrid storage unit is shown in more detail in Fig. 6 and comprises a disk memory area symbolized by reference numeral 1 1 1 and a working memory are 1 12. In other words the replica database may be a hybrid storage unit containing a working memory area and a disk memory area, the disk memory area containing the replicas, wherein the hybrid database is configured to move the replica of a master database for which a failure has been detected and which becomes the master database for the failed master database from the disk memory area 1 1 1 to the working memory area 1 12 of the hybrid storage unit. In the working memory area a faster access to the data sets is obtained. Furthermore, the working memory area may contain the data sets of the replicas that are used more often than a predefined threshold, or in other words contains the most often data sets of the replicas. This can mean the data sets that were most frequently
updated in a defined time period in the past (e.g. one hour) or data sets with undeniable strict response time requirements even under recovery scenarios. Furthermore, the replica database can be configured to store replicas from a plurality of master databases.
For replicating the data stored on the replica database it is decided by the algorithm shown in the left part whether the replication request is sent to the working memory area 1 12 or the disk memory area 1 1 1 . Furthermore, a role manager 1 13 may be provided receiving orders from the distributers. By way of example if a message for a failure of a master database is received, the manager orders the upload of the data sets of the failed master database contained in the corresponding replicas of the disk memory area to the working memory area where they can be accessed more easily as these data sets now play the role of the master database.
Referring back to Fig. 1 it can be seen from the lower part of Fig. 1 , the given table, that more than one replica of a partition may be generated. In Fig. 1 it can be seen that a mini partition index composed of the partition number followed by the mini partition number inside such a partition can be used. It can be seen as well that even for a 1 +1 replication a failure of server E is attended by servers A, B, C and D, respectively, by serving traffic requests or mini partitions 51 , 52, 53 and 54. A double failure on two servers can still be attended by the remaining servers if a triple replication (the master database plus replication 1 and replication 2) in the partitioning scheme used in Fig. 1 is implemented. The remaining servers may still hold the mini partitions corresponding to the failed server partitions. As can be seen, a set of replica databases take over the role of a single failed master database, thus reducing the extra computing capacity required on those replica databases. In addition, multiple replicas of the same mini partition can be implemented as shown in the lower part of Fig. 1 where multiple replicas of mini partitions are allocated to the same physical server making the overall system resilient against multiple simultaneous failures.
While Fig. 1 shows a homogeneous embodiment in which all roles in the system, such as master database, replica database, replicator and distributor are allocated to all nodes, a heterogeneous embodiment, is also possible in which the system rules are allocated to specialized servers, an example being shown in Fig. 2. In this embodiment specialized double replica databases are shown along with the partitioning scheme applicable in this case. This embodiment clearly shows that it is possible with the present invention to provide N+K replication properties, so that for N servers only a fraction of servers K is required for redundancy purposes. Thus instead of needing 18 servers for the six partitions and for the two replicas of each partition, only 12 physical storage units are needed in the embodiment of Fig. 2, six for the master databases, three for the first replicas and another three for the second replicas. Each of the N+K nodes of the database system can be implemented using heterogeneous servers/storage units , i.e. N active servers and K failover servers, or a homogeneous embodiment can be used where all servers are equal and share active and failover roles by distributing N+K nodes over physical servers. In this embodiment each physical storage unit comprises a distributor, a replicator and the master database, the system further comprising specialized physical storage units A-C and X-Z for the replica databases. These replica databases can be again hybrid databases as shown in Fig. 6. As can be seen from the table shown in Fig. 2, the replica database A can contain the mini partitions 1 1 , 21 , 31 , 41 , 51 and 61 . Mini partition 12 is provided on the physical storage unit B as a first replica and on the physical storage unit X for the second replica.
In both embodiments the mini partitions can be further divided into micro partitions which were shown in Fig. 1 . Micro partitioning, a third level of partitioning, and service distribution applies over the mini partitions discussed above. The micro partition can be used in the recovery process and by the replicator in the following way:
The micro partitions can be defined in the replica databases for recovery purposes, so that multiple replica databases can simultaneously feed a restarted master server, thus reducing the recovery time as shown in Fig. 1 where the micro partitions of mini partition 51 , 54, 52 and 53 can be fed to a restarting master database 50 containing partition P5 which restarts after a failure.
The micro partitions can be used as well for the replicator for fail over purposes, so that the replication logs for a mini partition assigned to a failed replicator are distributed onto the remaining replicators, thus sharing the load among them. In the embodiment shown in Fig. 1 the mini partitions are the work allocation unit for the replicators. However, the replicator may also work on any set of micro partitions. This could be the case in Fig. 2 in case the replicator role is allocated to all physical storage units or just to the replica databases so that different groups of micro partitions can be used with the same result.
Micro partitions might be as small as necessary to allow for smooth recovery, thus reducing extra capacity required by recovery processes. Furthermore, it is possible that the same architecture shown in Fig. 1 and 2 can be implemented where only micro partitions are considered and managed from a distribution point, so that traffic, failover, recovery and other processes are shared onto multiple physical storage units and replicas by using micro partitions as a distribution mechanism. In general terms this means that only one sub-partition category is generated, i.e. only micro partitions, whereas in the other partitioning schemes two partitioning levels, the sub partitions and smaller partitions of the sub partitions can be used. In this embodiment the sub partitions correspond to the mini partitions, the smaller partitions corresponding to the micro partitions. This means that the at least one replica database can be configured to further partition the replica on a replica database to smaller partitions, wherein, when the master database restarts after a failure, the replica databases are configured to
report the smaller partitions comprising the data sets of the restarted master database needed to recover the partition provided on the restarting master database, to the restarted master database. This corresponds to the use of the mini and micro partitions for replication and recovery purposes, respectively, whereas in another embodiment only micro partitions are used for distribution and recovery purposes.
Summarizing, the distributors distribute input and replication traffic onto master, replicator and replica databases in normal and failure situations. It keeps track of partitions and server status of all three partitioning levels by means of hello protocols, or being sensitive to distributed traffic operation results. The distributor also redistributes the load upon server failure and recovery.
The replicator takes care of the replication flow using replication algorithms and operation logs and monitors replica databases, e.g. by means of hello protocols or by being sensitive to distributed traffic operation results. The replicator keeps the distributor updated on the replica databases' health. Furthermore, it optimizes operation logs and defines affected data instances as subject to storage in the working memory area or disk memory area in the replica databases. The replica databases are databases that attend traffic upon master database failure. The replica databases receive the update of the corresponding master updates and become the master database temporarily for selected data partitions.
The master database can be the database receiving traffic in the absence of failure.
In connection with Fig. 3 the traffic distribution for a normal working scenario and for a failure of a master database are shown. In step 1 a data access request arrives at the distributor, e.g. distributor 1 . This distributor is selected by the node 50 either randomly or based on load sharing. As indicated by step 2 the distributor selects the master and for updates the replicator, both based on the affected data instance, partitioning scheme and current server status. Read operations are answered by the master database, the rest of the scenario applies to updates. The distributor
executes a synchronous, e.g. a 2PC or 3PC (two- or three-phase commit) on the master database and replicator, two or three phase commit corresponding to a protocol in which all participating nodes in the distributed system agree to commit a transaction. The same replicator instance is always selected for the same micro partition, and multiple replicators are available for different micro partitions in the same partition. The replicator is aware of the destination replica databases which can be more than one.
In step 3 of Fig. 3 the operation is synchronously operated and a response message is returned back, both the master database and the replicator maintain the operation log for the related data updates.
In step 4 of Fig. 3 the replicator optimizes the operation log, by way of example it may remove overlapping operations on a certain data set or may group several of them and the replicator may finally order the operation against corresponding replicas for affected objects. In step 5 the master database is notified back about the operation success and the master database log is updated.
In this normal operating scenario different failure scenarios are possible: first of all, a master database may fail. In this situation the traffic of the affected partition is distributed among the replica databases containing the mini partitions. These mini partitions may be provided either on the first replica level or on other replica levels.
Furthermore, the master and the first replica database may fail. Here the traffic is directed over the second replica databases. Successive failure of the master and consecutive replica databases are managed in the same way. Furthermore, a replica database may fail or the replicator or distributor node may fail and recover.
In the lower part of Fig. 3 the failure of a master database is discussed in more detail. As shown in step 6 a data access request arrives at the system. The request can be a read request or an update. The distributor has to address a failed node/physical
storage unit, either because the monitoring previously informed the distributor of the master database failure (step 6A) or after a failure in executing an update (step 6B).
The failing database is marked as inactive as preparing a recovery process. Further accesses to the affected partition will happen by distributing the previous load onto the replica databases holding the mini partitions included in the failed master database.
In step 7 the distributor commands the first replica levels databases to become the master for the mini partition related to the failed master database. Those replica servers will require operations pending in the affected replicators logs to update the mini partitions to the latest updated status. Furthermore, the replica database will start promoting the replica stored in the disk memory area into the working memory area, this happening for all replica database in parallel. Prompt access to such replicas is allowed by in memory caching on those servers for frequency accessed data.
In case multiple levels of replica databases exist, the master role, the failure, traffic and recovery process can be shared among those multiple levels to further share workload.
In step 8 a new update flow is executed as in the normal mode this time over the new master node for the mini partition where data resides. As mentioned in the previous step in case multiple replica levels exist and the mastership is shared among those, the traffic will be shared among the available replica levels.
In step 9 the operation is synchronously executed and the response is returned back to the entity that was sending the request. In step 10 the operation is replicated over the next replication levels. The master node receives the confirmation of the operation so that the log is cleared.
In general terms in the normal operating scenario for an update of a data set the at least one distributor is configured to order a replication of the update to the replicator that generates the replica of the sub-partition in which the data set to which the update refers to is stored.
In connection with Fig. 4 a recovery of a failed master node is discussed in more detail. In step 1 the master node restarts and registers to the distributor as master node. The recovered node may read previous database contents from disk or previous data file sets including a time stamp from when to start the recovery process.
In step 2 the distributor commands the start of the recovery scenario optionally indicating a time stamp for recovery. In step 3 the replica nodes simultaneously report updated micro partitions to the master database one by one or several at a time. The parallel upload reduces the recovery time. The full recovery node capacity is used and the load is distributed onto the replica databases which keep attending input traffic. In step 4 the recovered micro partitions are reported in sequence to the distributor. In the embodiment shown in Fig. 4 the dark micro partitions are the micro partitions that are already transmitted to the master.
In step 5 of Fig. 4 the replica nodes and the master node receive the confirmation of the micro partition update. The micro partitions become the master in the master database and are replicated to the replica databases. The replica databases will free the available working memory area space and will start replicating the data onto the disk memory area. This process gradually grows the load on the master node and reduces the load on the replica nodes. As the replica nodes do not play the role of the master node anymore, the working memory area can be freed of the data transmitted to the master. In steps 6-9 the traffic is shown where the replica database still manages the input traffic for not yet recovered micro partitions. Collisions with the input traffic finish the micro partition recovery that is retried afterwards.
When a replica database fails, the traffic is kept undisturbed by the situation and is executed as usual by the active nodes/databases. The main difference can be seen in the fact that all log files accumulate in the master and replicator nodes, as they cannot be transmitted to the replica databases. The log files will be executed later on by the replicator onto the replica databases once the replica database has recovered.
The replica database recovery is similar to the master database recovery described above. The micro partitions from the multiple sources contribute simultaneously and smoothly increase the load on the recovering replica database. Contributors to the recovery process can be the master nodes or other replica databases or a combination thereof. In the worst case scenario and if the log sizes are exceeded in the master and replicator nodes, all mini partitions are recovered by means of a gradual micro partition recovery.
In connection with Fig. 5 a replicator failure and recovery is described.
A replicator failure implies the allocation of micro partitions under failed replicator responsibility to other replicator units. This implies as well recovering log file status for transaction still pending in the affected master nodes.
In the first step shown in Fig. 5 the distributor detects a replicator failure either by actively monitoring or by a two-phase commit failure (steps 1A or 1 B). In step 2 the distributor selects a new set of replicators to take the load of the failed one, based on the sharing load of the missing replicator and indicates the changes to the affected master databases.
As shown in step 3 the master databases indicate the pending logged operations to the newly assigned replicators. The replicators take the responsibility for those operations and start applying them as if they were theirs originally.
In step 4 the initially requested operation is executed as in the normal scenario against the newly defined replicator. In step 5 the replication happens and is confirmed for the requested operation. In step 6 those pending logged operations in the master databases are replicated by those replicators which were assigned responsibility for the failed replicator mini partitions.
The failure of a distributor node and the recovery implies the recovering and coordinating distribution and replication allocation status from remaining distributors by learning changes from responses from a master, replicator, replica databases stating their status for data partitions of different levels.
In Fig. 7 another embodiment for the distribution of the different functional entities is shown. In the embodiment shown in Fig. 7 each physical storage unit comprises a distributor, a master database, wherein the system further comprises additional physical storage units comprising each a replicator and a replica database. In the embodiment shown in Fig. 8 a first layer of physical storage units is provided comprising distributors, the system further comprising a second layer of physical storage units comprising the master database, a replicator and the replica database. The above-discussed invention has the advantage of providing a cluster implementation by a plurality of servers sharing traffic replication, fail over traffic and recovery loads with a complete, fine grain load and capacity control.
The present invention can be based on at least some of the following principles: a) Multi-level data partitioning, b) splitting a database replica onto many storage units, c) the physical storage units share load on all scenarios, so that the idle capacity is reduced, d) having at least two storage units in charge of data objects and updates, e) decoupling the replication from the input traffic, f) the use of hybrid storage units for the replica databases.
Furthermore, the amount of available working memory area for real-time purposes is increased, as the system uses traditional hard disks for replicas. As a consequence,
the allover capacity is increased compared to existing solutions. The capacity gain is as well applicable to geographical mirroring, thus adding up additional capacity gains.
A further advantage can be seen in that the recovery times are greatly improved with a complete control of the recovery process. By using multiple replica databases to feed the restarting master databases which simultaneously send recovery operations the load is shared, so that there is a negligible impact on ongoing operations. In view of the short recovery times traditional backups are generally not necessary. Complementary measures such as log optimization and hybrid data storage for complete or relevant parts of the replicated data are also possible to optimize even more the overall system performance capacity. The operation of replicas in the working memory and on disk is particularly suitable for highly scalable and efficient cluster nodes by using technologies such as flash disks.
The present invention provides a long lasting installation regardless of server hardware evolution by managing small units, micro partitions or sets or them of customizable sizes, so that new servers may be added without disturbance on existing servers.
Furthermore, it is possible to use a linearly scalable architecture where all components can be linearly scaled. Additionally, the invention can be applied to document databases where the micro partitions can be a small and an individual document allowing the complete and efficient resource control in the case of a system failure. Furthermore, an embodiment is provided in which the master slave allocation is defined in terms of micro partitions of any size, i.e. all servers manage micro partitions and replication, failover and recovery processes are all shared among all available servers. Multiple roles in the same server in the homogeneous embodiment as disclosed in Fig. 1 are particularly suitable for multi-core CPUs.
It should be noted that partitions, mini partitions and micro partitions are means to structure data and service flows. The invention also applies when such partitions are
not explicitly defined as such, but instead data objects are individually allocated following the same schemes, i.e. onto a master database and distributed over multiple replicas so that input traffic, replication traffic and recovery operations are distributed over a set of physical storage units.
By managing the number and sizes of partitions mini partitions and micro partitions, it is possible to deal with environments of heterogeneous servers with different capacities. The scalability of such systems can be managed by allocating new servers and reallocating micro partitions to newly added servers and keeping the properties of load sharing upon server failure while still reducing the idle system capacity to a minimum.
Claims
1 . A real time database system configured to store a database content with a plurality of data sets, the database content being partitioned in different partitions (P1 -P5), the system comprising:
- a plurality of master databases (10-50), each master database containing a partition of the database content, each partition being provided on a different physical storage unit,
- at least one replica database (1 10-510), each replica database containing subpartitions (1 1 -54) of the partitions stored in master databases (10-50),
- at least one distributor (1 -5) configured to route a request for a data set to the master database (10-50), where the data set to which the request refers to, is provided, and configured to divide each partition (P1 -P5) into several subpartitions.
- at least one replicator (100-500), configured to generate a replica (1 1 -54) of each subpartition, and configured to store each replica (1 1 -54) on a replica database (1 10-510), wherein the at least one replicator (100-500) stores the replicas (1 1 -54) of each subpartition in such a way that the replicas of one partition are contained on different physical storage units, on another physical storage unit other than the corresponding partition (P1 -P5), and on a physical storage unit other than the replicator (100-500) generating the replica (1 1 -54) of said one partition, wherein the distributor is configured to route a replication request for a subpartition to the replicator responsible for said subpartition.
2. The real time database system according to claim 1 , wherein the at least one distributor (1 -5) is configured to detect a failure of a master database (10-50), wherein, when the at least one distributor (1 -5) detects a failure of a master database (10-50), it routes requests for data sets contained on the failed master database (1 10-510) to the replica databases where the replicas (1 1 -54) of the failed master database are provided, the replicas of the failed master database becoming master databases for subpartitions of the failed master database during the failure of the master database.
3. The real time database system according to any of the preceding claims, wherein each physical storage unit comprises a distributor (1 -5), a replicator (100-500), a master database (10-50) and a replica database (1 10-510).
4. The real time database system according to claim 1 or 2, wherein each physical storage unit comprises a distributor (1 -5), a replicator (100-500) and master database (10-50), the system further comprising specialised physical storage units (A, B, C, X, Y, Z) for the replica databases.
5. The real time database system according to any of the preceding claims, wherein for an update of a data set, the at least one distributor (1 -5) is configured to order a replication of the update to the at least one replicator (100-500) that generates the replica (1 1 -54) of the subpartition in which the data set, to which the update refers to, is stored.
6. The real time database system according to any of the preceding claims, wherein for an update of a data set, the at least one replicator (100-500) is configured to log the update and to replicate it on the corresponding replica database, where the replica of said data set, for which the update is received, is stored.
7. The real time database system according to any of the preceding claims, wherein the at least one replica database (1 10-510) is configured to further partition the replica on a replica database into smaller partitions (150, 450).
8. The real time database system according to claim 7, wherein, when the master database (10-50) restarts after a failure, the replica databases (1 10-510) are configured to report the smaller partitions (150, 450) comprising the data sets of the restarted master database needed to recover the partition provided on the restarting master database, to the restarted master database.
9. The real time database system according to any of the preceding claims wherein the replica database (1 10-510) is a hybrid storage unit containing a working memory area and a disk memory area, the disk memory area containing the replicas (1 1 -54), wherein the hybrid database is configured to move the replica of a master database for which a failure has been detected and which becomes the master database for the failed master database from the disk memory area to the working memory area of the hybrid storage unit.
10. The real time database system according to any of the preceding claims wherein the replica database (1 10-510) is a hybrid storage unit containing a working memory area and a disk memory area, the disk memory area containing the replicas (1 1 -54), and the working memory area containing the data sets of the replicas (1 1 -54) in the disk memory area that are used more often than a predefined threshold.
1 1 . The real time database according to any of the preceding claims, wherein the replica database (1 10-510) is configured to store replicas (1 1 -54) from a plurality of master databases.
12. The real time database according to any of the preceding claims, wherein the replicator (100-500) is configured to generate several replicas of each master database (10- 50), the replicator storing each replica on a different physical storage unit.
13. A method for operating a real time database system storing a database content with a plurality of data sets, the method comprising the steps of:
- partitioning the database content into different partitions (P1 -P5) provided on different master databases (10-50), each partition being provided on a different physical storage unit,
- distributing, by at least one distributor (1 -5), a request for a data set of the database content to the master database (10-50), where the data set to which the request refers, is provided,
- dividing, by at least one distributor (1 -5), each partition into several subpartitions,
- generating, by at least one replicator (100-500), a replica (1 1 -54) of each subpartition, and storing each replica on a replica database (1 10-510), wherein the replicas (1 1 -54) of each subpartition are stored in such a way that the replicas of one partition are contained on different physical storage units, on a physical storage unit other than the corresponding partition (P1 -P5), and on another physical storage unit other than the replicator (100-500) generating the replica (1 1 -54) of said one partition, wherein a replication request for a subpartition is routed, by said at least one distributor, to the replicator responsible for said subpartition.
14. The method according to claim 13, further comprising the step of detecting a failure of a master database (10-50), wherein, if a failure of a master database is detected, requests for data sets contained on the failed master database are distributed by the at least one distributor (1 -5) to the replicas (1 1 -54) of the failed master database, the replicas (1 1 -54) of the failed master database becoming the master database for subpartitions of the failed master database during the failure of the master databases.
15. The method according to claim 13 or 14, wherein, when an update for a dataset of one of the partitions (P1 -P5) is detected the update is replicated on the corresponding replica in the replica database.
16. The method according to any of claims 13 to 15, wherein the master database (10- 50), the replica databases (1 1 -51 ), and the replicators (100-500) are selected by the distributor (1 -5).
17. The method according to any of claims 13 to 16, wherein an operation log for updates of the database content is distributed by the distributor (1 -5) to the master database (10-50) and the replicator (100-500), the updates being maintained on the master database (10-50) and on the replicator (100-500).
18. The method according to any of claims 13 to 15, wherein the replicas (1 1 -51 ) of the failed master database are loaded from a disk memory area (1 1 1 ) to a working memory area
(1 12) of the corresponding replica database (1 10-510).
19. The method according to any of claims 13 to 18, wherein, if a master database (10- 50) restarts after a failure, the master database (10-50) is registered as master database to the distributor (1 -5), the master database (10-50) receiving from the replica databases (1 10- 510), where the replicas of the restarting master database are provided, the replicas (1 1 -54) needed to recover the partition (P1 -P5) provided on the restarted master database.
20. The method according to claim 19, wherein the information about the replicas (1 1 -54) transmitted to the restarted master database is transmitted to the distributor (1 -5).
21 . The method according to any of claims 13 to 20, wherein, when a failure of a replicator (100-500) is detected, a new set of replicators is selected, the information about the new set of replicators being transmitted to the affected master databases (10-50), the affected master databases indicating logged operations to the new set of replicators.
22. The method according to any of claims 13 to 21 , wherein, when a failed distributor (1 - 5) is recovering, a distribution and allocation status is learned from other distributors of the system.
23. The method according to any of claims 13 to 22, further comprising the step of partitioning each replica (1 1 -51 ) on the replica database into smaller partitions (150, 450).
24. The method according to claim 23, wherein, when a restart of a master database (10- 50) is detected, the smaller partitions (150, 450) comprising the data sets of the restarted master database needed to recover the partition (P1 -P5) provided on the restarting master database are transmitted to the restarted master database to update the master database.
25. The method according to claim 24, wherein smaller partitions (150, 450) transmitted to the restarted master database are reported to the distributor (1 -5) for the distributor to route data and update requests to the master database (10-50) if the data set affected by the request has already been transmitted to master database (10-50), or else route data and update requests to the replica database (1 10-510) if data affected by the requests has not yet been transmitted to master database (10-50).
26. The method according to any of claims 23 to 25, wherein, when the replica database (1 10-510) restarts after a failure, the smaller partitions (150, 450) provided on other replica databases (1 10-510) and/or the master database and needed to recover the subpartition provided on the restarting replica database are transmitted to the restarted replica database (1 10-510) to update the replica database.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/EP2010/068312 WO2012069091A1 (en) | 2010-11-26 | 2010-11-26 | Real time database system |
EP10784784.0A EP2643771B1 (en) | 2010-11-26 | 2010-11-26 | Real time database system |
US13/990,016 US9201747B2 (en) | 2010-11-26 | 2010-11-26 | Real time database system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/EP2010/068312 WO2012069091A1 (en) | 2010-11-26 | 2010-11-26 | Real time database system |
Publications (2)
Publication Number | Publication Date |
---|---|
WO2012069091A1 true WO2012069091A1 (en) | 2012-05-31 |
WO2012069091A8 WO2012069091A8 (en) | 2012-09-07 |
Family
ID=44170114
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/EP2010/068312 WO2012069091A1 (en) | 2010-11-26 | 2010-11-26 | Real time database system |
Country Status (3)
Country | Link |
---|---|
US (1) | US9201747B2 (en) |
EP (1) | EP2643771B1 (en) |
WO (1) | WO2012069091A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793291A (en) * | 2012-11-01 | 2014-05-14 | 华为技术有限公司 | Distributed data copying method and device |
EP3401804A1 (en) * | 2017-05-08 | 2018-11-14 | Sap Se | Adaptive query routing in a replicated database environment |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5776339B2 (en) * | 2011-06-03 | 2015-09-09 | 富士通株式会社 | File distribution method, file distribution system, master server, and file distribution program |
US9824132B2 (en) * | 2013-01-08 | 2017-11-21 | Facebook, Inc. | Data recovery in multi-leader distributed systems |
KR101460651B1 (en) * | 2013-05-14 | 2014-11-14 | 고려대학교 산학협력단 | Device and method for distributing load of server based on cloud computing |
US9836360B2 (en) * | 2014-11-25 | 2017-12-05 | Sap Se | Recovery strategy with dynamic number of volumes |
US10089307B2 (en) * | 2014-12-31 | 2018-10-02 | International Business Machines Corporation | Scalable distributed data store |
US10037376B2 (en) * | 2016-03-11 | 2018-07-31 | Microsoft Technology Licensing, Llc | Throughput-based fan-out control in scalable distributed data stores |
CN111656340B (en) * | 2018-07-06 | 2023-07-18 | 斯诺弗雷克公司 | Data replication and data failover in a database system |
US11086840B2 (en) | 2018-12-07 | 2021-08-10 | Snowflake Inc. | Transactional streaming of change tracking data |
CN110147298B (en) * | 2019-05-23 | 2020-02-18 | 北京天华星航科技有限公司 | Virtual tape library backup system and equipment |
US11928352B2 (en) | 2021-05-05 | 2024-03-12 | Netapp, Inc. | Maintaining the benefit of parallel splitting of ops between primary and secondary storage clusters in synchronous replication while adding support for op logging and early engagement of op logging |
US11907562B2 (en) | 2022-07-11 | 2024-02-20 | Netapp, Inc. | Methods and storage nodes to decrease delay in resuming input output (I/O) operations after a non-disruptive event for a storage object of a distributed storage system by utilizing asynchronous inflight replay of the I/O operations |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5761500A (en) * | 1996-04-18 | 1998-06-02 | Mci Communications Corp. | Multi-site data communications network database partitioned by network elements |
US6571351B1 (en) * | 2000-04-07 | 2003-05-27 | Omneon Video Networks | Tightly coupled secondary storage system and file system |
US8166012B2 (en) * | 2007-04-11 | 2012-04-24 | Emc Corporation | Cluster storage using subsegmenting |
US20110153570A1 (en) * | 2009-12-18 | 2011-06-23 | Electronics And Telecommunications Research Institute | Data replication and recovery method in asymmetric clustered distributed file system |
US8732517B1 (en) * | 2011-06-30 | 2014-05-20 | Amazon Technologies, Inc. | System and method for performing replica copying using a physical copy mechanism |
KR20130097350A (en) * | 2012-02-24 | 2013-09-03 | 한국전자통신연구원 | Apparatus and method for converting replication-based file into parity-based file in the asymmetric clustering file system |
-
2010
- 2010-11-26 US US13/990,016 patent/US9201747B2/en active Active
- 2010-11-26 WO PCT/EP2010/068312 patent/WO2012069091A1/en active Application Filing
- 2010-11-26 EP EP10784784.0A patent/EP2643771B1/en active Active
Non-Patent Citations (2)
Title |
---|
JORGE VIEIRA ET AL: "Redundant Array of Inexpensive Nodes for DWS", 19 March 2008, DATABASE SYSTEMS FOR ADVANCED APPLICATIONS; [LECTURE NOTES IN COMPUTER SCIENCE], SPRINGER BERLIN HEIDELBERG, BERLIN, HEIDELBERG, PAGE(S) 580 - 587, ISBN: 978-3-540-78567-5, XP019087375 * |
PHILIP A. BERNSTEIN, NISHANT DANI, BADRIDDINE KHESSIB, RAMESH MANNE, DAVID SHUTT: "Data Management Issues in Supporting Large-ScaleWeb Services", IEEE DATA ENGINEERING BULLETIN, December 2006 (2006-12-01), pages 1 - 7, XP002646916, Retrieved from the Internet <URL:http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.67.7333&rep=rep1&type=pdf> [retrieved on 20110701], DOI: 10.1.1.67.7333 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103793291A (en) * | 2012-11-01 | 2014-05-14 | 华为技术有限公司 | Distributed data copying method and device |
EP3401804A1 (en) * | 2017-05-08 | 2018-11-14 | Sap Se | Adaptive query routing in a replicated database environment |
US11573947B2 (en) | 2017-05-08 | 2023-02-07 | Sap Se | Adaptive query routing in a replicated database environment |
US11914572B2 (en) | 2017-05-08 | 2024-02-27 | Sap Se | Adaptive query routing in a replicated database environment |
Also Published As
Publication number | Publication date |
---|---|
WO2012069091A8 (en) | 2012-09-07 |
US20130254590A1 (en) | 2013-09-26 |
US9201747B2 (en) | 2015-12-01 |
EP2643771B1 (en) | 2017-11-08 |
EP2643771A1 (en) | 2013-10-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2643771B1 (en) | Real time database system | |
US11360854B2 (en) | Storage cluster configuration change method, storage cluster, and computer system | |
US10817478B2 (en) | System and method for supporting persistent store versioning and integrity in a distributed data grid | |
US8856091B2 (en) | Method and apparatus for sequencing transactions globally in distributed database cluster | |
US20070061379A1 (en) | Method and apparatus for sequencing transactions globally in a distributed database cluster | |
US20100023564A1 (en) | Synchronous replication for fault tolerance | |
EP3039844B1 (en) | System and method for supporting partition level journaling for synchronizing data in a distributed data grid | |
US10127077B2 (en) | Event distribution pattern for use with a distributed data grid | |
CN110727709A (en) | Cluster database system | |
KR20000011302A (en) | A highly scalable and highly available cluter system management scheme | |
CN103150304A (en) | Cloud database system | |
WO2002063484A1 (en) | Network-based disk redundancy storage system and method | |
Malkhi et al. | From paxos to corfu: a flash-speed shared log | |
KR101335934B1 (en) | Method for data replication and recovery in asymmetric clustered distributed file system | |
CN109218386A (en) | A kind of high availability method managing Hadoop NameSpace | |
US20240028611A1 (en) | Granular Replica Healing for Distributed Databases | |
CN118092778A (en) | Active change method, system, server and storage medium | |
CN116431594A (en) | Data storage method and device and computer readable storage medium | |
Karwande et al. | The Data Recovery File System for Hadoop Cluster-Review Paper | |
Schroeder | Using Sharing to Simplify System Management | |
KR20110070677A (en) | Apparatus and method of processing failure data recovery in the asymmetric clustering file 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: 10784784 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
REEP | Request for entry into the european phase |
Ref document number: 2010784784 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 13990016 Country of ref document: US Ref document number: 2010784784 Country of ref document: EP |