Question

How does the digital ocean floating IP work? Could it essentially replace the need for a 'failover' Load Balancer?

Posted September 7, 2021 71 views
Load BalancingHigh AvailabilityDigitalOcean Managed Load Balancers

I was made aware of Digital Ocean’s floating IP’s when I contacted support with regards to setting up a High Availability Load Balancer. I was also referred to this link:

Link

How exactly does the floating IPs work?

This also made me thinking, if floating IPs allow the smooth switching between droplets, for a simple ‘Failover’ system, why do I even need a Load Balancer? Can’t I just use floating IPs pointing to my Production Server and it’s fail over backup?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi there,

With a Load Balancer, you can actually load balance the traffic between your webservers. So that way you can scale up if your traffic grows. Also, the load balancer would do health checks for your servers and forward traffic only to healthy servers.

With a floating IP, one of the servers would be idle all of the time and would only be used when the main server crashes. That way you can’t really scale but you would only have a failover system.

You can use Keepalived for the automatic failover:

https://www.digitalocean.com/community/tutorials/how-to-set-up-highly-available-web-servers-with-keepalived-and-floating-ips-on-ubuntu-14-04

Hope that this helps.
Regards,
Bobby

by Justin Ellingwood
Keepalived is a service that can monitor servers or processes in order to implement high availability on your infrastructure. In this guide, we will use the `keepalived` daemon to monitor two web servers. The secondary server will take over the web traffic if the primary server experiences issues by automatically claiming ownership of a shared Floating IP address using the DigitalOcean API.