# US 11,907,258 B2 · Distributed database configuration

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

- Number: US 11,907,258 B2
- Document ID: US11907258B2
- Status: Granted
- Kind: B2
- Application number: 18/090,453
- Filed: 2022-12-28
- Published: 2023-05-04
- Granted: 2024-02-20
- Earliest claimed: 2015-07-02
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Alexander Shraer; Artyom Sharov; Arif Abdulhusein Merchant; Brian F. Cooper
- Web page: https://patentgrep.com/patent/US11907258B2

## CPC

- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/25: Integrating or interfacing systems involving database management systems
- G06F 16/955: using information identifiers, e.g. uniform resource locators [URL]
- H04L 67/1023: based on a hash applied to IP addresses or costs
- H04L 67/1025: Dynamic adaptation of the criteria on which the server selection is based
- H04L 67/1097: for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
- H04L 67/52: specially adapted for the location of the user terminal
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Replicas are selected in a large distributed network, and the roles for these replicas are identified. In one example, a leader is selected from among candidate computing clusters. To make this selection, an activity monitor predicts or monitors the workload of one or more clients. Different activities of the workload are given corresponding weights. The delay in performing requested activities, modified by these weights is found, and the candidate leader with the lowest weighted delay is selected as the leader.

## Claims

### Claim 1

A computer-implemented method executed by data processing hardware that causes the data processing hardware to perform operations comprising:
receiving historic data corresponding to a plurality of computing clusters, the historic data comprising past workload data;
predicting, based on the historic data, a future workload for the plurality of the computing clusters;
selecting, based on the future workload, a leader computing cluster from the plurality of the computing clusters, the leader computing cluster of the plurality of the computing clusters executing a distributed database, the leader computing cluster responsible for proposing operations for the plurality of the computing clusters to perform on the distributed database;
monitoring interactions between a client application and the distributed database;
generating workload data representative of the interactions between the client application and the distributed database;
determining, based on the workload data, that a different computing cluster of the plurality of the computing clusters has less communication delay than the leader computing cluster; and
assigning, based on determining that the different computing cluster has less communication delay than the leader computing cluster, the different computing cluster as a new leader computing cluster.

### Claim 2 (depends on 1)

The method of claim 1, wherein the distributed database comprises one or more voters that are configured to accept or deny the proposed operations of the leader.

### Claim 3 (depends on 2)

The method of claim 2, wherein the distributed database comprises one or more replicas that replicate at least a portion of the distributed database.

### Claim 4 (depends on 1)

The method of claim 1, wherein the operations further comprise, for each computing cluster:
determining, based on the workload data, the communication delay of the respective computing cluster in the interactions with the client application;
identifying a frequency for each interaction;
identifying a latency value for each interaction; and
determining a weighted latency value based on the frequency and latency value of each interaction between the client application and the respective computing cluster.

### Claim 5 (depends on 4)

The method of claim 4, wherein determining that the different computing cluster of the plurality of the computing clusters has less communication delay than the leader computing cluster is based on the weighted latency.

### Claim 6 (depends on 1)

The method of claim 1, wherein the client application is one of the computing clusters of the plurality of computing clusters.

### Claim 7

A computer-implemented method executed by data processing hardware that causes the data processing hardware to perform operations comprising:
selecting a leader computing cluster from a plurality of the computing clusters, the leader computing cluster of the plurality of the computing clusters executing a distributed database, the leader computing cluster responsible for proposing operations for the plurality of the computing clusters to perform on the distributed database, the distributed database comprising one or more voters that are configured to accept or deny the proposed operations of the leader;
monitoring interactions between a client application and the distributed database;
generating workload data representative of the interactions between the client application and the distributed database;
determining, based on the workload data, that a different computing cluster of the plurality of the computing clusters has less communication delay than the leader computing cluster;
assigning, based on determining that the different computing cluster has less communication delay than the leader computing cluster, the different computing cluster as a new leader computing cluster; and
in response to assigning the different computing cluster as the new leader computing cluster, assigning one or more new voters for the distributed database.

### Claim 8 (depends on 7)

The method of claim 7, wherein a quantity of the one or more new voters is equal in number to a quantity of the one or more voters.

### Claim 9 (depends on 7)

The method of claim 7, wherein:
the distributed database comprises one or more replicas that replicate at least a portion of the distributed database;
in response to assigning the different computing cluster as the new leader computing cluster, assigning one or more new replicas for the distributed database; and
a quantity of the one or more new replicas is equal in number to a quantity of the one or more replicas.

### Claim 10

A system comprising:
data processing hardware; and
memory hardware in communication with the data processing hardware, the memory hardware storing instructions that when executed on the data processing hardware cause the data processing hardware to perform operations comprising:
receiving historic data corresponding to a plurality of computing clusters;
predicting, based on the historic data, a future workload for the plurality of the computing clusters;
selecting, based on the future workload, a leader computing cluster from the plurality of the computing clusters, the leader computing cluster one of the plurality of the computing clusters executing a distributed database, the leader computing cluster responsible for proposing operations for the plurality of the computing clusters to perform on the distributed database;
monitoring interactions between a client application and the distributed database;
generating workload data representative of the interactions between the client application and the distributed database;
determining, based on the workload data, that a different computing cluster of the plurality of the computing clusters has less communication delay than the leader computing cluster; and
assigning, based on determining that the different computing cluster has less communication delay than the leader computing cluster, the different computing cluster as a new leader computing cluster.

### Claim 11 (depends on 10)

The system of claim 10, wherein the distributed database comprises one or more voters that are configured to accept or deny the proposed operations of the leader.

### Claim 12 (depends on 11)

The system of claim 11, wherein the distributed database comprises one or more replicas that replicate at least a portion of the distributed database.

### Claim 13 (depends on 10)

The system of claim 10, wherein the operations further comprise, for each computing cluster:
determining, based on the workload data, the communication delay of the respective computing cluster in the interactions with the client application;
identifying a frequency for each interaction;
identifying a latency value for each interaction; and
determining a weighted latency value based on the frequency and latency value of each interaction between the client application and the respective computing cluster.

### Claim 14 (depends on 13)

The system of claim 13, wherein determining that the different computing cluster of the plurality of the computing clusters has less communication delay than the leader computing cluster is based on the weighted latency.

### Claim 15 (depends on 10)

The system of claim 10, wherein the client application is one of the computing clusters of the plurality of computing clusters.

### Claim 16

A system comprising:
data processing hardware; and
memory hardware in communication with the data processing hardware, the memory hardware storing instructions that when executed on the data processing hardware cause the data processing hardware to perform operations comprising:
selecting a leader computing cluster from a plurality of the computing clusters, the leader computing cluster of the plurality of the computing clusters executing a distributed database, the leader computing cluster responsible for proposing operations for the plurality of the computing clusters to perform on the distributed database, the distributed database comprising one or more voters that are configured to accept or deny the proposed operations of the leader;
monitoring interactions between a client application and the distributed database;
generating workload data representative of the interactions between the client application and the distributed database;
determining, based on the workload data, that a different computing cluster of the plurality of the computing clusters has less communication delay than the leader computing cluster;
assigning, based on determining that the different computing cluster has less communication delay than the leader computing cluster, the different computing cluster as a new leader computing cluster; and
in response to assigning the different computing cluster as the new leader computing cluster, assigning one or more new voters for the distributed database.

### Claim 17 (depends on 16)

The system of claim 16, wherein a quantity of the one or more new voters is equal in number to a quantity of the one or more voters.

### Claim 18 (depends on 16)

The system of claim 16, wherein:
the distributed database comprises one or more replicas that replicate at least a portion of the distributed database;
in response to assigning the different computing cluster as the new leader computing cluster, assigning one or more new replicas for the distributed database; and
a quantity of the one or more new replicas is equal in number to a quantity of the one or more replicas.
