We would like to setup fail over server which takes traffic when main server breaks down. We will attach same NAS storage to both servers and will configure both Stash instances to use the same database so there won't be any problems with inconsistent data. In front of Stash servers there will be a load balancer which will redirect all requests to second machine when first one is down (normally all requests will be served by first server).
Only problem is with Stash itself - it seems that there shouldn't be two (or more) Stash instances running at the same time which operate on the same DB and storage. So both servers should monitor each other and Stash on second server should be started only when first server is unreachable (and stopped on second as soon as first server is back).
Does Stash have solution for this requirement? Is it possible to use Tomcat clustering (Stash uses Tomcat under the hood)?