0

I have some questions about how to proceed with an issue that was suggested to me, and about the tools I can use to do this operation.

Well, I have two hosts, these two hosts have two Network interface controllers, one for the internet and one for the local network. The scenario is as follows: I would like to set up an IP failover system for these machines. For example: host_1 with 2 IPs and host_2 with 2 IPs, each ip on a network interface. A network interface will be available for the internet, where my external requests will arrive, the other will be available only to the local network.

The whole point is to have these IPs shared between these two machines, for example: host_1 down, automatically their 2 IPs go to host_2, host_2 down, automatically their 2 IPs go to host_1, and also reverse the operation (which I do not know if it is possible, if any of the hosts that was down to stay up, the IP that went to the other host back to it. Basically what these machines will run will be the haproxy, only haproxy. I was also looking at the keepalived, but I also do not know if it is possible to configure it in case the host comes back up, the IP returns to it. I would be very grateful to exchange an idea with you about this task, in fact I do not know where to start and which tool to use, I accept suggestions on how to proceed. Thank you guys!

  • Are these virtual machines? or Physical machines? Can the IPs could be virtual IPs? – Sayan Jun 27 '18 at 12:29
  • Physical machines. Sorry, I did not understand what you meant by virtual ip. – Matheus Luiz Carneiro Jun 27 '18 at 12:36
  • check out "keepalived" – Orphans Jun 27 '18 at 12:48
  • I was looking at the keepalived, but it seems like it always works with a host being a master and a host being slave, and for me that would not work. – Matheus Luiz Carneiro Jun 27 '18 at 12:52
  • What I did for this exact scenario is to use pFSense in front of the haproxy nodes using the haproxy package on pfsense. Installed pfsense in HA pair and round robin to the haproxy machines behind. If the back end haproxy goes down, pfsense will not send traffic. No single point of failure, easy to setup and monitor. – Gmck Jun 27 '18 at 14:25
  • @Matheus Luiz Carneiro, A virtual IP address (VIP or VIPA) is an IP address that doesn't correspond to an actual network interface. Uses for VIPs include network address translation (especially, one-to-many NAT), fault-tolerance, and mobility. – Sayan Jun 27 '18 at 15:59
  • @Sayan I understood, in my case the ips correspond to a real network interface. I believe that virtual ips would not solve my problem. Any suggestion? – Matheus Luiz Carneiro Jun 27 '18 at 16:10
  • Confusion here is you are talking about haproxy nodes (open source load balancers) and you are asking load balancing between two load balancers. Hope my understanding is correct? – Sayan Jun 27 '18 at 16:29
  • @Sayan sort of. What he wants is to automatically migrate the public IP address from one HAProxy host to the other upon node failure, so DNS will always resolve to a up and running node. – Webert Lima Jun 27 '18 at 16:52

0 Answers0