You can configure both the primary and standby load balancers to have the same configurations for ILB rule, server group, and health check. You can set up both the load balancers to use the VRRP. Also, set the virtual IP address of the rule to be the virtual router address. The VRRP sub-system then ensures that one of the load balancers is always active.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .
# ilbadm create-servergroup -s server=10.0.0.1,10.0.0.2 sg1 # ilbadm create-rule -i vip=10.81.0.3,port=9001 \ -m lbalg=hash-ip-port,type=DSR -o servergroup=sg1 rule1
LB1# dladm create-vnic -m vrrp -V 1 -A inet -l eth0 vnic1 LB1# vrrpadm create-router -V 1 -A inet -l eth0 -p 255 vrrp1 LB1# ipadm create-ip vnic1 LB1# ipadm create-addr -d -a 10.81.0.3/24 vnic1
The priority of the vrrp1 router is set to be 255 by using the vrrpadm command. The priority value makes the router the master router and hence the active load balancer.
LB2# dladm create-vnic -m vrrp -V 1 -A inet -l eth0 vnic1 LB2# vrrpadm create-router -V 1 -A inet -l eth0 -p 100 vrrp1 LB2# ipadm create-ip vnic1 LB2# ipadm create-addr -d -a 10.81.0.3/24 vnicl
The preceding configuration provides protection against the following failure scenarios:
If Load Balancer 1 fails, Load Balancer 2 becomes the primary load balancer. Load balancer 2 then takes over address resolution for the VIP 10.81.0.3 and handles all the packets from clients with the destination IP address 10.81.0.3.
When Load Balancer 1 recovers, Load Balancer 2 returns to standby mode.
If one or both of Load Balancer 1's interfaces fail, Load Balancer 2 takes over as the primary load balancer. Load Balancer 2 then takes over address resolution for VIP 10.81.0.3 and handles all the packets from clients with the destination IP address 10.81.0.3.
When both of Load Balancer 1's interfaces are healthy, Load Balancer 2 returns to standby mode.