Multi-master data replication in a distributed multi-tenant system
First Claim
Patent Images
1. In a replicated database by an instance of the replicated database, wherein the instance is one of a plurality of instances of the replicated database, and each replicated database instance is separately responsible for multiple database tables local to the respective replicated database instances, a method comprising:
- maintaining, for each data center, a mapping of which replicated database instances are leader instances and which replicated database instances are non-leader instances, wherein the plurality of instances of the replicated database exist within two or more data centers, each data center having one leader instance and a plurality of non-leader instances, the plurality of non-leader instances to communicate with other non-leader instances of the same data center and the leader instance of the same data center and not to instances of other data centers, the leader instance to communicate with leader instances of other data centers and not with non-leader instances of other data centers, wherein each instance acts as both a client by requesting updates from all known peer instances of the plurality of instances with which it is permitted to communicate in accordance with its configuration as a leader instance or a non-leader instance as well as a server by providing its own data to other instances upon request;
maintaining, in a database table for each instance of the plurality of instances, at least information related to availability and information related to recently applied replication updates, wherein the information related to availability relates to run-time changes in a state of reachability of respective instances of the plurality of instances;
monitoring for a change to at least one record of the local database tables;
generating a chunk of information that stores metadata about record changes and corresponds to a discrete unit of progress for both change detection and transport;
serving the chunk to another instance of the replicated database via one or more leader instances to replicate the detected change to the other instance; and
synchronizing the database table in response to changes in availability or changes in recently applied replication updates.
1 Assignment
0 Petitions
Accused Products
Abstract
A multi-master replication system is disclosed. The multi-master replication system allows a large set of peer instances to collaboratively replicate data to each other.
164 Citations
18 Claims
-
1. In a replicated database by an instance of the replicated database, wherein the instance is one of a plurality of instances of the replicated database, and each replicated database instance is separately responsible for multiple database tables local to the respective replicated database instances, a method comprising:
-
maintaining, for each data center, a mapping of which replicated database instances are leader instances and which replicated database instances are non-leader instances, wherein the plurality of instances of the replicated database exist within two or more data centers, each data center having one leader instance and a plurality of non-leader instances, the plurality of non-leader instances to communicate with other non-leader instances of the same data center and the leader instance of the same data center and not to instances of other data centers, the leader instance to communicate with leader instances of other data centers and not with non-leader instances of other data centers, wherein each instance acts as both a client by requesting updates from all known peer instances of the plurality of instances with which it is permitted to communicate in accordance with its configuration as a leader instance or a non-leader instance as well as a server by providing its own data to other instances upon request; maintaining, in a database table for each instance of the plurality of instances, at least information related to availability and information related to recently applied replication updates, wherein the information related to availability relates to run-time changes in a state of reachability of respective instances of the plurality of instances; monitoring for a change to at least one record of the local database tables; generating a chunk of information that stores metadata about record changes and corresponds to a discrete unit of progress for both change detection and transport; serving the chunk to another instance of the replicated database via one or more leader instances to replicate the detected change to the other instance; and synchronizing the database table in response to changes in availability or changes in recently applied replication updates. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A non-transitory computer-readable medium to provide a replicated database by an instance of the replicated database, wherein the instance is one of a plurality of instances of the replicated database, and each instance is separately responsible for multiple database tables local to the respective instances, the medium having instructions stored on that, when executed by one or more processors, are configurable to cause the one or more processors to:
-
maintain, for each data center, a mapping of which replicated database instances are leader instances and which replicated database instances are non-leader instances, wherein the plurality of instances of the replicated database exist within two or more data centers, each data center having one leader instance and a plurality of non-leader instances, the plurality of non-leader instances to communicate with other non-leader instances of the same data center and the leader instance of the same data center and not to instances of other data centers, the leader instance to communicate with leader instances of other data centers and not with non-leader instances of other data centers, wherein each instance acts as both a client by requesting updates from all known peer instances of the plurality of instances with which it is permitted to communicate in accordance with its configuration as a leader instance or a non-leader instance as well as a server by providing its own data to other instances upon request; maintain, in a database table for each instance of the plurality of instances, at least information related to availability and information related to recently applied replication updates, wherein the information related to availability relates to run-time changes in a state of reachability of respective instances of the plurality of instances; monitor for a change to at least one record of the local database tables; generate a chunk of information that stores metadata about record changes and corresponds to a discrete unit of progress for both change detection and transport; serve the chunk to another instance of the replicated database via one or more leader instances to replicate the detected change to the other instance; and synchronize the database table in response to changes in availability or changes in recently applied replication updates. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A system to provide a replicated database by an instance of the replicated database, wherein the instance is one of a plurality of instances of the replicated database, and each instance is separately responsible for multiple database tables local to the respective instances, the medium having instructions stored on that, when executed by one or more processors, the system comprising:
-
at least one memory device; one or more processors coupled with the at least one memory device, the one or more processors configurable to maintain, for each data center, a mapping of which replicated database instances are leader instances and which replicated database instances are non-leader instances, wherein the plurality of instances of the replicated database exist within two or more data centers, each data center having one leader instance and a plurality of non-leader instances, the plurality of non-leader instances to communicate with other non-leader instances of the same data center and the leader instance of the same data center and not to instances of other data centers, the leader instance to communicate with leader instances of other data centers and not with non-leader instances of other data centers, wherein each instance acts as both a client by requesting updates from all known peer instances of the plurality of instances with which it is permitted to communicate in accordance with its configuration as a leader instance or a non-leader instance as well as a server by providing its own data to other instances upon request, to maintain, in a database table for each instance of the plurality of instances, at least information related to availability and information related to recently applied replication updates, wherein the information related to availability relates to run-time changes in a state of reachability of respective instances of the plurality of instances, to monitor for a change to at least one record of the local database tables, to generate a chunk of information that stores metadata about record changes and corresponds to a discrete unit of progress for both change detection and transport, to serve the chunk to another instance of the replicated database via one or more leader instances to replicate the detected change to the other instance; and
to synchronize the database table in response to changes in availability or changes in recently applied replication updates. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification