I am trying to setup a VIP (virtual IP setup) - for a high availability HA setup for Redis with HA proxy, however to have a VIP for two HA instances in two different availability is proving to be difficult.
I was trying to follow this guide; https://aws.amazon.com/articles/2127188135977316 here, however this uses the same availability zone to achieve VIP floating IP, and this wouldn't work for me as my different availability zones are in different subnets.
I have tried the above mentioned example with an Elastic IP; however it is not transferring between machines as expected with the script (http://media.amazonwebservices.com/articles/vip_monitor_files/vip_monitor.sh)
Please could someone guide me how to approach this ?
The Leveraging Multiple IP Addresses for Virtual IP Address Fail-over in 6 Simple Steps article you reference is over 3 years old, so I wouldn't recommend this as a state-of-the-art method of doing failover.
The preferred method for HA is always to load balance between servers in multiple Availability Zones. Then, if one server or one AZ should fail, the other systems can take the full load of traffic (perhaps scaling-up to absorb the traffic).
For a requirement where only one server can be active at a time, switching DNS names or Elastic IP addresses would be recommended.