HTTP Load Balancing Strategies

Load balancing infrastructure

Choosing a strategy includes:

1. Balancing strategy

2. Affinity strategy

3. Failure strategy

Balancing Strategy

Following are the most common strategies:

1.1 Round-Robin
1.2 Least Connections
1.3 Least Load/Weighted Round-Robin

Round-Robin –

This algorithm/method rotates incoming requests across all the member nodes, regardless of the load. This strategy is less desirable especially for SSL, as it causes a large increase in the number of SSL negotiations. It also can prevent HTTP ‘keepalive’ from working, depending on the particular Load Balancer implementation.

Least Connections –

This algorithm/method selects the node with the least number of active/open connections to ensure that the load of active requests is balanced on the nodes.

Least Load/Weighted Round-Robin –

This algorithm/method selects the node with the least amount of load. Based on response time or the number of active sessions.

Affinity Strategy

Affinity is how the Load Balancer chooses a server node for a connection from a user.

Following are the most common strategies:

2.1 Source IP Affinity
2.2 SSL Session Affinity
2.3 Session (stickiness/persistence) Affinity
2.4 No Affinity

Source IP Affinity –

An easy way to maintain affinity between a user and a server is to use the user’s IP address; this is called Source IP affinity. As long as the user uses a single IP address or he never change his IP address during the session. This setting is sufficient if you have a use case that is strictly Business to Consumer.

SSL Session Affinity –

SSL Session Affinity is the most flexible affinity strategy and is preferred for SSL sessions. HTTPS sessions are based on SSL connection ID. This is much better than doing affinity by IP source, we can follow on session even if the client changes its IP address.

Session (stickines/persistence) Affinity –

Session Affinity reduces network requests by automatically directing requests from the same client to the same physical web server. A Session Cookie, either set by the load-balancer itself or using one set up by the application server.

No Affinity –

No affinity is not recommended even for light-usage applications, affinity helps with High Availability.

Failure Strategy

The standard method of detecting failures is to send a health check request to a server node. Health checking must be enabled on the servers without health checking, the load balancer can’t know the server status and then can’t decide on failover traffic.


You may consider Least Load/Weighted Round-Robin as the balancing strategy. You may use Session (stickines/persistence) Affinity If the TLS is being terminated at the load balancer. You may use SSL Session Affinity If the TLS session is not terminating at the load balancer. Feel free to get in touch with us to decide the right strategy.

  • FacebookTwitterLinkedIn