create a resource group as always
create our first vm called "vm1" in our resource group
create a second vm to make sure you have another machine running if the first one fails
Web App Deployment
We want to make sure we deploy the exact web app with all the same features to both our VMs to ensure the other VM reacts accurately if one VM is to fail.
we had to bypass the ssh key security check for first time upload into our VM
Create a load balancer.
We need load balancers in order to avoid a singular VM being overloaded. The load balancer works on both the frontend and the backend. It creates a load balancer that distributes incoming traffic across your backend VMs for high availability.
Attach load balancer to VM1 and VM2
The load balancer needs to be attached to the NIC (network interface) and IP configuration of our VMs. So here we attach them to the backend pool of our load balancers, which is where our VMs are.
Enable backups
It's important we have backups in case we experience data loss. having two VMs helps in cases of failed hardware but not with data loss cases, so we need to have the system taking periodic snapshots so we can always recover or restore our system to a particular point in time
Attach Backup Policy to VM1 and VM2
System Failover Test
We do need to test our system to ensure that the other VM takes on the workload if one VM is shot down or fails.
simulates a computation failure by deallocating (completely stopping) VM1. You then confirm that the application is still reachable via the public IP of the load balancer, which is fully served by VM2. Deallocates gets this done.
you can run the below command to check the status
You can see in the image below that we now need to start VM1, since it's been put off.

Push to Github
write read.md powershell format
Git add . and Git commit
Git add origin
you want to first go to your github and create a repository, which you would use the link to run the below
Git branch -M main
lists, establishes, or oversees branches.
Git push -u origin main
Your local commits are uploaded to the remote repository.





















Top comments (0)