Monday, March 25, 2024

No longer able to reproduce Cloudflare DNS flapping

UPDATE: I tried this with some of the $0.99/year 1.111B class .xyz domains that I registered using a different registrar (you can't register .xyz domains on Cloudflare for some reason). I simply set the nameservers for my 1.111B domain to Cloudflare (add it to Cloudflare first, of course) and it works just as well! The change takes effect instantaneously. As soon as the HTTP PUT request returns, if you run the host command again, you will immediately see the new, updated IP address for that domain. Very cool!!!!

I wonder why more people don't use those $0.99/year 1.111B domains. They're so cheap.

 

 

 

Last post I mentioned that I saw DNS flapping with Cloudflare. 

I wondered if it was because the TTLs on some nameservers had not yet expired. Since the updates presumably take a while to propagate across all nameservers, maybe the TTLs on some nameservers start counting down before others. So maybe the issue was that I was updating the DNS too quickly - if I waited a few minutes between updates, then maybe the updates would become instantaneous and reliable with no flapping.

So I tried what I did in the last post again, this time waiting a few minutes before updating the DNS to a new value, and this time I saw some more interesting behavior.

First, I set the IP to 1.0.0.1 at 10:14:52: Instantaneous and no flapping.

Then I set the IP to 8.8.8.8 at 10:21:02:

Request issued at 10:21:02

First change seen: 10:23:15

Wow! This time it took over 2 minutes to update and there was flapping too!

Then I changed it to 192.168.0.1 and the change was instantaneous once again, and no flapping.

This makes me wonder if either the 1.0.0.1 or the 8.8.8.8 IP address is special - maybe Cloudflare doesn't want to change from 1.0.0.1 or maybe it doesn't want to change to 8.8.8.8. I'll try some more tests to distinguish between the two hypotheses.

Or maybe there is another DNS cache timeout somewhere that is longer than 1 minute?

Then I waited a few minutes and updated the IP to 192.168.0.123, and this time again, the change was instantaneous and there was no flapping.

Then I waited a few minutes and updated the IP to 192.168.0.42, and this time again, the change was instantaneous and there was no flapping.

So it would seem that at least for the IP range 192.168.0.x, as long as you wait a few minutes between each change, the update is instantaneous and reliable with no flapping.

Then I waited a few minutes and updated the IP to 8.8.8.8, and this time again, the change was instantaneous and there was no flapping.

Then I waited a few minutes and updated the IP to 1.0.0.1, and this time again, the change was instantaneous and there was no flapping.

Then I waited 2 minutes and updated the IP to 192.168.0.1, and this time again, the change was instantaneous and there was no flapping.

So it seems that most of the time, if you wait a few minutes before changing the IP, the change is indeed instantaneous with no flapping.

This makes me feel more confident using Cloudflare for instantaneous DDNS updates.

No comments:

Post a Comment