• Elastic Load Balancing

elb
  1. Help Center
  2. Elastic Load Balancing
  3. User Guide
  4. FAQs
  5. What Load Balancing Algorithms Does ELB Support?

What Load Balancing Algorithms Does ELB Support?

  • Classic load balancers support the following algorithms:
    • Round robin: Connection requests are forwarded to backend ECSs in sequence. This algorithm applies to short connections, such as HTTP connections.
    • Least connections: Connection requests are preferentially sent to the backend ECS with the least connections. This algorithm applies to services that have persistent connections, such as database connections.
    • Source IP hash: The source IP address of the request is input into a hash algorithm, and the resulting hash is used to identify a server in the static fragment table. Requests from the same client will be dispatched to a specific backend ECS. This algorithm applies to TCP connections of load balancers that do not use cookies.
  • Enhanced load balancers support the following algorithms:
    • Weighted round robin: Connection requests are forwarded to backend servers based on their weights, and servers with higher weights receive more requests. This algorithm is often used for short connections, such as HTTP services.
    • Weighted least connections: In addition to the weight assigned to each backend server, the number of connections processed by each server is also considered. New connection requests are forwarded to the server with the least ratio of the current active connection quantity to its weight. This algorithm is often used for persistent connections, such as database connection services.
    • Source IP hash: The source IP address of the request is input into a hash algorithm, and the resulting hash is used to identify a server in the static fragment table. Requests from the same client will be dispatched to a specific backend server. This algorithm applies to TCP connections of load balancers that do not use cookies.