HA with service monitoring inside VM

Antiochos

New Member
Feb 17, 2014
4
0
1
Hi everyone,

I have 2 proxmox nodes and I want to set up the high availability mode.
The question is how can i enable an automatic failover when a service is down inside the Virtual Machine.
For example when Apache service is down inside VM1 on Prox1 make it failover to VM2 on Prox2.
Is it possible? And what kind of configuration do I need?
Thanks for your help.

Regards
Eric
 
Hi,

I've already used drbd on a two physical nodes cluster using it with hearbeat and Mon for monitoring services.
Problems with drbd after failover or power failure resulted in painful situations sometimes not mentionning data integrity. So i would be glad to see another way and get rid of it.
Don't know much about fencing but i'll check.
Thank you Marco
 
HA in Proxmox only makes a single VM Highly Avaliable.
If the physical node running a VM fails, that VM is started on another node.
This requires some sort of shared storage which should also be HA.
DRBD and manual failover works great, automatic HA failover + DRBD is, in my opinion, a problem waiting to happen. I just feel safer having a human decide it it is ok to actually run the VM on the other node, having Proxmox Ha start the VM on the other node while DRBD is split-brained would not be a fun day.

Your original post seemed to indicate you need failover of services like Apache from one VM to another.
heartbeat is the solution there, this is setup in the VMs and has nothing to do with Proxmox.
Basically heartbeat decides who is master VM1 or VM2, whoever is master adds the shared IP to its interface and starts apache.
If the master fails, the other node will take over the IP and start apache.

Web servers have a tendency to break occasionally, they can get overloaded, maybe an upgrade went terribly wrong.
Because of this I take this a step furthur.
Two VMs that run heartbeat and Nginx reverse proxy.
Two or more backend web servers.

heartbeat takes over the shared IP and starts Nginx on one node.
Nginx reverse proxies requests to the backend web servers.
If a web server is misbehaving Nginx can transparently send the request to a different backend web server.
This gives you a HA setup and a method to scale by simply adding more web servers as needed.
 
  • Like
Reactions: El Tebe
i am looking for the same feature.

i know i could do this with heartbeat. but wouldn't it be nice to have it included in proxmox?
so proxmox could shut down the mal functioning server. and start the other one for it. works perfect togehter with ceph. and no need for drbd.
has some seconds more downtime but i think it is more simple.
and proxmox has most of it included.. just not the tests of specific ports on a virtualized server....

actually it is not so difficult to script such a program. make tests of some services. if thei fail 3 or more times or a specified perdiod just send a shutdown to this server and a start to the other one...
is it possible to control other servers in the console ? like qm stop 101 which is on another node?
 
i know i could do this with heartbeat. but wouldn't it be nice to have it included in proxmox?

don't take it bad, it's just my thought, but to me it has no sense.
just setup redundant web server cluster (2 or more nodes, even for load balancing), and you will never have such problems...

why make pve more complex where there are simple solutions?

Marco