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?
Asked
Active
Viewed 651 times
0
-
1If you're using VMWare why would you use HAProxy instead of the VMWare capabilities like VMWare HA cluster and Fault Tolerance? – HTTP500 Apr 22 '12 at 15:42
-
Unrelated to your question, just wandering - why you need VMs at all ?! Can't all this servers coexist on one machine ? – Sandman4 Apr 22 '12 at 16:17
-
Because it is vastly more expensive to set that up properly without simply shifting a SPoF to shared storage? – JamesRyan Apr 22 '12 at 20:10
-
@JamesRyan - vastly more expensive to set up VMWare VMs, or? I didn't understand your question. – orokusaki Apr 23 '12 at 00:48
-
sorry, I was replying to HTTP500 – JamesRyan Apr 23 '12 at 09:08
-
@Sandman4 - why wouldn't I use VMs? They provide a separation of concerns (good for security, easy image rebuild, etc). VMs rock, as long as there isn't much overhead, and there isn't. – orokusaki Apr 23 '12 at 13:23
1 Answers
5
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.
Khaled
- 35,688
- 8
- 69
- 98
-
thanks. Does this require any third piece of physical equipment which routes the requests to the master, and then the slave if the master is dead (or does it require a physical 3rd part, due to some other reason)? If not, how is it possible? – orokusaki Apr 22 '12 at 15:02
-
-
@JamesRyan - how does the heartbeat allow you to not need a third piece (e.g. load balancer, etc.). If all requests go to server A and then server A breaks, how do all the requests suddenly go to server B without a 3rd piece saying "server A heart beat stopped, send traffic to B"? – orokusaki Apr 23 '12 at 01:21
-
@orokusaki: Your machines will be assigned two IP addresses. The users will not request the service using any of these IPs, but the service will be requested via a third IP address (called VIP). This virtual IP will be assigned by the high availability solution (like keepalived or heartbeat) to the active machine. If that machine breaks, the VIP will be automatically "moved" to the other machine. – Khaled Apr 23 '12 at 07:04
-
This usually either works by one machine taking over a virtual ip from the other or by both receiving all the packets and only one responding at a time. High availability and load balancing are related but not the same thing. – JamesRyan Apr 23 '12 at 09:11
-