Friday, April 15, 2016

F5 Load balancing methods

Load balancing methods


BIG-IP LTM offers a variety of load balancing methods to choose from.
There are two types of load balancing  methods.

  1. statistic load balancing method / mode.
  2. dynamic load balancing mode.

1. statistic load balancing mode:-

 There are two static load balancing modes.

1.Round robin
2.Ratio

2..Dynamic load balancing mode:-

1.least connections
2.fastest
3.observed
4.predictive
5.dynamic ratio

These modes are considered dynamic because each one takes server performance into account in some way.



1.Round Robin:-

Round Robin is the default and probably the most commonly used load balancing method.



Using this method, BIG-IP evenly distributes client request across all available pool members.

Server availability
It is important to know that BIG-IP distributes request between available servers only. Server availability is determined by the administrator and monitor status of both the node and the member.




Let’s examine the round robin example for a moment suppose server 4 has been marked offline or disabled by a monitor r an administrator.

Using the Round robin load balancing method, BIG-IP distributes client request evenly across the remaining available servers.


2.Ratio:-

The ratio method is appropriate to use if same pool members are more powerful than others. In this example, the ratio is set as 3:2:1:1.



As a result, BIG-IP sends three times as many requests to server 1 and twice as many requests to server 2 (as compared with servers 3 & 4)

If one server that was much faster than the others. After receiving the available load balancing methods to choose Ratio method. Knowing it would allow BIG-IP to letter utilize his more efficient server.

As request are processed, all available members are given one client request.

Then three or greater, and so on until the member with the highest ratio has been given the number of requests equally its ratio. Then the whole process starts over again.

Remember that both ratio and Round robin are static load balancing methods. This means that if a server with a higher ratio is available, it will still receive more requests then the other servers even if its performance is shown then the others.
If you want to consider server performance, you should use one of the dynamic load balancing methods.


1.Least Connections :- 

The least connections load balancing method uses the current connection to decide where to send the next client request. Assuming the current connection counts are listed.



The next connection will go to server1. now server1 & 2 have equal counts so BIG-IP will round robin between them.

Assuming connections count stay as shown, now server 1,2 &3 all have equal counts so BIG-IP will round robin between all three.

Least connections is appropriate for many cases but may be most relevant when the client connection length varies significantly and round robin could result in uneven loads.    

2.Fastest:-

The load balancing method known as fastest uses the outstanding layer7 request to decide where to send the next client request. You might have assumed the fastest load balancing method used response time to make a decision but what response time should be used ? the response time to ping does not take into account how fast a web server at port 80 will respond. And syn-ack response to a SYN for a port doesnot take into account how fast the backend database server will be able to populate the content of the web page. These are the two examples why fastest load balancing method uses outstanding layer7 requests rather than response time.



If the server 1 ,2 and 3 have equal number of outstanding layer7 requests then BIG-IP will round robin between them. Notice that server 4 may not be used until its outstanding layer 7 request reach a similar. Volume to other server.



3.Observed:- 
 The observed load balancing method is basically Ratio load balancing but with a ratio assigned by BIG-IP. The ratio assigned to each member is based on the current connection count. Servers with a lower than average connection count. Servers with a lower than average connection count are assigned a ratio of 3 . those with higher then average connection count are given a ratio of 2. based on your understanding of ratio load balancing, you know more requests will be distributed to the servers with lower connection count. These ratios are dynamically reassigned by BIG-IP every second.



In our example, if servers B and C have lower then the average connection counts they will receive more requests.


4.Predictive:-

The predictive method is similar to observed, but assigns more aggressive ratio values.

Servers with a lower than average connection count are assigned a ratio of 4, and those with a higher than average connection count are give a ratio of 1. this means 4 times as many requests will be distributed to the servers with lower connection counts. Again these ratios are dynamically reassigned by BIG-IP every second.



In this example server B and D are the ones with lower than average connection counts and receive more requests.

Note:- The ratio numbers mentioned for observed and predictive were used as explain the difference between these two dynamic load balancing methods. 

No comments:

Post a Comment