Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm going to be setting up HA proxy with 2 physical servers, using heartbeatd. I'm going to have clients point domains to an IP address which can't change after doing so. My hosting provider has provided me with 6 IP addresses. Will I need to use one of those to set up the VIP? I'm also confused in general, pertaining to the differences of a VIP and a real IP (not about the applicability, but about how they work, etc.).

share|improve this question
    
Have you tried reading the documentation? "I am also confused" smells like "learn what you do", not like a specific question. –  TomTom Dec 5 '12 at 17:16
    
@TomTom: it's true, but this is how I learn things quickly (transactive memory). I ask questions - in some cases that I don't need to know - because the varying answers give me insight into multiple surrounding ideas, tools, etc. –  orokusaki Dec 5 '12 at 17:27

2 Answers 2

up vote 5 down vote accepted

Yes, you'll need to use one of those assigned addresses as the virtual IP.

The virtual part is that it's not specifically assigned to one of the nodes. It's shared between the devices, but one of them always owns the address just as it owns its own real IP. The thing that's special about that address is that the nodes are coordinating to make sure that the IP is always owned by one of them, so that the service that resides on that IP (HAProxy) is always available, even if one of the nodes is down.

share|improve this answer

If you want your cluster to be reachable by people on the internet, then the VIP should be a public IP. If you have a private network set up, you can have the HA proxy box connected to a private network and the public network and have your web servers (or whatever they are) on the private network, so that they don't consume public IPs when everything should be going through HA Proxy anyway.

All that a VIP is, in this specific instance, is an IP that is assigned the HA Proxy box that represents whatever services you're presenting. If you have clustered HA Proxies, they would still only share this one VIP for your service. It's just like a regular IP from a TCP/IP viewpoint, but what it stands for in proxy-land is different. Instead of representing a specific host, it represents a service or set of services and is shared between HA Proxy boxes in the cluster.

share|improve this answer
    
+1 - thanks. My server setup is such that we will have a private network for accessing the servers' VMWare consoles / HP lights out management, and a public network for accessing the servers' primary services (web application). Does that affect the solution you describe? Also note, our only hardware is 2 switches, 2 servers, and 2 firewalls (the duplicates are all for failover purposes). –  orokusaki Dec 5 '12 at 17:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.