How to know if all DNS have switched to the floating IP upgrade?

September 15, 2016 126 views
DNS Networking

Hi all!

Added a floating IP to the server A, everything working and looking good.
Next step would be changing our DNS record to point to the floating IP instead of pointing to the droplet IP.

We expected the networking charts of the droplet to let us discern traffic from both IP's, but all we get is an aggregate traffic (I think/hope!).

How could we discern when it is "safe" to assume that every DNS in the world have replicated and all traffic is flowing through the floating IP, so we can float it to the new (upsized and updated) replicated server B?

1 Answer

If you are using the DigitalOcean DNS then it's already updated. We run a very very low TTL and our DNS records are proxied via CloudFlare. DNS changes are quick enough that we recommend using FloatingIPs with tools like heartbeat as a high-availability solution implementing failover.

In this situation it would be possible to set up two virtualhosts in your web server to listen on the public ipv4 address and on the floating ip's anchor IP. The anchor IP is the IP address your droplet sees the floating IP interface as. You can get your anchor IP with:

curl -s

If you set up two virtualhosts you can have them log visits to different files making it easy to know when requests to one stop.

Heartbeat is an open source program that provides cluster infrastructure capabilities—cluster membership and messaging—to client servers, which is a critical component in a high availability (HA) server infrastructure. Heartbeat is typically used in conjunction with a cluster resource manager (CRM), such as Pacemaker, to achieve a complete HA setup. However, in this tutorial, we will demonstrate how to create a 2-node HA server setup by simply using Heartbeat and a DigitalOcean Floating IP.
  • Not the case :) Using an external (inherited by legacy) DNS, and one apache in the VM with two virtual hosts, serving two different domains.

Have another answer? Share your knowledge.