High Availability
Note: This page is quite old and is likely out of date. My opinions may have also changed dramatically since this was written. It is here as a reference until I get around to updating it.
Packages of interest:
- keepalived
- ipvsadm
- pacemaker
IPVS
IPVS (IP Virtual Server) is used to present a single address in a high availability scenario for one more services.
Installation / Setup
|
|
A note about LXC containers: In order to make use of ipvsadm within an LXC container, you will also need to install the ipvsadm package on the LXC host and reboot it (optionally just load the kernel module though I don't know it by name). Additionally the simplest version, VS/NAT, requires enabling IPv4 packet forwarding which requires modification of the read-only proc filesystem and thus doesn't seem to be an easy option, there may be work arounds for this, and it may effect the other forms but they haven't been tested yet.
First pass at commands:
That didn't work so I rebooted to clear it all out.
|
|
Ah ha, Eureka moment. Inside the LXC container I can unmount the "/proc/sys" overlay as long as I'm root...
It seems the sysctl setting "net.ipv4.ip_nonlocal_bind" isn't available within an LXC container.
Valuable sites:
- http://mojobojo.com/blog/2011/01/14/lvs-nginx-nodejs-mongodb-cluster-setup-on-rackspace/
- https://www.rackspace.com/blog/installing-and-configuring-lvs-tun/
Interesting use for this as a firewall:
05d8865c @ 2024-07-16