Proxmox 3.x IP hot/cold failover for static site

Humbug

Active Member
Nov 14, 2012
31
1
28
Hi,
i'm looking for advice on a simple hot/cold IP failover setup for a static site (no database replication necessary). I have two Proxmox 3.x servers/hosts running and want to have two identical VMs on the hosts with their own hard disks - so no shared disks or data migration are involved. In case vm1 on host1 fails, i want vm2 on host2 to start and take over the IP of vm1.
Is this something Proxmox 3.x can do for me?

thanks,
Humbug
 
Last edited:
Hi,
i use keepalived to float a single IP between VMs. You can also add additional checks for your server or similar.

Regards,
Patrick
 
Hi Patrick,
sounds interesting! Does your keepalive setup need a loadbalancer? Or do both hosts work independently?
Best,
Humbug
 
Both hosts work independently. You could use keepalived as a loadbalancer. Basic setup:
2x keepalived VMs which share a single and load-balance traffic to nodes

In my case I use 2x Nginx VMs as proxy load-balancer with 2x floating IP and DNS load balancing. If one host is down, the second host gets both IPs.

Works well with LXC
 
It is a good start. Keepalived offers 2 important features:
- Floating IP with VRRP for High Availability
- Load Balancing on layer 3 or 4

I use floating IP and Nginx for load-balancing and SSL and HTTP2 termination. I highly recommend using gratuitous ARP with keepalived. A switch reboot could lead to unexpected problems.

Under rare conditions keepalived could trigger periodic kernel messages "unregister_netdevice: waiting for lo to become free. Usage count = 1". It sometimes happens after I try to delete a container that used keepalived. Delete does not succeed until host restart. Could be related to https://github.com/moby/moby/issues/5618.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!