In-memory storage cluster consistency and availability
AssigneeSap SE
InventorBing Han
Life of this patent
Estimating the term…
Abstract
In an example embodiment, shards of a database are each stored in in-memory storage as multiple redundant distinct shard instances, but rather than a leader-follower paradigm each redundant shard instance is independent from one another. Each shard contains only an odd number of shard instances, and the number of shard instances is greater than or equal to three. This helps to ensure that enough shard instances are available at any one time to service requests.
Claims20
A system comprising:
- at least one hardware processor;
- and
- a computer-readable medium storing instructions that, when executed by the at least one hardware processor, cause the at least one hardware processor to perform operations comprising:
- generating, by a client, a first database write request;
- identifying a shard to which to send the first database write request by passing a key corresponding to the client to a consistent hashing algorithm;
- appending a timestamp associated with the first database write request to the first database write request;
- sending the first database write request in parallel to each of n shard instances for the identified shard, wherein n is an odd integer greater than or equal to three, the first database write request instructing each of the n shard instances to perform a database write on the corresponding shard instance in accordance with the first database write request and also to store the timestamp as a version for the corresponding shard instance;
- receiving database write acknowledgments from more than n/2 of the shard instances;
- and
- in response to the receiving, indicating that the first database write request has been successfully performed.
A method comprising:
- generating, by a client, a first database write request;
- identifying a shard to which to send the first database write request by passing a key corresponding to the client to a consistent hashing algorithm;
- appending a timestamp associated with the first database write request to the first database write request;
- sending the first database write request in parallel to each of n shard instances for the identified shard, wherein n is an odd integer greater than or equal to three, the first database write request instructing each of the n shard instances to perform a database write on the corresponding shard instance in accordance with the first database write request and also to store the timestamp as a version for the corresponding shard instance;
- receiving database write acknowledgments from at least n/2 of the shard instances;
- and
- in response to the receiving, indicating that the first database write request has been successfully performed.
A non-transitory machine-readable medium storing instructions which, when executed by one or more processors, cause the one or more processors to perform operations comprising:
- generating, by a client, a first database write request;
- identifying a shard to which to send the first database write request by passing a key corresponding to the client to a consistent hashing algorithm;
- appending a timestamp associated with the first database write request to the first database write request;
- sending the first database write request in parallel to each of n shard instances for the identified shard, wherein n is an odd integer greater than or equal to three, the first database write request instructing each of the n shard instances to perform a database write on the corresponding shard instance in accordance with the first database write request and also to store the timestamp as a version for the corresponding shard instance;
- receiving database write acknowledgments from at least n/2 of the shard instances;
- and
- in response to the receiving, indicating that the first database write request has been successfully performed.
Dependencies are inferred from the claim text.