IP Library Granted Patent US 10,977,277
Granted Patent B2
US 10,977,277 · App. 16/013,725 · Granted Apr 13, 2021

Systems and methods for database zone sharding and API integration

Inventors: Dwight Merriman (New York, NY); Eliot Horowitz (New York, NY); Cory P. Mintz (Millstone Township, NJ); Cailin Anne Nelson (Boulder, CO); Akshay Kumar (New York, NY); David Lenox Storch (Brooklyn, NY); Charles William Swanson (New York, NY); Keith Bostic (Lincoln, MA); Michael Cahill (Summer Hill, AU); Dan Pasette (Brooklyn, NY); Mathias Benjamin Stearn (New York, NY); Geert Bosch (Brooklyn, NY)
Assignee: MongoDB, Inc.
G06F16/278H04L67/1097
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,977,277
App. No.
16/013,725
Granted
Apr 13, 2021
Kind
B2
Abstract

Systems and methods are provided to enable control and placement of data repositories. In some embodiments, the system segments data into zones. A website, for example, may need to segment data according to location. In this example, a zone may be created for North America and another zone may be created for Europe. Data related to operations executed in North America, for example, can be placed in the North America zone and data related to transactions in Europe can be placed in the Europe zone. According to some embodiments, the system may use zones to accommodate a range of deployment scenarios.

Claims (87)

1. A database management system comprising:

a distributed database comprising a plurality of shards storing a plurality of data items;

at least one processor configured to:

determine a first range of shard key values;

analyze operations on the distributed database and select a target shard to optimize a system hosting the target shard or portion of the target shard for storage of data associated with the first range of shard key values;

map the first range of shard key values to the target shard or the portion of the target shard;

route a first data item to the target shard or the portion of the target shard, wherein the act of routing comprises:

mapping the first data item to the first range of shard key values; and

responsive to the mapping, storing the first data item in the target shard or the portion of the target shard.

2. The database system of claim 1 , further comprising a first datacenter and a second datacenter and the at least one processor is configured to:

host a first node of the target shard or the portion of the target shard on the first datacenter; and

host a second node of the target shard or the portion of the target shard on the second datacenter.

3. The database system of claim 2 , wherein the at least one processor is configured to:

route an operation to the first node when the first datacenter is operational; and

route the operation to the second node when the first datacenter is not operational.

4. The database system of claim 2 , wherein:

the first datacenter is located in a first geographic region and the second datacenter is located in a second geographic region;

the first node is a primary node of the target shard or the portion of the target shard and the second node is a secondary node of the target shard or the portion of the target shard; and

the at least one processor is configured to:

determine that a majority of write requests over a period of time originated from the second geographic region and, in response, trigger an election setting the second node to the primary node of the target shard or the portion of the target shard.

5. The database system of claim 2 , wherein:

the first datacenter is located in a first geographic region and the second datacenter is located in a second geographic region;

the first node is a primary node of the target shard or the portion of the target shard and the second node is a secondary node of the target shard or the portion of the target shard; and

the at least one processor is configured to:

determine that a majority of read requests over a period of time originated from the first geographic region and, in response, trigger an election setting the first node to a secondary node of the target shard or the portion of the target shard.

6. The database system of claim 2 , wherein the first datacenter is located in a first geographic region and the second datacenter is located in a second geographic region, and the at least one processor is configured to:

route a first operation associated with the first geographic region to the first node hosted by the first datacenter; and

route a second operation associated with the second geographic region to the second node hosted by the second datacenter.

7. The database system of claim 1 , further comprising storage hardware that provides a first level of performance and storage hardware that provides a second level of performance, wherein the at least one processor is configured to:

store the target shard or the portion of the target shard on the storage hardware that provides the first level of performance;

determine that an operation requires the first level of performance; and

route the operation to the target shard or the portion of the target shard in response to determining that the operation requires the first level of performance.

8. The database system of claim 7 , wherein the at least one processor is configured to:

determine that a threshold number of data items stored on the target shard or the portion of the target shard are to be accessible with the second level of performance and, in response, migrate the target shard or the portion of the target shard to the storage hardware that provides the second level of performance for storage.

9. The database system of claim 8 , wherein the at least one processor is configured to:

determine that the threshold number of data items stored on the target shard or the portion of the target shard are to be accessible with the second level of performance based on times that at least some of the data items were generated.

10. A computer-implemented method of managing a distributed database, the method comprising:

storing a plurality of data items among a plurality of shards in the distributed database;

determining a first range of key values;

analyzing operations on the distributed database and selecting a target shard or portion of a target shard to optimize a system hosting the target shard or the portion of the target shard for storage of data associated with the first range of shard key values;

mapping the first range of shard key values to the target shard or the portion of the target shard;

routing a first data item to the target shard or the portion of the target shard, wherein the act of routing comprises:

mapping the first data item to the first range of shard key values; and

responsive to the mapping, storing the first data item in the target shard or the portion of the target shard.

11. The method of claim 10 , further comprising:

hosting a first node of the target shard or the portion of the target shard on a first datacenter; and

hosting a second node of the target shard or the portion of the target shard on a second datacenter.

12. The method of claim 11 , further comprising:

routing an operation to the first node when the first datacenter is operational; and

routing the operation to the second node when the first datacenter is not operational.

13. The method of claim 11 , wherein:

the first datacenter is located in a first geographic region and the second datacenter is located in a second geographic region; and

the method further comprises acts of:

setting the first node as a primary node of the target shard or the portion of the target shard and the second node as a secondary node of the target shard or the portion of the target shard; and

determining that a majority of write requests over a period of time originated from the second geographic region and, in response, triggering an election setting the second node to the primary node of the target shard or the portion of the target shard.

14. The method of claim 11 , wherein:

the first datacenter is located in a first geographic region and the second datacenter is located in a second geographic region; and

the method further comprises acts of:

setting the first node as a primary node of the target shard or the portion of the target shard and the second node as a secondary node of the target shard or the portion of the target shard; and

determining that a majority of read requests over a period of time originated from the first geographic region and, in response, triggering an election setting the first node to a secondary node of the target shard or the portion of the target shard.

15. The method of claim 11 , wherein the first datacenter is located in a first geographic region and the second datacenter is located in a second geographic region, and the method further comprises acts of:

routing a first operation associated with the first geographic region to the first node hosted by the first datacenter; and

routing a second operation associated with the second geographic region to the second node hosted by the second datacenter.

16. The method of claim 10 , further comprising:

storing data in storage hardware that provides a first level of performance and data in storage hardware that provides a second level of performance;

storing the target shard or the portion of the target shard on the storage hardware that provides the first level of performance;

determining that an operation requires the first level of performance; and

routing the operation to the target shard or the portion of the target shard in response to determining that the operation requires the first level of performance.

17. The method of claim 16 , further comprising:

determining that a threshold number of data items stored on the target shard or the portion of the target shard are to be accessible with the second level of performance and, in response, migrating the target shard or the portion of the target shard to the storage hardware that provides the second level of performance.

18. At least one non-transitory computer-readable storage medium storing instructions, the instructions, when executed by at least one processor, cause the at least one processor to perform a method comprising:

storing a plurality of data items among a plurality of shards in the distributed database;

determining a first range of key values;

analyzing operations on the distributed database and selecting a target shard or portion of the target shard to optimize a system hosting the target shard or the portion of the target shard for storage of data associated with the first range of shard key values;

mapping the first range of shard key values to the target shard or the portion of the target shard;

routing a first data item to the target shard or the portion of the target shard, wherein the act of routing comprises:

mapping the first data item to the first range of shard key values; and

responsive to the mapping, storing the first data item in the target shard or the portion of the target shard.

19. The method of claim 18 , further comprising:

hosting a first node of the target shard or the portion of the target shard on a first datacenter located in a first geographic region;

hosting a second node of the target shard or the portion of the target shard on a second datacenter located in a second geographic region;

setting the first node as a primary node of the target shard or the portion of the target shard and the second node as a secondary node of the target shard or the portion of the target shard; and

determining that a majority of write requests over a period of time originated from the second geographic region and, in response, triggering an election setting the second node to the primary node of the target shard or the portion of the target shard.

20. The method of claim 18 , further comprising:

hosting a first node of the target shard or the portion of the target shard on a first datacenter located in a first geographic region;

hosting a second node of the target shard or the portion of the target shard on a second datacenter located in a second geographic region;

setting the first node as a primary node of the target shard or the portion of the target shard and the second node as a secondary node of the target shard or the portion of the target shard; and determining that a majority of read requests over a period of time originated from the first geographic region and, in response, triggering an election setting the first node to a secondary node of the target shard or the portion of the target shard.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 10, 2020
From: MERRIMAN, DWIGHT; MINTZ, CORY P.; NELSON, CAILIN ANNE; KUMAR, AKSHAY; STORCH, DAVID LENOX; SWANSON, CHARLES WILLIAM; BOSTIC, KEITH; CAHILL, MICHAEL; PASETTE, DAN; STEARN, MATHIAS BENJAMIN; BOSCH, GEERT
To: MONGODB, INC.
Reel/Frame 054320/0865 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 10, 2020
From: HOROWITZ, ELIOT
To: MONGODB, INC.
Reel/Frame 054320/0970 →
Continuity (21)
Continuation In Part 15654590 · Jul 19, 2017
Continuation 13078104 · Apr 1, 2011
Continuation 16013725
Continuation In Part 15605391 · May 25, 2017
Continuation In Part 15042297 · Feb 12, 2016
Continuation 13951987 · Jul 23, 2013
Continuation In Part 13794710 · Mar 11, 2013
Continuation In Part 14672901 · Mar 30, 2015
Continuation 13794710 · Mar 11, 2013
Continuation 16013725
Continuation In Part 15074987 · Mar 18, 2016
Continuation 14064705 · Oct 28, 2013
Continuation 12977563 · Dec 23, 2010
Continuation 16013725
Continuation In Part 14992225 · Jan 11, 2016
Provisional Application 62522222 · Jun 20, 2017
Provisional Application 62341511 · May 25, 2016
Provisional Application 62341490 · May 25, 2016
Provisional Application 61676188 · Jul 26, 2012
Provisional Application 62232979 · Sep 25, 2015
Related Publication 20180314750A1 · Nov 1, 2018
Cited By (3)
US 12,261,917 US 12,298,977 US 12,373,456