In Google Cloud, a TCP Internal Load Balancer is used to facilitate failover of the SAP HANA virtual IP. The frontend of the load balancer is assigned an ephemeral IP from the subnet that it operates in. In this example, we will be using the following IP address for load balancer corresponding to the sps-hana virtual hostname:
- SAP HANA virtual host:
- Virtual hostname: sps-hana
- Internal TCP load balancer: ilb-sps-hana
- IP address: 10.20.0.10
- Create two unmanaged instance groups: ig-sps-hana-zone1, containing node-a, and ig-sps-hana-zone2, containing node-b.
- Create a TCP Internal Load Balancer, ilb-sps-hana, with the following properties. The icon indicates that the default option is chosen.
|<Deployment region> (e.g., us-east1)
|50098 (This must agree with the corresponding LifeKeeper GenLB resource created later)
|2 consecutive successes
|3 consecutive failures
|Connection draining timeout
|Custom ephemeral IP address
Once created, the Network services → Load balancing page in the Google Cloud Console will show the load balancer.
- [Optional] Implement the startup script workaround described in the Enabling Load Balancer Traffic from Backend Servers section of GCP – Using an Internal Load Balancer to allow node-a and node-b to communicate through the frontend IP address of the load balancer. Reboot node-a and node-b for the changes to take effect. This step is optional for a SAP HANA deployment since inter-backend communication through the frontend IP of the load balancer is not required in this configuration, but it may make it easier to test the functionality of the ilb-sps-hana GenLB resource in the next step from within the cluster nodes themselves.
- Following the steps in Responding to Load Balancer Health Checks, install the LifeKeeper Generic Application Recovery Kit for Load Balancer Health Checks (“GenLB Recovery Kit”) and create a LifeKeeper GenLB resource, ilb-sps-hana, with the following properties. The icon indicates that the default option is chosen.
|Create Resource Wizard
|Local Recovery Script
|Bring Resource In Service
|Extend gen/app Resource Hierarchy Wizard
The resource will appear in the LifeKeeper GUI resource pane once it has been created and extended successfully.
- Add the following entry to /etc/hosts on node-a and node-b to allow resolution of the virtual hostname to the frontend IP address of the corresponding load balancer:
- Test switchover and failover of the GenLB resources as described in the Test GenLB Resource Switchover and Failover section of Responding to Load Balancer Health Checks. Correct any issues found or tune the parameters of the load balancer health checks as required to achieve successful operation.