Using read weight affinities to optimize the reading of block cache data
AssigneeGitHub, Inc.
InventorsPatrick Reynolds, Russell Belfer
Life of this patent
Estimating the term…
Abstract
A system for directing reads includes an input interface and a processor. The input interface is to receive a request to read from a plurality of servers. The processor is to determine a set of weights for a set of healthy servers of the plurality of servers and determine a server to receive the request based at least in part on the set of weights.
Claims18
A system for directing reads, comprising:
- a processor configured to:
- receive, from a requesting system via a network, a request to read data from one of a plurality of servers, wherein the plurality of servers store a corresponding local copy of the data;
- determine a set of weights for a set of healthy servers of the plurality of servers, wherein a sum of the set of weights corresponds to a range of selection values, wherein each server of the set of healthy servers has a corresponding subrange of the range of selection values, wherein a length of the corresponding subrange of the range of selection values corresponds to the weight of a healthy server;
- determine a server of the set of healthy servers to receive the request based at least in part on the set of weights, wherein to determine the server of the set of healthy servers to receive the request comprises:
- picking a random number that is within the range of selection values;
- comparing the random number to the range of selection values, wherein the random number is included in one of the corresponding subranges;
- and
- determining the server of the set of healthy servers corresponding to the subrange as a selected server;
- and
- direct the request to the selected server, wherein the requesting system is configured to read the data from the selected server via the network;
- and
- a memory coupled to the processor and configured to provide the processor with instructions.
A method for directing reads, comprising:
- receiving, from a requesting system via a network, a request to read data from one of a plurality of servers, wherein the plurality of servers store a corresponding local copy of the data;
- determining, using a processor, a set of weights for a set of healthy servers of the plurality of servers, wherein a sum of the set of weights corresponds to a range of selection values, wherein each server of the set of healthy servers has a corresponding subrange of the range of selection values, wherein a length of the corresponding subrange of the range of selection values corresponds to the weight of a healthy server;
- and
- determining a server of the set of healthy servers to receive the request based at least in part on the set of weights, wherein determining the server of the set of healthy servers to receive the request comprises:
- picking a random number that is within the range of selection values;
- comparing the random number to the range of selection values, wherein the random number is included in one of the corresponding subranges;
- and
- determining the server of the set of healthy servers corresponding to the subrange as a selected server;
- and
- directing the request to the selected server, wherein the requesting system is configured to read the data from the selected server via the network.
A computer program product for directing reads, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:
- receiving, from a requesting system via a network, a request to read data from one of a plurality of servers, wherein the plurality of servers store a corresponding local copy of the data;
- determining a set of weights for a set of healthy servers of the plurality of servers, wherein a sum of the set of weights corresponds to a range of selection values, wherein each server of the set of healthy servers has a corresponding subrange of the range of selection values, wherein a length of the corresponding subrange of the range of selection values corresponds to the weight of a healthy server;
- determining a server of the set of healthy servers to receive the request based at least in part on the set of weights, wherein determining the server of the set of healthy servers to receive the request comprises:
- picking a random number that is within the range of selection values;
- comparing the random number to the range of selection values, wherein the random number is included in one of the corresponding subranges;
- and
- determining the server of the set of healthy servers corresponding to the subrange as a selected server;
- and
- directing the request to the selected server, wherein the requesting system is configured to read the data from the selected server via the network.
Dependencies are inferred from the claim text.