# US 2017/0286516 A1 · Systems and methods for managing distributed database deployments

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

- Number: US 2017/0286516 A1
- Document ID: US20170286516A1
- Status: Published application
- Kind: A1
- Application number: 15/627,631
- Filed: 2017-06-20
- Published: 2017-10-05
- Earliest claimed: 2010-12-23
- Assignees: MongoDB, Inc.
- Inventors: Eliot Horowitz; Cory P. Mintz; Cailin Anne Nelson; Akshay Kumar
- Web page: https://patentgrep.com/patent/US20170286516A1

## CPC

- G06F 16/273: {Asynchronous replication or reconciliation}
- G06F 11/14: Error detection or correction of the data by redundancy in operations (error detection or correction of the data by redundancy in hardware G06F11/16)
- G06F 11/1458: {Management of the backup or restore process}
- G06F 11/3006: {where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems (multiprogramming arrangements G06F9/46; allocation of resources G06F9/50)}
- G06F 11/34: Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation {; Recording or statistical evaluation of user activity, e.g. usability assessment}
- G06F 11/3433: {for load management (allocation of a server based on load conditions G06F9/505; load rebalancing G06F9/5083; redistributing the load in a network by a load balancer H04L67/1029)}
- G06F 11/3452: {Performance evaluation by statistical analysis}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 2201/80: Database-specific techniques
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Various aspects provide for implementation of a cloud service for running, monitoring, and maintaining cloud distributed database deployments and in particular examples, provides cloud based services to run, monitor and maintain deployments of the known MongoDB database. Various embodiments provide services, interfaces, and manage provisioning of dedicated servers for the distributed database instances (e.g., MongoDB instances). Further aspects, including providing a database as a cloud service that eliminates the design challenges associated with many distributed database implementations, while allowing the client's input on configuration choices in building the database. In some implementations, clients can simply identity a number of database nodes, capability of the nodes, and within minutes have a fully functioning, scalable, replicated, and secure distributed database in the cloud.

## Claims

### Claim 1

A cloud distributed database system, the system comprising:
at least one cloud based resource, the at least one cloud based resource including processor and memory;
a database subsystem executing on the at least one cloud based resource, wherein the database subsystem comprises:
at least one replica set including a primary node hosting a primary database instance that accepts database write operations from client systems, and at least two secondary nodes that host copies of data of the primary database instance that replicate logged operations from the primary node;
a connection manager configured to control authentication of the client systems based on connection strings communicated from the client systems connecting to the at least one cloud resources;
wherein the database subsystem is configured to accept database operations including write and read commands from client systems connected to the database subsystem, and provide a result to the client from matching records in the database stored in the replica set responsive to client communicated database operations; and
a monitoring component, executing on the at least one cloud based resource, configured to:
communicate performance metrics for cloud resource utilization by the distributed database to a central management server;
communicate performance metrics for database operation and
wherein the database subsystem is further configured to accept optimization information from the central management server based on analysis of the performance metrics for cloud resource utilization and the performance metrics for database operation by the central management server.

### Claim 2 (depends on 1)

The system of claim 1, wherein the monitoring component further comprises at least one monitor agent executed on instantiated cloud resources configured to collect the performance metrics for cloud resource utilization.

### Claim 3 (depends on 2)

The system of claim 2, wherein the monitoring component further comprising at least one monitor agent executing on database application components configured to collect the performance metrics for database operation.

### Claim 4 (depends on 1)

The system of claim 1, wherein the database subsystem further comprises:
a plurality of replica sets, wherein the database data is partition across the plurality of replica sets;
a routing component configured to route client data requests to respective replica sets based on configuration metadata for the database data; and
a configuration sever configured to store configuration metadata specifying location of database ranges.

### Claim 5 (depends on 4)

The system of claim 4, wherein, the connection manager is configured to manage database connections from the client to the routing component.

### Claim 6 (depends on 1)

The system of claim 1, further comprising an automation component executed on the at least one cloud resource configured to automatically execute optimization information from the central management server.

### Claim 7 (depends on 6)

The system of claim 6, wherein the automation component is configured to automatically provision additional database components hosted on cloud resources responsive to optimization information.

### Claim 8 (depends on 7)

The system of claim 7, wherein the automation component is configured to:
provision a new secondary node in the at least one replica set and trigger an initial synchronization with at least one of the at least two secondary nodes to provide a copy of the data of the primary node's database;
update configuration information for the at least one replica set; and
trigger replication of logged operations on the primary node to the new secondary node.

### Claim 9 (depends on 1)

The system of claim 1, further comprising;
a snapshot component, executed on the at least one cloud resource, configured to:
generate a plurality of snapshots of data stored in the at least one replica set; and
identify a committed snapshot from the plurality of snapshots that is representative of data that has been replicated on a majority of members of the at least one replica set; and
a command processing component configured to read the committed snapshot responsive specification of a read commit option in a client request and generate the result of data matching the read request using the committed snapshot.

### Claim 10 (depends on 9)

The system of claim 9, wherein the snapshot component is further configured to identify a new committed snapshot responsive to receipt of at least one confirmation from the at least two secondary nodes.

### Claim 11 (depends on 9)

The system of claim 9, wherein the command processing component is configured identify a data storage node from the at least one replica set having data consistent with the committed snapshot and execute a read commit operations from the identified data storage node.

### Claim 12 (depends on 1)

The system of claim 1, wherein the at least one replica set is configured to:
communicate, via a normal database operation, heartbeat information as metadata within a write operation function; and
automatically recover a primary node in the distributed database system in response to a detected failure of the primary node by an absence of the heartbeat information.

### Claim 13

A computer implemented method for managing a distributed database on cloud resources, the method comprising:
executing a database subsystem on at least one cloud based resource having memory and processor, wherein the database subsystem comprises at least one replica set including a primary node hosting a primary database instance, and at least two secondary nodes that host copies of data of the primary database instance;
executing, by the database subsystem, write operations at the primary database instance and replicating the write operations to the at least two secondary nodes;
managing, by the database subsystem, authentication of client systems based on connection strings communicated from the client systems connecting to the at least one cloud resource and accepting database operations including write and read commands from client systems connected to the database subsystem;
communicating, by the database subsystem, a result to the client from the database stored in the at least one replica set responsive to the client communicated operations (e.g., default operation is configured to read and write from the primary node, client commands are executed by the replica set to resolve data operations against secondary nodes when specified);
communicating, by a monitoring component executed on the at least one cloud based resource, performance metrics for cloud resource utilization by the distributed database (e.g., utilization of the cloud resources to a central management server;
communicating, by the monitoring component, performance metrics for database operation; and
accepting, by the database subsystem, optimization information from the central management server based on analysis of the performance metrics for cloud resource utilization and the performance metrics for database operation by the central management server.

### Claim 14 (depends on 13)

The method of claim 13, wherein the method further comprises executing a monitoring component on instantiated cloud resources.

### Claim 15 (depends on 14)

The method of claim 14, wherein the method further comprises executing a monitoring component on a plurality of database application components.

### Claim 16 (depends on 13)

The method of claim 13, wherein the method further comprises:
partitioning the database data across a plurality of replica sets;
routing client data requests, by a routing component, to respective replica sets based on configuration metadata for the database data; and
storing on a configuration sever configuration metadata specifying location of database ranges.

### Claim 17 (depends on 16)

The method of claim 16, wherein the method further comprises managing database connections from the client to the routing component by a connection manager.

### Claim 18 (depends on 13)

The method of claim 13, wherein the method further comprises executing, automatically optimization information from the central management server by an automation component executed on the at least one cloud resource.

### Claim 19 (depends on 18)

The method of claim 18, wherein the method further comprises automatically provisioning additional database components hosted on cloud resources responsive to optimization information.

### Claim 20 (depends on 19)

The method of claim 19, wherein the method further comprises:
provisioning, by the automation component, a new secondary node in the at least one replica set and triggering an initial synchronization with at least one of the at least two secondary nodes to provide a copy of the primary node's database;
updating configuration information for the at least one replica set; and
triggering replication of logged operations on the primary node to the new secondary node responsive to the updated configuration information.

### Claim 21 (depends on 13)

The method of claim 13, the method further comprising:
generating, by the snapshot component, a plurality of snapshots of data stored in the at least one replica set; and
identifying, by the snapshot component, a committed snapshot from the plurality of snapshots that is representative of data that has been replicated on a majority of members of the at least one replica set; and
controlling read operations to access the committed snapshot responsive specification of a read commit option in a client request and generating the result of data matching the read request using the committed snapshot.

### Claim 22 (depends on 21)

The method of claim 21, further comprising identifying, by the snapshot component, a new committed snapshot responsive to receipt of at least one confirmation from the at least two secondary nodes.

### Claim 23 (depends on 21)

The method of claim 21, further comprising identifying a data storage node from the at least one replica set having data consistent with the committed snapshot and execute a read commit operations from the identified data storage node.

### Claim 24 (depends on 1)

The method of claim 1, further comprising:
communicating, via a normal database operation, heartbeat information as metadata within a write operation function; and
recovering, automatically, a primary node in the distributed database system in response to a detected failure of the primary node by an absence of the heartbeat information.
