System and method for determining consensus within a distributed database
First Claim
Patent Images
1. A computer-implemented method for maintaining consensus in a distributed database system comprising a plurality of nodes, the method comprising:
- establishing a primary node having a primary node role within the distributed database system and the primary node hosting a database, wherein the distributed database system provides one or more responses to database requests from one or more client computer systems;
establishing a plurality of secondary nodes having a secondary node role, wherein each secondary node is associated with the primary node and hosts a replica of the database hosted by the primary node;
replicating, from the primary node, executed write operations to secondary nodes associated with the primary node;
communicating, via a normal database operation, heartbeat information as metadata within a write operation function; and
automatically recovering the primary node role in the distributed database system in response to a detected failure of the primary node by an absence of the heartbeat information.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for determining consensus within a distributed database are provided. According to one aspect, a protocol is provided that reduces or eliminates heartbeat communication between nodes of a replica set. Nodes may communicate liveness information using existing database commands and metadata associated with the database commands. According to another aspect, improved systems and methods are provided for detection of node failures and election of a new primary node.
284 Citations
30 Claims
-
1. A computer-implemented method for maintaining consensus in a distributed database system comprising a plurality of nodes, the method comprising:
-
establishing a primary node having a primary node role within the distributed database system and the primary node hosting a database, wherein the distributed database system provides one or more responses to database requests from one or more client computer systems; establishing a plurality of secondary nodes having a secondary node role, wherein each secondary node is associated with the primary node and hosts a replica of the database hosted by the primary node; replicating, from the primary node, executed write operations to secondary nodes associated with the primary node; communicating, via a normal database operation, heartbeat information as metadata within a write operation function; and automatically recovering the primary node role in the distributed database system in response to a detected failure of the primary node by an absence of the heartbeat information. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A system for maintaining consensus in a distributed database system comprising a plurality of nodes, the system comprising:
at least two processors configured to; establish a primary node having a primary node role within the distributed database system and the primary node hosting a database, wherein the distributed database system provides one or more responses to one or more database requests from one or more client computer systems; establish a plurality of secondary nodes having a secondary node role, wherein each secondary node is associated with the primary node and hosts a replica of the database hosted by the primary node; replicate, from the primary node, executed write operations to the plurality of secondary nodes; communicate, via a normal database operation, heartbeat information to the plurality of secondary nodes as metadata within a write operation function; and automatically recover the primary node role in the distributed database system in response to a detected failure of the primary node by an absence of the heartbeat information. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)
Specification