I am trying to set up a high availability setup(not load balancing, only HA) with 2 tomcat servers. When I google for information, I get tons of links with apache+HAProxy+keepalived setup for linux fronted by a virtual IP. This seems simple enough. We need this setup to be in HA mode and switch the server if the active server fails or if application detects some critical resource is unavailable or if we bring it down for maintenance. We dont use Apache but can add them infront of each tomcat if required. (see image). I believe we can do something similar in Solaris as well since HAProxy is available for solaris.
My question is can we achieve something similar in Windows? We should be able to control the switching through scripts or something that can be called from code (in case the application decides that some critical resource is unavailable and it needs to switchover or for maintenance purposes)