In the previous section, we provided an overview and comparison of the only Wide IP load balancing algorithms, round-robin, global availability, ratio and topology. Additionally, we have also demonstrated the result of the round-robin load-balancing algorithm.
In this section, we will explore how to put these algorithms into action by demonstrating how to implement them.
Table of Contents
Wide IP Load Balancing demonstration
Demonstration Topology
This is the topology we prepared in the previous sections, and based on this topology, we will demonstrate different wide IP load balancing algorithms.
We have two data centers in the US and EU and in each data center there is an F5 device with DNS and LTM enabled.
We can query any of DNS listeners configured on F5 devices with IP address 192.168.2.213 in the US data center or 192.168.2.214 in the EU data center.
For the name “www.rayka-co.com” there is a Wide IP with two pools, one for the US and one for the EU, which point to virtual LTM servers with the IP addresses 192.168.2.211 and 192.168.2.212.
Based on the load balancing algorithm, one of these two IP addresses will be returned.
Global Availability
In the first demonstration we see the result of the global availability algorithm. This algorithm only returns the IP address of the virtual servers in the first pool. The virtual servers in the second pool are used, only if the virtual servers in the first pool are unavailable. Therefore, in this algorithm, the order of the pools is important.
In the current configuration, US_Pool is in the first order and EU_Pool is in the second order. Therefore, we assume that sending a DNS request to an F5 device for the name “www.rayka-co.com” will only return the IP address of the virtual server in the first pool (192.168.2.211).
If we change the order of the pools in Wide IP, it is expected that the IP address of the virtual server in the EU pool (192.168.2.212) will always be returned.
Ratio
The next algorithm is the ratio algorithm. In this algorithm, each pool is assigned a ratio and traffic is routed to each pool in proportion to its ratio.
By default, all ratios are 1 and to understand and demonstrate this algorithm, we change the ratio of EU_pool to 3 times of US_Pool.
Then traffic to the EU virtual server is expected to be routed three times more often than to the virtual server in the US pool.
Topology as Load Balancing Algorithm
Probably the most important algorithm at the Wide IP level is the topology algorithm.
This algorithm allows you to route traffic based on the geographical location of the clients and servers and probably to the nearest data center.
To configure the topology algorithm, we configure regions and topology datasets.
Configuring regions is optional. Regions are specific areas that has meaning for our network. In our example, we can create a region for Europe and another region for US. We can then use these regions as the request source or destination of a topology record.
A topology record maps the origin of a DNS request to the best pool of virtual servers based on the proximity and the weight.
Just as an example, we assign the IP address of the client’s subnet.
Clients with the IP address in the subnet 192.168.2.0/24 are redirected to the virtual server in the EU pool and clients with the IP address in the subnet 192.168.1.0/24 are redirected to the virtual server in the US pool.