IP Library Granted Patent US 10,740,355
Granted Patent B2
US 10,740,355 · App. 15/654,590 · Granted Aug 11, 2020

System and method for optimizing data migration in a partitioned database

Inventors: Eliot Horowitz (New York, NY); Dwight Merriman (New York, NY)
Assignee: MongoDB, Inc.
G06F16/278
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,740,355
App. No.
15/654,590
Granted
Aug 11, 2020
Kind
B2
Abstract

According to one aspect, provided is a horizontally scaled database architecture. Partition a database enables efficient distribution of data across a number of systems reducing processing costs associated with multiple machines. According to some aspects, the partitioned database can be managed as a single source interface to handle client requests. Further, it is realized that by identifying and testing key properties, horizontal scaling architectures can be implemented and operated with minimal overhead. In one embodiment, databases can be partitioned in an order preserving manner such that the overhead associated with moving the data for a given partition can be minimized during management of the data and/or database. In one embodiment, splits and migrations operations prioritize zero cost partitions, thereby, reducing computational burden associated with managing a partitioned database.

Claims (42)

1. A system for optimizing data distribution, the system comprising:

at least one processor operatively connected to a memory for executing system components;

a database comprising a plurality of database partitions for storing database data, wherein at least one of the plurality of database partitions includes a contiguous range of data from the database; and

a partition component configured to:

detect a partition size for at least one of the plurality of database partitions that exceeds a size threshold;

split the database partition that exceeds a storage size threshold into at least a first and a second partition;

control, during splitting, a distribution of original data stored in the at least one of the plurality of database partitions that exceed the size threshold to the first and the second partition, wherein controlling the distribution includes minimizing any data distributed to the second partition and maximizing data distributed to the first partition, and

wherein the partition component is further configured to identify database partitions having an increasing database key or portion of a database key.

2. The system according to claim 1 , wherein the partition component is further configured to:

assign at least any data in the at least one of the plurality of database partitions having associated database key values less than the maximum value to the first partition; and

assign at least any data in the at least one of the plurality of database partitions having database key values greater that the maximum value to the second partition.

3. The system according to claim 1 , wherein the partition component is configured to use default splitting operations rather than minimizing any data distributed to the second partition and maximizing data distributed to the first partition, where keys or key patterns are not increasing.

4. The system according to claim 1 , further comprising a migration component configured to migrate database partitions between a plurality of servers configured to host the database partitions.

5. The system according to claim 1 , further comprising a rebalancing component configured to determine a state of the database based on a distribution of the plurality of partitions across the plurality of servers, wherein the rebalancing component is further configured to migrate at least one partition in response to the state indicating an imbalanced distribution of partitions.

6. The system according to claim 1 , further comprising a routing component configured to route database requests to identified partitions, wherein the routing component is further configured to identify partitions based, at least, on key values or key patterns associated with the data requests.

7. The system according to claim 3 , further comprising a configuration component configured to manage metadata information associated with each of the plurality of partitions, the metadata information including a defined range of key values or key patterns associated with each partition.

8. The system according to claim 7 , wherein the configuration component is further configured to replicate the metadata across any routing component of the system.

9. The system according to claim 8 , wherein the configuration component is further configured to update the metadata information in response to the partition component splitting the at least one of the plurality of database partitions into at least the first and the second partition.

10. The system according to claim 3 , further comprising a reconciliation component configured to log database operations received on partitions during at least one of a migration operation and a splitting operation, wherein the reconciliation component is further configured to update at least one partition in response to the completion of a respective migration and splitting operation.

11. A computer implemented method for optimizing data distribution, the method comprising acts of:

monitoring, by a computer system, a distributed database including a plurality of database partitions for storing database data, wherein at least one of the plurality of database partitions includes a contiguous range of data from the database;

detecting, by the computer system, a partition size of the at least one of the plurality of database partitions exceeds a size threshold;

splitting, by the computer system, the at least one of the plurality of database partitions that exceeds a storage size into at least a first and a second partition;

identifying an increasing database key or key pattern;

responsive to the identification of the increasing database key or key pattern, controlling, by the computer system, a distribution of original data stored in the at least one of the plurality of database partitions that exceed the size threshold within the first and the second partition based on a value for a database key associated with the data in the at least one of the plurality of database partitions, wherein controlling the distribution includes minimizing any data distributed to the second partition and maximizing data distributed to the first partition.

12. The method according to claim 11 , wherein the act of minimizing any data distributed to the second partition includes acts of:

assigning at least any data in the at least one of the plurality of database partitions having database key values less than the maximum value to the first partition; and

assigning at least any data in the at least one of the plurality of database partitions having database key values greater that the maximum value to the second partition.

13. The method according to claim 12 , wherein the method further comprises hosting the distributed database on a plurality of servers, wherein the act of hosting the distributed database includes hosting the plurality of database partitions on the plurality of servers.

14. The method according to claim 12 , further comprising an act of migrating database partitions between the plurality of servers.

15. The method according to claim 12 , further comprising an act of routing database requests to identified partitions, wherein the act of routing includes identifying partitions based, at least, on key values or key patterns associated with the data request.

16. The method according to claim 12 , further comprising an act of managing metadata information associated with each of the plurality of partitions, wherein the metadata information includes a defined range of key values or key patterns associated with the data contained in each partition.

17. The method according to claim 16 , further comprising an act of updating the metadata information in response to splitting the at least one of the plurality of database partitions into at least the first and the second partition.

18. The method according to claim 12 , further comprising acts of:

logging database operations received during at least one of a migration operation and a splitting operation;

reconciling at least one partition after completing the at least one of the migration operation and the splitting operation, wherein the act of reconciling includes an act of executing the logged database operations.

19. A computer-readable storage medium having computer-readable instructions that, as a result of being executed by a computer, instruct the computer to perform a method for optimizing data distribution, the method comprising acts of:

monitoring a distributed database including a plurality of database partitions for storing database data, wherein at least one of the plurality of database partitions includes a contiguous range of data from the database;

detecting a partition size of the at least one of the plurality of database partitions exceeds a size threshold;

splitting the at least one of the plurality of database partitions into at least a first and a second partition;

controlling a distribution of data within the first and the second partition, wherein controlling the distribution includes minimizing any data distributed to the second partition and maximizing data distributed to the first partition, and

wherein the partition component is further configured to identify database partitions having an increasing database key or portion of a database key.

Assignments (3)
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE NAME PREVIOUSLY RECORDED ON REEL 052701 FRAME 0438. ASSIGNOR(S) HEREBY CONFIRMS THE NAME 10GEN SHOULD BE CORRECTED TO READ 10GEN, INC.. Recorded Jan 25, 2021
From: HOROWITZ, ELIOT; MERRIMAN, DWIGHT
To: 10GEN, INC.
Reel/Frame 055091/0661 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 19, 2020
From: HOROWITZ, ELIOT; MERRIMAN, DWIGHT
To: 10GEN
Reel/Frame 052701/0438 →
CHANGE OF NAME Recorded May 19, 2020
From: 10GEN, INC.
To: MONGODB, INC.
Reel/Frame 052704/0936 →
Continuity (2)
Continuation 13078104 · Apr 1, 2011
Related Publication 20170322996A1 · Nov 9, 2017
Cited By (3)
US 12,373,456 US 12,647,481 US 12,717,814