Patent ID: 8504691

Claim:
A method, comprising: performing, by a computer system that provides a plurality of services to clients: receiving a request for a Web-based service; determining that the requested service is dependent on two or more downstream services; and for each of the two or more downstream services: placing the request in a respective one of a plurality of resource queues each of which maintains a queue of requests for a respective constrained resource, wherein the respective resource queue maintains a queue for the downstream service; waiting for the request to reach the head of the respective resource queue; and in response to the request reaching the head of the respective resource queue, dispensing a resource token for the downstream service to the request from a respective one of two or more resource token buckets each associated with a different resource queue, wherein the respective resource token bucket is associated with the respective resource queue; and in response to the request obtaining a resource token for each of the two or more downstream services on which the requested service is dependent: placing the request in a service request queue; waiting for the request to reach the head of the service request queue; and in response to the request reaching the head of the service request queue, allocating execution threads on which to execute the two or more downstream services to the request.