IP Library › Granted Patent US 11,860,819
Granted Patent B1
US 11,860,819 · App. 15/637,751 · Granted Jan 2, 2024

Auto-generation of partition key

Inventors: Andrew Christopher Chud (Seattle, WA); Richard Threlkeld (New York, NY)
Assignee: Amazon Technologies, Inc.
G06F16/137G06F16/278G06F21/62G06F16/00
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 11,860,819
App. No.
15/637,751
Granted
Jan 2, 2024
Kind
B1
Abstract

A distributed database may comprise a plurality of nodes maintaining a collection of data items indexed by key values. Upon receiving a request to store a data item, a node of the database may be selected based on the node's suitability for storing the data item. The distributed database may generate a key to identify the data item, such that the generated key identifies the data item and comprises information indicative of the selected node. The distributed database may provide the generated key to an application programming interface client in response to the request.

Claims (57)

1. A system, comprising:

a processor; and

a memory to store machine-readable instructions, which as a result of being performed by the processor, cause the system at least to:

select a node of a distributed database comprising a plurality of nodes, the selection based at least in part on:

an analysis of usage data from the plurality of nodes of the distributed database compared to selection criteria, and

a request to store a data item on any one of the plurality of nodes,

wherein a hash of a key identifying the data item is to map to the selected node,

wherein the selection of the node is based on a determination that the node has greater capacity to store and read the data item than at least one other node of the plurality of nodes, the at least one other node of the plurality of nodes having a positive non-zero capacity to store the data;

determine that the selected node has greater capacity to read the data item than at least one other node of the plurality of nodes;

generate a key to identify the data item by at least iteratively generating candidate keys and a respective hash of the candidate keys until the respective hash identifies the selected node, wherein a first generated candidate key is rejected based at least in part on determining that a hash of the first candidate key identifies a node other than the selected node; and

provide the generated candidate key with the respective hash that identifies the selected node in response to the request.

2. The system of claim 1 , wherein the memory to store machine-readable instructions, which as a result of being performed by a processor, cause the system at least to:

receive a request to retrieve the data item based on the generated key; and

determine that the data item is stored on the selected node, based at least in part on the hash of the generated key.

3. The system of claim 1 , wherein the key is generated based at least in part on a randomization function.

4. The system of claim 1 , wherein the memory to store machine-readable instructions, which as a result of being performed by a processor, cause the system at least to:

determine that the selected node has greater capacity to store the data item than at least one other node of the plurality of nodes.

5. The system of claim 1 , wherein the request to store the data item comprises information indicative of storing the data item using an automatically generated key.

6. A method, comprising:

selecting, by at least one processor, a node of a plurality of nodes of a distributed database, the selecting based at least in part on a request to store a data item on one of the plurality of nodes, an analysis of usage data from nodes of the distributed database compared to selection criteria, and a determination of:

a respective positive non-zero storage capacity of the plurality of nodes, and

that the selected node of the plurality of nodes has greater capacity to read the data item than at least one other node of the plurality of nodes,

wherein a hash of a key identifying the data item is to map the data item to the selected node;

determining that the selected node has greater capacity to read the data item than at least one other node of the plurality of nodes;

generating, by the at least one processor, a candidate key identifying the data item;

in response to determining that a hash of the candidate key does not map to the selected node, reject the candidate key and iteratively generating a new candidate key and a corresponding hash of the new candidate key until the corresponding hash of the generated new candidate key maps to the selected node; and

providing, by the at least one processor, the generated new candidate key with the corresponding hash that maps to the selected node in response to the request.

7. The method of claim 6 , further comprising:

generating, by the at least one processor, the new candidate key based at least in part on a randomization function; and

using the generated key to identify the data item based on determining that the hash of the key identifies the selected node.

8. The method of claim 6 , further comprising:

determining, by the at least one processor, that the selected node has greater capacity to store the data item than at least one other node of the plurality of nodes.

9. The method of claim 6 , further comprising:

providing, by the at least one processor, an application programming interface for storing the data item, wherein the application programming interface comprises a flag indicative of using an automatically generated key to identify the data item.

10. The method of claim 6 , further comprising:

generating, by the at least one processor, the new candidate key based at least in part on a randomization function; and

rejecting, by the at least one processor, the new candidate key based at least in part on determining that the new candidate key corresponds to a second data item.

11. The method of claim 6 , further comprising:

generating, by the at least one processor, a new candidate key based at least in part on a randomization function; and

rejecting, by the at least one processor, the new candidate key based at least in part on determining that the hash of the new candidate key refers to a node other than the selected node.

12. A non-transitory storage medium comprising machine-readable instructions that, as a result of being performed by a computing device, cause the computing device to at least:

select a node, of a plurality of nodes of a distributed database, to store a data item, based at least in part on a request to store the data item on any one of the plurality of nodes and on an analysis of usage data from at least one node of the distributed database compared to selection criteria, wherein a result of a hash function applied to a key identifying the data item is to map the key to the selected node, wherein the node is selected based, at least in part, on a determination that the node has greater capacity for storing the data item and reading the data item than at least one other node of the plurality of nodes having less capacity to store and read the data item;

determine that the selected node has greater capacity to read the data item than at least one other node of the plurality of nodes;

generate the key identifying the data item by at least iteratively generating candidate keys and respective hashes of the candidate keys including at least:

determining that a hash of a generated first candidate key does not identify the selected node and rejecting the generated first candidate key with the hash that does not identify the selected node, and

generating a new candidate key and a hash of the new candidate key until the hash of the new candidate key identifies the selected node; and

provide the generated new candidate key with the hash of the new candidate key that identifies the selected node in response to the request.

13. The non-transitory storage medium of claim 12 , comprising further machine-readable instructions that, as a result of being performed by the computing device, cause the computing device to at least:

retrieve the data item from the selected node, based at least in part on applying a hash function to the generated key.

14. The non-transitory storage medium of claim 12 , comprising further machine-readable instructions that, as a result of being performed by the computing device, cause the computing device to at least:

determine that the generated key corresponds to the selected node, and wherein the key is generated based at least in part on a randomization function.

15. The non-transitory storage medium of claim 12 , comprising further machine-readable instructions that, as a result of being performed by the computing device, cause the computing device to at least:

compare capacity of the node to store data items to another node of the plurality of nodes.

16. The non-transitory storage medium of claim 12 , wherein the request is generated by an application programming interface and wherein the generated key is provided as a return value of the application programming interface.

17. The non-transitory storage medium of claim 12 , comprising further machine-readable instructions that, as a result of being performed by the computing device, cause the computing device to at least:

generate the new candidate key based at least in part on a randomization function; and

reject the new candidate key based at least in part on determining that the hash of the new candidate key refers to a node other than the selected node.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 29, 2017
From: CHUD, ANDREW CHRISTOPHER; THRELKELD, RICHARD
To: AMAZON TECHNOLOGIES, INC.
Reel/Frame 042868/0176 →
Cited By (1)
US 12,750,249