主权项 |
1. A method comprising:
receiving, at a web server of a pool of web servers, a request from a client via a load balancer, the load balancer for allocating requests to the pool of web servers, the web server having a capacity, wherein the capacity is a number of processes that are available to process requests; responsive to space being available in a queue, placing the request in the queue; responsive to the queue being full, sending a rejection notification to the load balancer to allow the load balancer to quickly send the rejected request to another web server in the pool; self-monitoring a rejection rate for requests to the web server; responsive to the rejection rate exceeding an upper threshold, increasing the capacity of the web server by increasing a number of processes that are able to process requests; and responsive to the rejection rate being lower than a lower threshold, decreasing the capacity by ending one of the plurality of processes executing on the web server. |