Search code examples
azureload-balancinghaproxyazure-cloud-servicesazure-configuration

How to create Azure Input Endpoint to VRRP Virtual IP Address


I'm setting up a test web farm in Azure. Consisting of:

  • Four Ubuntu Servers
    • Two balancers running HAProxy + Keepalived
    • Two web servers running Apache

Keepalived has been configured and everything has been working fine. HAProxy performs great.

My issue is that I want to enable the Keepalived failover clustering, but I can't seem to figure out how to create an Input Endpoint in Azure for the virtual IP address that the Keepalived VRRP is using.

In other words, I want to create an Input Endpoint for a virtual IP address in Azure, but not for an existing VM. So far, the only thing I've been able to do is create Input Endpoints for existing VMs (using their IP) for specific port numbers. I want to be able to configure:

  • Take TCP requests on port XX and map them to IP address YY.YY.YY.YY on port ZZ

Anyone know of a way to do this? I've looked on both portals (new and old) and the closest thing I see is the Cloud Services page for my VNET has the Input Endpoints listed. But no add/edit button.


Solution

  • This is not currently possible in Azure. Azure IaaS VMs do not yet support multiple IPs per interface, so keepalived will not be able to move a VIP between the nodes. We tried to do the same thing and were told it's not currently available. However, it's supposed to be on the road-map and it is "coming", as is the ability to have multiple interfaces per machine.

    Input endpoints are to expose some service on a single VM (it's a NAT), and they are not attachable to an actual interface. The only option that I thought through, was to use Azure's Traffic Manager to round robin between the two HAProxy instances using two exposed endpoints, with a health check to fail to a single HAProxy instance if one fails.