Score:-1

How to improve my current HA design

us flag

I am trying to create high availability application. My current design has two VMs, both have public IPs, both are running in same subnet and both VMs have same web application running in docker. ssl certs and traffic to the app in docker is managed by Traefik. The first VM is master so its ip is updated to Cloudflare. There is a third VM running which has a script which hits the application over IP of first VM to check if it receives response or not. If script does not receives the response from first VM then it send a email notification to notify me of problem and then this script updates the Cloudflare with public ip of second(failover) VM so that traffic goes to second VM.

This design is working all good but it is very rudimentary. I know this can be improved but I am not sure how to make it better so need your suggestions. What I want to do is to run a health check of app on master VM and if it app is not responding for any reason then route the traffic to failover VM. During my research I came across keepalived, I have not looked into it but I think this could be of some help.

enter image description here

Tim avatar
gp flag
Tim
What hosting are you using? In AWS the standard pattern is to use an application load balancer, pointing at applications in two or more AZs, with health checks validating the applications are available. Your design seems like it might work but may not be optimal.
John Mahowald avatar
cn flag
Define improve. How does this not meet what you need it to do? Set aside any neat technology or buzzwords for a moment.
Sandeep Kumar avatar
us flag
@Tim: I am using oracle cloud.
Sandeep Kumar avatar
us flag
@John: I am using 3rd VM for health monitoring which I think not needed. This piece can be improved.
Score:0
gp flag
Tim

I suggest you look into using an Oracle load balancer and the integrated health checks, along with autoscaling. I might not be quite right in terms of Oracle and the links might not be correct, but that's how it would be done in AWS and the concepts tend to go across clouds.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.