Home > Storage > ObjectScale and ECS > Product Documentation > Dell ECS with NGINX (OpenResty) > Keepalived
The keepalived utility is a routing software package available on Linux. It is written in C and its main purpose is to provide health checks between systems. Install the keepalived utility on both load balancers. If the Linux curl package is not already installed on the system, install this as well. Figure 58 provides the commands to install keepalived and curl.
# apt-get update
# apt-get install keepalived
# apt-get install curl
In both load balancers, edit or create a keepalived.conf file in the “/etc/keepalived” directory with entries as shown in Figure 59 and Figure 60. The difference between the two files is the priority value and state, where 101 and MASTER represent the primary and 100 and BACKUP is secondary. Also note that ens160 is set to the virtual IP. For more information about keepalived, see the keepalived website http://www.keepalived.org.
The check_etm.sh called in the keepalived.conf is illustrated in Figure 61. This script checks the health of the OpenResty servers and ECS nodes by sending an HTTP ping to port 9020. Place this file in the /usr/local/sbin directory and do a “chmod 755” to make this script executable.
On the redundant OpenResty server, copy the nginx.conf file, Lua scripts, and the SSL certificate created on the other OpenResty server described in the previous example and place them in the install directory. For the SSL certificates, use DNS names in the SANs as opposed to IP addresses so the same certificate file can be used on both systems. Then modify the DNS as pictured in Figure 62 to point the os.ecstme.org A-record to the virtual IP defined in the keepalived.conf file, 10.246.150.151 in this example.
Afterwards, start the keepalived service and restart OpenResty service on each server as illustrated in Figure 63.
# service keepalived start
# /usr/local/openresty/bin/openresty -s stop
# /usr/local/openresty/bin/openresty
Then, check that the virtual IP is on the primary OpenResty server as highlighted in Figure 64.