Question about failover function for Proxmox cluster environment

bravo0916

Member
Jan 29, 2024
39
3
8
Hello Team,

I have one Proxmox VE. The web server has been running as production on single SSD. Well, I tried to configure with ZFS (RaidZ2) or RAID10, but the performance was really bad.
So I have decided to use only one single SSD. Now, I did the backup and restore test and it worked great. However, I have questions with following scenario.

"If the system is down due to motherboard failure and it will not be fixed, then web server is also supposed to be down. But I have backup data for this web server. In this case I would like to know how I can restore web server to another Proxmox cluster machine."

1. Suppose that there are 2 Proxmox cluster environment. One of Proxmox doesn't have any cloned web server machine and there are several different VMs. First step, I copy backup data to one of Proxmox cluster machine which is active. After that, restore the data. Does it work?

The goal is to reduce downtime for web server machine.

Thank you for your support!

Regards,
 
Hello Team,

I have one Proxmox VE. The web server has been running as production on single SSD. Well, I tried to configure with ZFS (RaidZ2) or RAID10, but the performance was really bad.

For ZFS RAIDZ this is as expected see https://forum.proxmox.com/threads/fabu-can-i-use-zfs-raidz-for-my-vms.159923/

A ZFS mirror should be ok performancewise though (so RAID1 or RAID10), what kind of SSDs do you have? Datacenter SSDs with power-loss-protection have way better performance than consumer ones.

What do you want to achieve? If you know that you are just running a webserver, bare metal apache or nginx
might be more suitable for your usecase.
So I have decided to use only one single SSD. Now, I did the backup and restore test and it worked great. However, I have questions with following scenario.

"If the system is down due to motherboard failure and it will not be fixed, then web server is also supposed to be down. But I have backup data for this web server. In this case I would like to know how I can restore web server to another Proxmox cluster machine."

1. Suppose that there are 2 Proxmox cluster environment. One of Proxmox doesn't have any cloned web server machine and there are several different VMs. First step, I copy backup data to one of Proxmox cluster machine which is active. After that, restore the data. Does it work?

Yes this should work but that's not failover in my book. Something like https://pve.proxmox.com/wiki/PVE-zsync would be more suitable for that.
Or a Proxmox cluster but again for just running a single webserver that might be a little bit much administrative overhead with Proxmox.

For reducing downtime of a webservice multiple nodes running the webserver (be them virtual nodes on Proxmox VE or bare metal) with a load balancer before form them might be the better approach depending on your usecase

So my question stays: What do you want to achieve with your webserver and the data recovery?
 
  • Like
Reactions: UdoB
For ZFS RAIDZ this is as expected see https://forum.proxmox.com/threads/fabu-can-i-use-zfs-raidz-for-my-vms.159923/

A ZFS mirror should be ok performancewise though (so RAID1 or RAID10), what kind of SSDs do you have? Datacenter SSDs with power-loss-protection have way better performance than consumer ones.

What do you want to achieve? If you know that you are just running a webserver, bare metal apache or nginx
might be more suitable for your usecase.


Yes this should work but that's not failover in my book. Something like https://pve.proxmox.com/wiki/PVE-zsync would be more suitable for that.
Or a Proxmox cluster but again for just running a single webserver that might be a little bit much administrative overhead with Proxmox.

For reducing downtime of a webservice multiple nodes running the webserver (be them virtual nodes on Proxmox VE or bare metal) with a load balancer before form them might be the better approach depending on your usecase

So my question stays: What do you want to achieve with your webserver and the data recovery?
Hi Johannes S,

Thank you for your quick response. I have used Crucial SATA SSD (1TB). I used 4 SATA SSD with RaidZ2 or RAID10. Now, I replaced to 2 nvme drives.
I think these nvme will be good to have RAID10 or mirror. My goal is as below.

The Web server (apache) have been running as virtual hosts which measn, there have around 10 web sites. So many users have been accesing these sites.
So I would like to minimize the downtime and setup this server to another Proxmox cluster members as quickly as possible.
I am not sure if apache can work with loadbalancer. I mean, the apache has something like virtual IP or not.
I am Ok that manual restore that I mentioned as above. I apprecite if there is something like "step by step" document.

Regards,
 
Just to clear a possible missunderstanding: I'm not a member of Proxmox staff, just another lurker in this forum.
Thank you for your quick response. I have used Crucial SATA SSD (1TB). I used 4 SATA SSD with RaidZ2 or RAID10. Now, I replaced to 2 nvme drives.
I think these nvme will be good to have RAID10 or mirror. My goal is as below.

The Web server (apache) have been running as virtual hosts which measn, there have around 10 web sites. So many users have been accesing these sites.

What kind of web sites do you host? Static ones or with dynamic content (PHP,python or something like that with a sql database)? If they connect to a sql database, where do you host the database?
So I would like to minimize the downtime and setup this server to another Proxmox cluster members as quickly as possible.

This is possible with HA, see https://pve.proxmox.com/wiki/High_Availability for more information. After setup in case of failover the VM will be relaunched/migrated on another host of your cluster. You will need a shared storage though so Ceph (which needs at least three nodes) or a NFS share on a NAS (which will then be a single point of failure) or SAN though so there is no data loss in case of an outage.

If you can live with minimal data losses ZFS based storage replication might be an option though:
https://pve.proxmox.com/wiki/Storage_Replication

Normally you would loose 15 minutes of data, but that can be reduced to one minute. For static websites this might be enough, for a sql- or other critical applications this might still not be ok.

I am not sure if apache can work with loadbalancer. I mean, the apache has something like virtual IP or not.

Any webserver can work with a loadbalancer why shouldn't it? You would setup something like virtualhostname on the loadbalancer (on it's own vm) and virtualhostname-node1, virtualhostname-node2 etc on your webservers on the different webservers. Of course you will need to know how to configure haproxy or whatever loadbalancer you want to to use together with apache. But this has nothing to do with Proxmox VE, because on bare metal servers the procedure would be the same.

More things to consider: If you have a SQL database you will also need to consider how to connect the sql database to the host/s. Depending on your usecase you might want to have a database cluster (so you don't risk data loss) with the native clustering/replication of MySQL or Postgres.


I might be wrong but my impression is that you are still in the planning stage, aka you need to thing what usecase do you have and what do you want to achieve? Which datalosses/outages can you live with? Are the websites just a kind of hobby project or business-critical? Depending on the answers there are a lot of more or less sensible options in terms of investment and maintenance costs.
 
Last edited:
Simple stupid and cheap solution : backup (within proxmox virtual environment) your VM on an other sever storage (NFS export for example). When you will need to restore the backup, it will be local and will take less time.
Good solution : as @Johannes S said : reverse proxy (application level clustering) if on different proxmox virtual environment clusters, and if not : storage replication or CEPH.
 
Good solution : as @Johannes S said : reverse proxy (application level clustering) if on different proxmox virtual environment clusters, and if not : storage replication or CEPH.

The best solution (imho) would be a combination of application and virtualization level clustering. But in the end the question is how much (financial, time and human) resources are available for which goal. From the OPs postings it could be anything from a homelab to a small business or even important (but not very heavy in load or needed it infrastructure) services inside a larger corporate environment.
 
  • Like
Reactions: ghusson