I have 2 physical servers, each with 32GB RAM and 2 quad core procs. Each will run VMWare, 4 VMs each, one DB, 1 app server, 1 task queue server, and one general purpose server. One will run my web application. The other will constantly replicate synchronously from the primary server, to provide a fail-over that's ready to go with all data, etc. I want to use HAProxy to handle fail-over, in the case of a server issue in the primary server, but I'm uncertain whether this is possible to achieve while only using these two physical servers. Is it? If not, is there another solution which doesn't require me to purchase another piece of equipment?
You can run haproxy on the same two physical machines with a high availability solution such as keepalived. The virtual IP will be moved between the two machines in case of the master failure. Clearly, the users will request the service via the VIP which will be held by the master machine.