Hi all.
I have a task to make a redundant system of 4 servers. Please see schema:
http://i.imgur.com/ojzse.jpg
App servers are using Tomcat (called TVE on schema) to handle HTTP.
MySQL servers are in master-master replication (active-passive).
I got all working except one. I need only one "app" server to handle HTTP requests at a time. I do now need balancing, only redundancy. E.g. if currently active server will fall - switch activity for the second one and don't switch to 1st when it will come up.
HAProxy seemed as best solution until I found that it is incapable (or am I wrong?) of disabling balancing algorithms. With HAProxy I will get requests on both servers -> both servers will write to MySQL DB and this is bad.
Goal is to create schema with 2 app servers with redundancy, one active server at a time. I need to switch for the second server in case of:
1. Server will fail physically;
2. Application will fail (mysql or tomcat).