In Google Cloud, TCP Internal Load Balancers are used to facilitate failover of the ASCS and ERS virtual IP’s. The frontend of each load balancer is assigned an ephemeral IP from the subnet that it operates in. In this example, we will be using the following IP addresses for load balancers corresponding to each virtual host:
- ASCS10 instance virtual host:
- Virtual hostname: sps-ascs
- Internal TCP load balancer: ilb-sps-ascs
- IP address: 10.20.0.10
- ERS20 instance virtual host:
- Virtual hostname: sps-ers
- Internal TCP load balancer: ilb-sps-ers
- IP address: 10.20.0.11
Following the steps provided in GCP – Using an Internal Load Balancer and Responding to Load Balancer Health Checks, create and configure the following Google Cloud and LifeKeeper resources.
- Create two unmanaged instance groups: ig-sps-ascs-zone1, containing node-a, and ig-sps-ascs-zone2, containing node-b.
- Create two TCP Internal Load Balancers, ilb-sps-ascs and ilb-sps-ers, with the following properties. The icon indicates that the default option is chosen.
Backend configuration | |
---|---|
Region | <Deployment region> (e.g., us-east1) |
Network | lk-vpc |
Backends | ig-sps-ascs-zone1 ig-sps-ascs-zone2 |
Health Check | |
Name | hc-sps-ascs |
Protocol | TCP |
Port | 51098 (This must agree with the corresponding LifeKeeper GenLB resource created later) |
Proxy protocol | NONE |
Request | Leave empty |
Response | Leave empty |
Check interval | 2 seconds |
Timeout | 2 seconds |
Healthy threshold | 2 consecutive successes |
Unhealthy threshold | 3 consecutive failures |
Connection draining timeout | 10 seconds |
Frontend configuration | |
Name | fe-sps-ascs |
Subnetwork | lk-subnet |
Purpose | Non-shared |
IP address | Ephemeral (Custom) |
Custom ephemeral IP address | 10.20.0.10 |
Ports | All |
Global access | Disable |
Service label | Leave empty |
Backend configuration | |
---|---|
Region | <Deployment region> (e.g., us-west1) |
Network | lk-vpc |
Backends | ig-sps-ascs-zone1 ig-sps-ascs-zone2 |
Health Check | |
Name | hc-sps-ers |
Protocol | TCP |
Port | 51098 (This must agree with the corresponding LifeKeeper GenLB resource created later) |
Proxy protocol | NONE |
Request | Leave empty |
Response | Leave empty |
Check interval | 2 seconds |
Timeout | 2 seconds |
Healthy threshold | 2 consecutive successes |
Unhealthy threshold | 3 consecutive failures |
Connection draining timeout | 10 seconds |
Frontend configuration | |
Name | fe-sps-ers |
Subnetwork | lk-subnet |
Purpose | Non-shared |
IP address | Ephemeral (Custom) |
Custom ephemeral IP address | 10.20.0.11 |
Ports | All |
Global access | Disable |
Service label | Leave empty |
Once created, the Network services → Load balancing page in the Google Cloud Console will show the two load balancers.
- 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 addresses of the load balancers. Reboot node-a and node-b for the changes to take effect.
- 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 two LifeKeeper GenLB resources, ilb-sps-ascs and ilb-sps-ers, with the following properties. Notice that ilb-sps-ascs is created on node-a and extended to node-b, while ilb-sps-ers is created on node-b and extended to node-a.
The icon indicates that the default option is chosen.
Create Resource Wizard | |
---|---|
Switchback Type | intelligent |
Server | node-a |
Restore Script | /opt/LifeKeeper/SIOS_Hotfixes/Gen-LB-PL-7172/restore.pl |
Remove Script | /opt/LifeKeeper/SIOS_Hotfixes/Gen-LB-PL-7172/remove.pl |
QuickCheck Script | /opt/LifeKeeper/SIOS_Hotfixes/Gen-LB-PL-7172/quickCheck |
Local Recovery Script | None (Empty) |
Application Info | 51098 |
Bring Resource In Service | Yes |
Resource Tag | ilb-sps-ascs |
Pre-Extend Wizard | |
Target Server | node-b |
Switchback Type | intelligent |
Template Priority | 1 |
Target Priority | 10 |
Extend gen/app Resource Hierarchy Wizard | |
Resource Tag | ilb-sps-ascs |
Application Info | 51098 |
Create Resource Wizard | |
---|---|
Switchback Type | intelligent |
Server | node-b |
Restore Script | /opt/LifeKeeper/SIOS_Hotfixes/Gen-LB-PL-7172/restore.pl |
Remove Script | /opt/LifeKeeper/SIOS_Hotfixes/Gen-LB-PL-7172/remove.pl |
QuickCheck Script | /opt/LifeKeeper/SIOS_Hotfixes/Gen-LB-PL-7172/quickCheck |
Local Recovery Script | None (Empty) |
Application Info | 52098 |
Bring Resource In Service | Yes |
Resource Tag | ilb-sps-ers |
Pre-Extend Wizard | |
Target Server | node-a |
Switchback Type | intelligent |
Template Priority | 1 |
Target Priority | 10 |
Extend gen/app Resource Hierarchy Wizard | |
Resource Tag | ilb-sps-ers |
Application Info | 52098 |
The resources will appear in the LifeKeeper GUI resource pane once they have been created and extended successfully.
- Add the following entries to /etc/hosts on node-a and node-b to allow resolution of each virtual hostname to the frontend IP address of the corresponding load balancer:
10.20.0.10 sps-ascs
10.20.0.11 sps-ers
- 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.
Post your comment on this topic.