Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:lslb:ha [2018/08/02 21:25]
Jackson Zhang
litespeed_wiki:lslb:ha [2020/11/18 15:36]
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-====== How to enable HA for Web ADC? ====== +~~REDIRECT>https://docs.litespeedtech.com/products/lsadc/​settings/~~
-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. +
- +
-===== Install and configure keepalived ===== +
- +
-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_UPmtu 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). +
- +
-===== Configure HA on LiteSpeed Web ADC =====  +
- +
-==== 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 +
-   +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-ha1.png?​800 |}} +
- +
- then "​Add"​ HA interface:​ +
- +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-ha1-add-internface.png?​800 |}}   +
- +
- HA Status page will look like the following when running: +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-ha1-status.png?​800 |}} +
- +
-==== 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 +
-   +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-ha1.png?​800 |}}   +
- +
-then add HA interface:​ +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-ha2-add-internface.png?​800 |}} +
- +
-HA status: +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-ha2-status.png?​800 |}} +
- +
-===== testing ===== +
- +
-Assuming you have configured the listener, virtual Host and backend clusterHTTP on both Node 1 and node 2 seperately. +
- +
-Listener:  +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-listener.png?​800 |}} +
- +
-Virtual Host: +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-vhost.png?​800 |}} +
- +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-vhost2.png?​800 |}} +
- +
- +
-ClusterHTTP setup: +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-clusterhttp.png?​800 |}} +
- +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-clusterhttp-2.png?​800 |}} +
- +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-clusterhttp-3.png?​800 |}} +
- +
-{{ :​litespeed_wiki:​lslb:​adc-ha-configuration-clusterhttp-4.png?​800 |}} +
- +
- +
-Try access 10.10.31.31 (VIP) from the browser, you will see the backend server page. Disable one node, you can still see the webpage. Check ADC HA status, live node will become Master when the other one down. +
- +
  • Admin
  • Last modified: 2020/11/18 15:36
  • by Lisa Clarke