Failover setup of virtual machines using KVM

fault-tolerancekvm-virtualizationpfsense

I have two physical servers each having: 2 CPUs (6 cores each), 4 network interfaces, 128GB RAM, 4 x 200GB SDD, 2 x 1TB SAS HDD and 1 configurable switch like Cisco Catalyst with support of vlans.

I need to host a web application on these 2 servers in failover mode. I want to use KVM virtualization (most likely Ubuntu). There will be a number of VMs on each server.

There will VM with HAProxy for loadbalancing. Behind the HAProxy there will be nginx and application servers (Gunicorn). Also there will be PostgreSQL db and memchached server. I also need to setup pfsense in order to be able to establish VPN connections for configuring the servers
remotely.

The questions:

Is it possible to have all VMs on both physical servers duplicated for fault tolerance without using any physical shared storage? So even if one of the physical servers goes down another will allow for the whole setup to work.

Can pfsense be like a fully functioning firewall and router when it's run on VM?

Can I have pfsense VM one on each physical server for fault tolerance? I mean if a pfsence VM on one physical server crashes the other pfsense VM on another physical server will take over and continue functioning.

I know the questions are too broad. So if you need any clarifications ask them.

Thanks in advance.

Best Answer

I need to host a web application on these 2 servers in failover mode. I want to use KVM virtualization (most likely Ubuntu). There will be a number of VMs on each server.

Hey, your thoughts about KVM looking good, just want to add that for creating really redundant Highly-available platform I recommend my clients to take a look either on HPE VSA or StarWind VSA they both should do the job in your case. By the way, StarWind has dropped all restrictions for their free version, so you can get the proof of concept.