Hello Everyone,
I wonder if it’s possible to have a floating private IP between multiple droplets? I will have around 6 droplets serving the same service and would like to check if I can have a private IP to have a transparent failover for the application (Master/Slaves design)
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.
In most cases, private floating IPs (or virtual ip - vip) are a relic of physical infrastructure where there are a lot of single points of failure, including the network interface, single disk, or power etc. In most virtualized environments, much of this is abstracted away these days. For example a guest migration between hosts can take a similar amount of time as a vip to deal with hardware issues without the hassle - often times without noticeable interruption depending on the application.
While virtualization does help in some cases, there still remains the common active/standby model which is still sometimes necessary though I argue (opinion) in most cases this is a tremendous waste of resources and is moving an engineering problem to an operational one. In most of these instances, a simple proxy or load balancer can fill this gap.
As an example, one of the most common use cases for an active/standby and vip being RDBMS such as MySQL, Postgres, SQL Server etc. While there are proprietary clustering solutions and complex layer 7 proxy solutions available for these databases that can even split reads/writes, a simple layer 4 configuration with haproxy can provide a simple interface for clients and replicas to reach the correct master server. This removes the often complicated burden of split brain detection etc from many servers to one.
Opinion: The use case for manually managing a vip is rapidly shrinking with containerized workloads and treating services as services, not a particular host/IP. Using internal load balancers should be more common than it is.
Hello, @ahmadt
You can surely configure a transparent failover for your application. I believe this is one of the main features of the Floating IPs. You can check the official documentation as well:
https://www.digitalocean.com/docs/networking/floating-ips/
https://developers.digitalocean.com/documentation/v2/#floating-ips
I hope this helps.
Click below to sign up and get $100 of credit to try our products over 60 days!
I, too, would also be interested in a legitimate response to this question. I use private IP’s to connect to a database hosted on a droplet in the same datacenter, and would like the option to have floating private IP’s for this reason.