This is an old revision of the document!


How to enable HA for Web ADC?

LiteSpeed Web ADC HA setup provides a failover setup for two ADC Nodes. When one node is temporarily unavailable, the other one will automatically detect and take over the traffic.

LiteSpeed Web ADC HA will use keepalived to detect the failover.

Before you configure ADC HA, You should install keepalived on both node 1 and node 2. On CentOS, you can do yum install:

yum install keepalived

or on Ubuntu/Debian, you can do apt-get:

apt-get install keepalived

Node1: 10.10.30.96 Node2: 10.10.30.97

Virtual IP: 10.10.31.31

on Node1: vi /etc/keepalived/keepalived.conf

###### start of VI_5 ######
vrrp_instance VI_5 {
  state BACKUP
  interface ens160
  lvs_sync_daemon_inteface ens160
  garp_master_delay 2
  virtual_router_id 110
  priority 170
  advert_int 1
  authentication {
      auth_type PASS
      auth_pass test123
  }
  virtual_ipaddress {
      10.10.31.31
  }
}
###### end of VI_5 ######

on Node2:

vi /etc/keepalived/keepalived.conf

###### start of VI_5 ######
vrrp_instance VI_5 {
  state MASTER
  interface ens160
  lvs_sync_daemon_inteface ens160
  garp_master_delay 2
  virtual_router_id 110
  priority 150
  advert_int 1
  authentication {
      auth_type PASS
      auth_pass test123
  }
  virtual_ipaddress {
      10.10.31.31
  }
}
###### end of VI_5 ######

Note: node1 virtual_router_id should be the same as node2; “state MASTER/BACKUP” doesn't really matter, since Higher priority one will be MASTER.

Start keepalived:

service keepalived start

On note 1, verify:

root@ha1-ubuntu:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  inet 127.0.0.1/8 scope host lo
     valid_lft forever preferred_lft forever
  inet6 ::1/128 scope host 
     valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
  link/ether 00:0c:29:c4:09:80 brd ff:ff:ff:ff:ff:ff
  inet 10.10.30.96/16 brd 10.10.255.255 scope global ens160
     valid_lft forever preferred_lft forever
  inet 10.10.31.31/32 scope global ens160
     valid_lft forever preferred_lft forever
  inet6 fe80::20c:29ff:fec4:980/64 scope link 
     valid_lft forever preferred_lft forever

On node 2:

root@ha2-ubuntu:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  inet 127.0.0.1/8 scope host lo
     valid_lft forever preferred_lft forever
  inet6 ::1/128 scope host 
     valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
  link/ether 00:0c:29:95:67:6d brd ff:ff:ff:ff:ff:ff
  inet 10.10.30.97/16 brd 10.10.255.255 scope global ens160
     valid_lft forever preferred_lft forever
  inet6 fe80::20c:29ff:fe95:676d/64 scope link 
     valid_lft forever preferred_lft forever
     

The VIP 10.10.31.31 is assigned to Higher priority Node 1 at the moment( node 1 priority 170, while node 2 priority 150).

Node 1

login to node 1 ADC Web Admin Console: sample configuration

Server Address	10.10.30.96:11122
Replication Cluster	10.10.30.96:11122,10.10.30.97:11122
Heart Beat Interval (secs)	10
Heart Beat Timeout (secs)	30
Is Gzip Stream	       Yes
Enable incremental sync      Yes
Is File Cache Enabled	       Yes
File Cache Server Address  10.10.30.96:1447

then “Add” HA interface:

HA Status page will look like the following when running:

Node 2

login to node 1 ADC Web Admin Console: sample configuration

Server Address	10.10.30.97:11122
Replication Cluster	10.10.30.96:11122,10.10.30.97:11122
Heart Beat Interval (secs)	10
Heart Beat Timeout (secs)	30
Is Gzip Stream	       Yes
Enable incremental sync      Yes
Is File Cache Enabled	       Yes
File Cache Server Address  10.10.30.97:1447

then add HA interface:

HA status:

Assuming you have configured the listener, virtual Host and backend clusterHTTP.

Try access 10.10.31.31 from the browser, you will see backend server page. Disable one node, you can still see the webpage.

  • Admin
  • Last modified: 2018/08/02 21:22
  • by Jackson Zhang