白丝美女被狂躁免费视频网站,500av导航大全精品,yw.193.cnc爆乳尤物未满,97se亚洲综合色区,аⅴ天堂中文在线网官网

Load balancing web service by rejecting connections

專利號
US11159406B2
公開日期
2021-10-26
申請人
Facebook, Inc.(US CA Menlo Park)
發(fā)明人
Robert M. English; Jeffrey Rothschild
IPC分類
H04L12/26; G06F9/50; H04L12/911
技術領域
server,balancer,queue,130a,tcp,requests,rejection,load,in,request
地域: CA CA Menlo Park

摘要

A load balancer allocates requests to a pool of web servers configured to have low queue capacities. If the queue capacity of a web server is reached, the web server responds to an additional request with a rejection notification to the load balancer, which enables the load balancer to quickly send the rejected request to another web server. Each web server self-monitors its rejection rate. If the rejection rate exceeds a threshold, the number of processes concurrently running on the web server is increased. If the rejection rate falls below a threshold, the number of processes concurrently running on the web server is decreased.

說明書

CROSS REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. application Ser. No. 15/690,217, filed Aug. 29, 2017, which is a continuation of U.S. application Ser. No. 14/285,162, filed May 22, 2014, which is a continuation U.S. application Ser. No. 12/651,069, filed Dec. 31, 2009, now U.S. Pat. No. 8,769,541, all of which are incorporated by reference in their entirety.

BACKGROUND 1. Field of Invention

The present invention relates to load balancing requests among a plurality of web servers.

2. Description of Related Art

Load balancing is a process of distributing a workload among a plurality of resources. The goals of load balancing may include improving resource utilization, maximizing throughput, minimizing response time, and avoiding overload. In addition, the ability to load balance among multiple machines may increase reliability through redundancy. Load balancing is commonly used to distribute tasks among a pool of web servers according to various scheduling algorithms. An apparatus that performs the load balancing according to a scheduling algorithm is referred to as a “l(fā)oad balancer.”

權利要求

1
What is claimed is:1. A method comprising:receiving, at a web server of a pool of web servers, the web server comprising one or more processors configured to concurrently execute one or more processes, a first request from a client via a load balancer, the web server having a capacity, wherein the capacity is a number of processes that are available to process requests from a first queue, wherein the load balancer is configured to assign requests to the pool of web servers;responsive to the first queue being full, sending, by the web server, a rejection notification to the load balancer to allow the load balancer to send the rejected first request along with a first unique identifier of the rejected first request to another web server in the pool;determining, by the web server, a rejection rate by dividing a number of rejection notifications sent to the load balancer by a total number of requests received by the web server during a set amount of time;responsive to the rejection rate exceeding an upper threshold, increasing, by the web server, the capacity of the web server by increasing a number of processes that are able to process requests; andresponsive to increasing the number of processes, processing, by the web server, a second request having a second unique identifier received at a secondary queue, wherein the second request is received, by the web server from the load balancer, at the secondary queue of the web server for priority treatment responsive to the second request being rejected a predetermined number of times by one or more web servers of the pool of web servers.2. The method of claim 1, further comprising:responsive to space being available in the first queue, placing a third request having a third unique identifier in the first queue.3. The method of claim 1, wherein the web server is configured to have a queue capacity of one, wherein the queue capacity is a number of requests the first queue can hold.4. The method of claim 1, further comprising:resetting the number of requests received and the number of rejection notifications sent to the load balancer every set amount of time.5. The method of claim 1, wherein at least one of the first request and the second request comprises a TCP request.6. A web server of a pool of web servers, the web server having a capacity which is a number of processes that are available to process requests from a first queue, wherein the web server comprises:one or more processors configured to concurrently execute one or more processes; anda non-transitory computer readable storage medium storing instructions, the instructions,when executed by the one or more processors, cause the one or more processors to:receive a first request from a client via a load balancer, the load balancer configured to assign requests to the pool of web servers;responsive to the first queue being full, send a rejection notification to the load balancer to allow the load balancer to send the rejected first request along with a first unique identifier of the rejected first request to another web server in the pool;determine a rejection rate by dividing a number of rejection notifications sent to the load balancer by a total number of requests received by the web server during a set amount of time;responsive to the rejection rate exceeding an upper threshold, increase the capacity of the web server by increasing a number of processes that are able to process requests; andresponsive to increasing the number of processes, processing a second request having a second unique identifier received at a secondary queue, wherein the second request is received from the load balancer at the secondary queue for priority treatment responsive to the second request being rejected a predetermined number of times by one or more web servers of the pool of web servers.7. The web server of claim 6, wherein the instructions further cause the one or more processors to:responsive to space being available in the first queue, place a third request in the first queue.8. The web server of claim 6, wherein the web server is configured to have a queue capacity of one, wherein the queue capacity is a number of requests the first queue can hold.9. The web server of claim 6, wherein the instructions further cause the one or more processors to:reset a count of the number of requests received and a count of the number of rejection notifications sent to the load balancer every set amount of time.10. The web server of claim 6, wherein the first request comprises a TCP request.11. A non-transitory computer readable storage medium storing instructions, the instructions, when executed by one or more processors configured to concurrently execute one or more processes, cause the one or more processors to:receive, at a web server of a pool of web servers, a first request from a client via a load balancer, the web server having a capacity, wherein the capacity is a number of processes that are available to process requests from a first queue, wherein the load balancer is configured to assign requests to the pool of web servers;responsive to the first queue being full, send a rejection notification to the load balancer to allow the load balancer to quickly send the rejected first request along with a first unique identifier of the rejected first request to another web server in the pool;determine a rejection rate by dividing a number of rejection notifications sent to the load balancer by a total number of requests received by the web server during a set amount of time;responsive to the rejection rate exceeding an upper threshold, increase the capacity of the web server by increasing a number of processes that are able to process requests; andresponsive to increasing the number of processes, processing, by the web server, a second request having a second unique identifier received at a secondary queue, wherein the second request is received, by the web server from the load balancer, at the secondary queue of the web server for priority treatment responsive to the second request being rejected a predetermined number of times by one or more web servers of the pool of web servers.12. The non-transitory computer readable storage medium of claim 11, wherein the instructions further cause the one or more processors to:responsive to space being available in the first queue, place a third request having a third unique identifier in the first queue.13. The non-transitory computer readable storage medium of claim 11, wherein the first queue has a queue capacity of one, wherein the queue capacity is a number of requests the first queue can hold.14. The non-transitory computer readable storage medium of claim 11, wherein the instructions further cause the one or more processors to:reset a count of the number or requests received and a count of the number of rejection notifications sent to the load balancer every set amount of time.
微信群二維碼
意見反饋