2 server cluster with HA? Layman tutorial?

postcd

Renowned Member
Sep 16, 2013
41
0
71
Hello, I seek your help/suggestion.

I am willing to double my web hosting (LEMP stack + some custom Linux software) cost by running two Linux virtual servers (in case each of the server needs to have same full CPU/RAM/disk specs). Otherwise in case the resources sharing/load balancing would be possible, i may get even 3-4 servers with like 30% of required computing resources each.

I am seeking to increase hosting server availability and ease of restoration:
- increasing availability (one of the two servers irrecoverably die and automatically is switched to one remaining server or i can do it manually using couple of clicks or commands)
- ideally also sharing resources so one of the two cluster members is not just an idle hot-swap
- easier to bring the website back online after one of the servers gets damaged
- avoiding any complex re-installation/restoration process with many steps while the site is offline

My idea is to have 2 KVM VPS in two different location/providers (i know it is not ideal due to high latency) and run Proxmox LXC on it so I can snapshot the server for ease of restoration. I have also read about ZFS filesystem replication, though i worry about filesystem curruption on a regular/budget KVM VPS.

I would need a tutorial or the commands that i can put inside a bash script so i can restore the hosting server very quickly with a couple of clicks or couple of bookmarked commands.

I am NOT looking for:
- cloud servers from famous brands which would solve this increased availability issue (have numerous reasons for that)

What is a good solution for this and can you please link to a layman friendly turnkey tutorial?

I have already seen:
https://pve.proxmox.com/pve-docs/chapter-ha-manager.html
https://pve.proxmox.com/pve-docs/ha-manager.1.html
https://pve.proxmox.com/pve-docs/chapter-pvecm.html
https://knowledgebase.45drives.com/kb/kb450268-clustering-proxmox-nodes/ - basic cluster and HA setup, yet fails to followup with some details explanation how that works and how can be configured.

Thank you
 
Last edited:
Hello, I seek your help/suggestion.

I am willing to double my web hosting (LEMP stack + some custom Linux software) cost by running two Linux virtual servers (or 4-5, where 3rd and 4th would be cheap ~256MB VPS) in order to increase hosting server availability and ease of restoration:

You would not be able to provide the latency requirements on that cluster "network":
https://pve.proxmox.com/wiki/Cluster_Manager#pvecm_cluster_network_requirements

As a result, you will end up with...

- increasing availability (one of the two servers irrecoverably die and automatically is switched to one remaining server or i can do it manually using couple of clicks or commands)

Lower availability.

- ideally also sharing resources so one of the two cluster members is not just an idle hot-swap
- easier to bring the website back online after one of the servers gets damaged

More complex recovery.

- avoiding any complex re-installation/restoration process with many steps while the site is offline

See above.

My idea is to have 2 KVM VPS in two different location/providers (i know it is not ideal due to high latency) and run Proxmox LXC on it so I can snapshot the server for ease of restoration.

It will not work, there's enough threads on the forum with people having 2 nodes in 2 different buildings and experiencing issues. Also, 2-anything does not play well with HA.

I have also read about ZFS filesystem replication, though i worry about filesystem curruption on a regular/budget KVM VPS.

This would actually not be a problem.

I would need a tutorial or the commands that i can put inside a bash script so i can restore the hosting server very quickly with a couple of clicks or couple of bookmarked commands.

I am NOT looking for:
- cloud servers from famous brands which would solve this increased availability issue (have numerous reasons for that)

You need a load balancer instead. If you can, change your app architecture so that it can run on something like Kubernetes.

What is a good solution for this and can you please link to a layman friendly turnkey tutorial?

I have already seen:
https://pve.proxmox.com/pve-docs/chapter-ha-manager.html
https://pve.proxmox.com/pve-docs/ha-manager.1.html

Thank you

Sorry for being the party pooper.
 
  • Like
Reactions: UdoB
You need a load balancer instead.
This!

OP: High Availability in PVE solves a lot of issues, but it does not come for free and it does not fit onto every hardware - there are some requirements that are a must.

If your application can HA-migrate in PVE from one node to another (with a two minute stop = with loss of the current sessions) it should also be possible to construct HA on application level. The easiest approach would be working with a virtual IP address handled by something like HAproxy. This is probably much easier to build than a whole cluster and at the end it works quicker.

Just my 2€¢...
 
- easier to bring the website back online after one of the servers gets damaged
- avoiding any complex re-installation/restoration process with many steps while the site is offline

Also, if this is what you care about a lot and want to be provider agnostic, consider looking at cloud-init and/or ansible. And database replication would be best handled on the application level.
 

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!