# US 12,762,150 B2 · High availability with consensus in database systems

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,762,150 B2
- Document ID: US12762150B2
- Status: Granted
- Kind: B2
- Application number: 19/020,829
- Filed: 2025-01-14
- Published: 2025-05-15
- Granted: 2026-10-13
- Earliest claimed: 2023-01-31
- Assignees: SingleStore, Inc.
- Applicants: Singlestore, Inc.
- Inventors: Rodrigo Toste Gomes; Adrian Birka; Joseph Victor; Tiago Vale; Adam Prout
- Web page: https://patentgrep.com/patent/US12762150B2

## CPC

- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06F 16/21: Design, administration or maintenance of databases
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 16/256: {in federated or virtual databases}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A database management system configured to perform a computer-implemented method is provided. The method involves operating a database management system with two sets of nodes. The first set of nodes is responsible for maintaining system configuration data using a consensus-based replication protocol, while the second set of nodes stores user data and replicates it using a non-consensus-based protocol. The method involves configuring the first set of nodes to determine the system's state, generate and replicate system configuration data, and provide it to the second set of nodes. This includes writing an indication of a target configuration for the second set of nodes to the system configuration data. The second set of nodes then modifies its configuration according to this data. A non-transitory computer-readable storage medium comprising instructions for performing the computer-implemented method is provided.

## Claims

### Claim 1

A computer-implemented method for operating a database management system comprising a first set of nodes for maintaining system configuration data and a second set of nodes for storing user data, the second set of nodes being separate from the first set of nodes, the method comprising:
configuring the first set of nodes of the database management system to:
determine an instantaneous state of the database management system;
in response to determining the instantaneous state, generate system configuration data using a consensus-based replication protocol to maintain the system configuration data in the first set of nodes by:
writing an indication of a target configuration of the second set of nodes to system configuration data; and
replicating the system configuration data amongst the first set of nodes using the consensus-based replication protocol; and
provide the system configuration data to the second set of nodes of the database management system; and
configuring the second set of nodes to:
store local configuration data representing the configuration of the second set of nodes;
receive the system configuration data from the first set of nodes; and
implement a state machine that is arranged to modify a configuration of the second set of nodes according to the system configuration data by:
processing the system configuration data using the state machine to identify one or more differences between the local configuration data and the system configuration data; and
modifying the local configuration data according to the one or more differences,
wherein the second set of nodes are arranged to replicate user data according to a non-consensus-based replication protocol by which a first node of the second set of nodes can commit a transaction on user data prior to replicating the committed transaction to a second node of the second set of nodes.

### Claim 2 (depends on 1)

The computer-implemented method according to claim 1, wherein each node of the second set of nodes implements a respective state machine that is arranged to modify the configuration of a respective node of the second set of nodes according to the system configuration data.

### Claim 3 (depends on 1)

The computer-implemented method according to claim 1, wherein the second set of nodes comprises the first node on which a primary replica of the user data is stored and the second node on which a secondary replica of the user data is stored, wherein the instantaneous state of the database management system is a change in communication state of the first node of the second set of nodes, and wherein the target configuration comprises:
a selection of the second node of the second set of nodes to store the primary replica of the user data; and
a demotion of the first node of the second set of nodes to storing the secondary replica of the user data.

### Claim 4 (depends on 3)

The computer-implemented method according to claim 3, wherein the change in communication state of the first node of the second set of nodes comprises a change in latency of communication with the first node of the second set of nodes.

### Claim 5 (depends on 3)

The computer-implemented method according to claim 3, wherein the change in communication state of the first node of the second set of nodes comprises a failure in communication of the first node of the second set of nodes.

### Claim 6 (depends on 1)

The computer-implemented method according to claim 1, wherein the second set of nodes comprise the first node on which a primary replica of the user data is stored, the second node on which a secondary replica of the user data is stored, and a third node on which the user data is not stored, wherein the instantaneous state of the database management system is a change in communication state of the second node of the second set of nodes, and wherein the target configuration comprises:
a selection of the third node of the second set of nodes to store the primary replica of the user data; and
a demotion of the second node of the second set of nodes to not storing the secondary replica of the user data.

### Claim 7 (depends on 6)

The computer-implemented method according to claim 6, wherein the change in communication state of the second node of the second set of nodes comprises a change in latency of communication with the second node of the second set of nodes.

### Claim 8 (depends on 6)

The computer-implemented method according to claim 6, wherein the change in communication state of the second node of the second set of nodes comprises a change in a synchronization state of the secondary replica stored on the second node.

### Claim 9 (depends on 6)

The computer-implemented method according to claim 6, wherein the change in communication state of the second node of the second set of nodes comprises a failure in communication of the second node of the second set of nodes.

### Claim 10 (depends on 1)

The computer-implemented method according to claim 1, wherein the second set of nodes comprises the first node on which a primary replica of the user data is stored, the second node on which a secondary replica of the user data is stored, and a third node on which the user data is not stored, and wherein configuring the first set of nodes of the database management system to determine the instantaneous state of the database management system comprises configuring the first set of nodes to:
receive a request to implement a workload, the workload comprising a plurality of operations to be performed on the user data;
determine that a computational capacity of the first node is insufficient for performing the plurality of operations; and
determine that a computational capacity of the third node is sufficient for performing the plurality of operations, and
wherein the target configuration comprises:
a selection of the third node to store the primary replica of the user data for implementing the workload; and
a demotion of the first node to not storing the primary replica of the user data.

### Claim 11 (depends on 1)

The computer-implemented method of claim 1, wherein the second set of nodes comprises the first node on which a primary replica of the user data is stored and the second node on which a secondary replica of the user data is stored, wherein configuring the first set of nodes of the database management system to determine the instantaneous state of the database management system comprises configuring the first set of nodes to receive a request to add a third node to the second set of nodes, and wherein the target configuration comprises a selection of the third node of the second set of nodes to store:
the primary replica of the user data;
the secondary replica of the user data; or
an additional secondary replica of the user data.

### Claim 12 (depends on 1)

The computer-implemented method of claim 1, wherein second set of nodes comprises the first node on which a primary replica of a first partition of the user data is stored, the second node on which a secondary replica of the first partition of the user data is stored, wherein configuring the first set of nodes of the database management system to determine the instantaneous state comprises configuring the first set of nodes to receive a request to generate a second partition of the user data, and wherein the target configuration comprises:
a selection of a node of the second set of nodes to store a primary replica of the second partition of the user data; and
a selection of a different node of the second set of nodes to store a secondary replica of the second partition of the user data.

### Claim 13 (depends on 1)

The computer-implemented method for operating a database management system according to claim 1, wherein the first set of nodes comprises a master node, configured to generate the system configuration data, and two or more coordinator nodes configured to replicate the system configuration data according to the consensus-based replication protocol, and wherein generating the system configuration data includes:
the master node generating a write request to modify the system configuration data based on the instantaneous state;
processing the request using two or more coordinator nodes to replicate the write request from the master node to the two or more coordinator nodes; and
at least one of:
if at least half of the coordinator nodes successfully replicate the write request from the master node to the at least half of the coordinator nodes, modifying the system configuration data according to the write request; or
if at least half of the coordinator nodes do not successfully replicate the write request from the master node to the at least half of the coordinator nodes, rejecting the write request.

### Claim 14 (depends on 13)

The computer-implemented method for operating a database management system according to claim 13, wherein the coordinator nodes are synchronous coordinator nodes and the first set of nodes further comprises one or more asynchronous coordinator nodes each storing a replica of the system configuration data, and for which their respective replica is out of synchronization with replicas of the system configuration data stored in the two or more synchronous coordinator nodes and wherein the first set of nodes are configured to:
monitor a synchronization state of the one or more asynchronous coordinator nodes; and
if a given asynchronous coordinator node obtains synchronization with the synchronous coordinator nodes, promote the given asynchronous coordinator node to be a synchronous coordinator node.

### Claim 15 (depends on 1)

The computer-implemented method for operating a database management system according to claim 1, wherein the user data is stored in the database management system as a primary replica and a secondary replica, wherein operations to be performed on the user data are performed on the primary replica and subsequently replicated to the secondary replica, and wherein configuring the first set of nodes of the database management system to determine the instantaneous state of the database management system includes configuring the first set of nodes to receive state information from one or more of the second set of nodes, wherein the state information includes at least one of the following:
an indication of which of the second set of nodes includes the primary replica of the user data;
an indication of which of the second set of nodes includes the secondary replica of the user data;
for the nodes of the second set of nodes that include the secondary replica of the user data, a synchronization state for the secondary replica of the user data; and
an indication of which of the second set of nodes are currently in communication with at least one other node of the second set of nodes.

### Claim 16 (depends on 15)

The computer-implemented method for operating a database management system according to claim 15, wherein the user data is segmented into two or more partitions, each partition having a primary replica and a secondary replica, and wherein:
the indication of which of the second set of nodes includes the primary replica of the user data is provided for each partition;
the indication of which of the second set of nodes includes the secondary replica of the user data is provided for each partition; and
the synchronization state of the secondary replica of the user data is provided for each partition.

### Claim 17 (depends on 1)

The computer-implemented method for operating a database management system according to claim 1, wherein modifying the local configuration data according to the one or more differences causes the second set of nodes to perform a predetermined action, the predetermined action including at least one of the following:
causing a first node in the second set of nodes to replicate the user data to a second node in the second set of nodes; or
selecting a given node of the second set of nodes to store a primary replica of the user data.

### Claim 18

A database management system comprising:
a first set of nodes for maintaining system configuration data;
a second set of nodes for storing user data, the second nodes being separate from the first set of nodes;
at least one processor; and
at least one memory, the memory including computer-executable instructions that, when executed by the at least one processor, cause the processor to:
configure the first set of nodes of the database management system to:
determine an instantaneous state of the database management system;
in response to determining the instantaneous state, generate system configuration data using a consensus-based replication protocol to maintain the system configuration data in the first set of nodes by:
writing an indication of a target configuration of the second set of nodes to system configuration data; and
replicating the system configuration data amongst the first set of nodes using the consensus-based replication protocol; and
provide the system configuration data to the second set of nodes of the database management system; and
configure the second set of nodes to:
store local configuration data representing the configuration of the second set of nodes;
receive the system configuration data from the first set of nodes; and
implement a state machine that is arranged to modify a configuration of the second set of nodes according to the system configuration data by:
processing the system configuration data using the state machine to identify one or more differences between the local configuration data and the system configuration data; and
modifying the local configuration data according to the one or more differences,
wherein the second set of nodes are arranged to replicate user data according to a non-consensus-based replication protocol by which a first node of the second set of nodes can commit a transaction on user data prior to replicating the committed transaction to a second node of the second set of nodes.

### Claim 19

A non-transitory computer-readable storage medium comprising computer-executable instructions that, when executed by at least one processor, cause the at least one processor to:
configure a first set of nodes for maintaining system configuration data of the database management system to:
determine an instantaneous state of the database management system;
in response to determining the instantaneous state, generate system configuration data using a consensus-based replication protocol to maintain the system configuration data in the first set of nodes by:
writing an indication of a target configuration of a second set of nodes to system configuration data, the second set of nodes storing user data and being separate from the first set of nodes; and
replicating the system configuration data amongst the first set of nodes using the consensus-based replication protocol; and
provide the system configuration data to the second set of nodes of the database management system; and
configure the second set of nodes to:
store local configuration data representing the configuration of the second set of nodes;
receive the system configuration data from the first set of nodes; and
implement a state machine that is arranged to modify a configuration of the second set of nodes according to the system configuration data by:
processing the system configuration data using the state machine to identify one or more differences between the local configuration data and the system configuration data; and
modifying the local configuration data according to the one or more differences,
wherein the second set of nodes are arranged to replicate user data according to a non-consensus-based replication protocol by which a first node of the second set of nodes can commit a transaction on user data prior to replicating the committed transaction to a second node of the second set of nodes.
