DEV Community

Clinton Mbilitem
Clinton Mbilitem

Posted on

Cloud VM Reliability Strategy

create a resource group as always

resource

real

create our first vm called "vm1" in our resource group

vm1

real

create a second vm to make sure you have another machine running if the first one fails

2nd vm

real1

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.

zip

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.

frontend

backend

rel view

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.

nic backend pool attach

vm1 attached

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

backup

Attach Backup Policy to VM1 and VM2

policy

backup vm2

real view

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.

deallocate

you can run the below command to check the status

status

You can see in the image below that we now need to start VM1, since it's been put off.
vm1

Push to Github

git init

write read.md powershell format

write

read.md

Git add . and Git commit

git add

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 add

Git branch -M main
lists, establishes, or oversees branches.

Git push -u origin main
Your local commits are uploaded to the remote repository.

git branch

Top comments (0)