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!