amuck-landowner

When to sync DNS from API

D. Strout

Resident IPv6 Proponent
Me again! As y'all know by now, I'm working on an integrated server/domain/DNS management system. For the DNS part, I am setting up integration with popular DNS APIs, and I'm trying to figure out the best way to sync DNS from the provider via the API. As I see it, there are three ways to handle syncing.

Automatic: All domains that use a DNS API are updated on a cron job. Once a day doesn't seem unreasonable. Pros: Doesn't hit the API servers too hard, (mostly) seamless to the user. Cons: Records could be outdated.

Manual: When a user wants to modify the DNS, they have to manually "click a button" that will load the DNS records. Pros: Unlikely to ever be out of date. Cons: Annoying for the user.

Just-in-time: When the user opens the DNS management page for their domain, the records load behind the scenes. Pros: Unlikely to be out of date. Doesn't hit API servers too hard. If everything works well, it is seamless. Cons: If the records take a while to load, the DNS management page will take that amount of time, plus (could be alleviated with a timeout). Loads records even if the user only wishes to view info about the domain.

The JIT option seems to make the most sense, but the drawbacks aren't insignificant. Perhaps I should give the users the option of how to sync? I feel like that's a bad idea - you know, KISS and all.
 

lbft

Active Member
The just-in-time option could have a smoother experience if you loaded the records with JavaScript rather than outputting them in the page itself. Doesn't do anything for overall load time but feels more responsive to the user since they get visual feedback, not just sitting at a white screen.
 

D. Strout

Resident IPv6 Proponent
The just-in-time option could have a smoother experience if you loaded the records with JavaScript rather than outputting them in the page itself. Doesn't do anything for overall load time but feels more responsive to the user since they get visual feedback, not just sitting at a white screen.
Yeah, that's a good idea. Also have to implement a 5-10 second timeout, with a retry button available.
 
Top
amuck-landowner