Get the App
SLTechnology News&Howtos  ›  Servers  › 

Keepalived to achieve High availability of nginx

Shulou Source: shulou.com Published: 2022-06-02 04:42:17 10月03日 Update

Keepalived literal translation means to stay alive, and to keep online in the network, that is, the so-called high availability or hot backup, to prevent a single point of failure (a single point of failure means that the failure of a certain point will lead to the unavailability of the entire system architecture). The basis of keepalived implementation is vrrp. As for what vrrp is, please see vrrp here, and let's look at the application directly.

Keepalived usage

For ease of use, an one-click configuration script based on ubuntu 16.04server is written. See the script for configuration usage.

#! / bin/bash# nginx+keepalived highly available one-click script for ubuntu 16.04if [$#-ne 4]; then echo "USAGE: $0 [MASTER | BACKUP] priority interface virtual_ipaddress" exit 0fiecho-e 'Installing nginx'apt-get install nginx-y > / dev/null 2 / dev/null 2 / etc/keepalived/keepalived.conf

Tags: That is failure script one click single point configuration that is content infrastructure architecture literal translation system network online learning help application support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple Shulou Information vpn Linux