Load balancing using virtual IP

You can use virtual IP to achieve load balancing across multiple interfaces. This workload balancing method supports both inbound and outbound workload.

These are the advantages of using virtual IP as the workload balancing method:
  • It supports both inbound and outbound workload.
  • It supports local clients.
  • It provides more flexibility than the DNS-based and duplicate route-based load balancing methods.

The disadvantage of this workload balancing method is that it is a connection-based solution, not a load-based solution. The load on each interface is not considered. The assumption is that the traffic load is similar for all connections.

The following example takes full advantage of using virtual IP addresses. In addition to binding a unique virtual IP address to each application, this example provides inbound and outbound connection balancing and some level of fault tolerance.

Figure 1. Load balancing using virtual IP and proxy ARP
Load balancing using virtual IP and proxy ARP

In this example, inbound connection balancing is achieved by using virtual IP addresses defined on the system and by using the external router, firewall, and switch that can perform layer three (network layer) routing. Outbound connection balancing is achieved by using the preferred binding interface and duplicate route priority parameters on the IBM® i TCP/IP route entries. Outbound connections are distributed in a round-robin fashion between all the interfaces at the same duplicate route priority when the value for the duplicate route priority is set to be greater than the default value of 5. If all the interfaces at one value become unavailable, the system switches to the interfaces at the next lower value.

According to the route directives that are configured on router X, interfaces 10.1.1.11 and 10.1.1.12 are set up as the primary inbound interfaces. Inbound connections are distributed in a round-robin fashion between interfaces 10.1.1.11 and 10.1.1.12, which is a function that most routers provide.

According to the IBM i TCP/IP route entries, interfaces 10.1.1.13, 10.1.1.14, and 10.1.1.15 with a duplicate route priority of 7 are set up as the primary outbound interfaces. Outbound connections are distributed in a round-robin fashion between interfaces 10.1.1.13, 10.1.1.14, and 10.1.1.15. If all of these three interfaces are down, interfaces 10.1.1.11 and 10.1.1.12 with a duplicate route priority of 6 are used for both the outbound and inbound connections.

In this example, the IBM i TCP/IP route entries consist of three groups. Group X provides outbound connection balancing to the local segment of the corporate network (10.1.1.0). Group Y provides outbound connection balancing to the rest of the corporate network (10.0.0.0) through the router. Group Z provides outbound connection balancing to the Internet through the firewall.