0

I recently came across floating IPs in DigitalOcean and I am not really sure I understand how they work. I have assigned one to my droplet.

The official documentation says that we can quickly reassign the floating IP to another droplet in the event of downtime. This is what that I don't understand.

Do I need to run simultaneous droplets of the same site for me to take advantage of floating IPs (so that if one droplet gets messed up, I move the IP to another droplet)?

There was also something about loading the new droplet from an image of the old droplet and then assigning the floating IP, won't the new droplet be messed up as well if we include that image from the old droplet?

I'd really appreciate your explanation on this one.

Cheers.

0

Floating ip means you can quickly point the floating ip to another droplet.

The reason you would want to do this is because code fail.

You should have monitoring tools to identify when your droplet isn't functioning correctly and in the event of a malfunction you can quickly spawn a new droplet with your code.

This is where automation comes into place. If this process can be automated you can discard the failed droplet, spawn a new droplet with the necessary configuration and code. Another approach is to use a image from the old droplet, but you can expect that the same failure can happen in the future if it isn't fixed.

Then you can set your floating ip to the new droplet and continue operation.

Whe

| improve this answer | |
  • Thank you. So for zero downtime, I need to run two droplets of the same code so that I can point the IP to another droplet if one fails, right? – Naser Mohd Baig Jun 4 '18 at 13:03
  • Simply yes. But you will have to judge wether to have a second droplet that isn't used but costs money. If downtime isn't an option you will need a droplet that can take over as soon as one fails. – Starlord Jun 4 '18 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.