System and method for throttling service requests using work-based tokens
First Claim
1. A method, comprising:
- performing by a computer system that provides storage services to clients;
receiving a request to read or write data on behalf of a client;
determining whether at least one token is present in a token bucket, wherein each token in the token bucket represents a unit of work for an input/output (I/O) operation in terms of a fixed amount of data transferred;
in response to determining that at least one token is present in the token bucket;
accepting the received request for servicing;
deducting an initial number of tokens from the token bucket;
servicing the received request, wherein said servicing comprises transferring a particular amount of data, and wherein the amount of data transferred in servicing different service requests is non-uniform; and
determining that the particular amount of data transferred is at least a threshold amount more or at least a threshold amount less than the transferred data amount represented by the initial number of tokens; and
in response to determining that the particular amount of data transferred is at least the threshold amount more or at least the threshold amount less than the transferred data amount represented by the initial number of tokens, deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket, wherein the additional number of tokens deducted or the number of tokens replaced represents the difference between the particular amount of data transferred and the transferred data amount represented by the initial number of tokens.
0 Assignments
0 Petitions
Accused Products
Abstract
A system that provides services to clients may receive and service requests, various ones of which may require different amounts of work. An admission control mechanism may manage requests based on tokens, each of which represents a fixed amount of work. The tokens may be added to a token bucket at rate that is dependent on a target work throughput rate while the number of tokens in the bucket does not exceed its maximum capacity. If at least a pre-determined minimum number of tokens is present in the bucket when a service request is received, it may be serviced. Servicing a request may include deducting an initial number of tokens from the bucket, determining that the amount of work performed in servicing the request is different than that represented by the initially deducted tokens, and deducting additional tokens from or replacing tokens in the bucket to reflect the difference.
20 Citations
20 Claims
-
1. A method, comprising:
performing by a computer system that provides storage services to clients; receiving a request to read or write data on behalf of a client; determining whether at least one token is present in a token bucket, wherein each token in the token bucket represents a unit of work for an input/output (I/O) operation in terms of a fixed amount of data transferred; in response to determining that at least one token is present in the token bucket; accepting the received request for servicing; deducting an initial number of tokens from the token bucket; servicing the received request, wherein said servicing comprises transferring a particular amount of data, and wherein the amount of data transferred in servicing different service requests is non-uniform; and determining that the particular amount of data transferred is at least a threshold amount more or at least a threshold amount less than the transferred data amount represented by the initial number of tokens; and in response to determining that the particular amount of data transferred is at least the threshold amount more or at least the threshold amount less than the transferred data amount represented by the initial number of tokens, deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket, wherein the additional number of tokens deducted or the number of tokens replaced represents the difference between the particular amount of data transferred and the transferred data amount represented by the initial number of tokens. - View Dependent Claims (2, 3, 4, 5)
-
6. A system, comprising:
-
one or more processors; and a memory coupled to the one or more processors and storing program instructions that when executed by the one or more processors cause the one or more processors to perform; receiving a service request; determining whether at least a pre-determined minimum number of tokens is present in a token bucket, wherein each token in the token bucket represents a fixed amount of work; in response to determining that at least the pre-determined minimum number of tokens is present in the token bucket; accepting the received service request for servicing; deducting an initial number of tokens from the token bucket; servicing the received service request, wherein said servicing comprises performing a particular amount of work, and wherein the amount of work performed in servicing different service requests is non-uniform and; determining that the particular amount of work is at least a threshold amount greater than or at least a threshold amount less than the amount of work represented by the initial number of tokens; and in response to determining that the particular amount of work is at least the threshold amount greater than or at least the threshold amount less than the amount of work represented by the initial number of tokens, deducting an additional number of tokens from the token bucket or replacing a number of tokens in the token bucket, wherein the additional number of tokens deducted or the number of tokens replaced represents the difference between the particular amount of work and the amount of work represented by the initial number of tokens. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification