I’m an Obama supporter, but I’m also that guy who wants to put a knife in someone’s eye when he receives an unsolicited political call. Especially, ESPECIALLY, when it is an unsolicited unprofessional political call. So, now…. … I’m really not sure what to say about this. Introducing, the Barack Obama call center! They are inviting me and you and any other would-be supporter to go ahead and start calling to voice our support. Who would you be calling? Your friends? Oh no, they will supply you with scripts to read to the complete strangers whose names and numbers are being provided! … Great …
PowerDNS / PostgreSQL & Web Interfaces 2
After a bit of eat and drink, as well as a half hour of zOMG why is this not werking!?!?! (iptables), Supermaster/Superslave is operating famously. It seems to “just work”. No complaints thus far, which is, well… highly unusual for me to put it lightly.
Feb 03 05:35:55 Received NOTIFY for flixn.com from 188.8.131.52 for which we are not authoritative
Feb 03 05:35:55 Created new slave zone 'flixn.com' from supermaster 184.108.40.206, queued axfr
Feb 03 05:35:55 gpgsql Connection succesful
Feb 03 05:35:55 No serial for 'flixn.com' found - zone is missing?
Feb 03 05:35:55 AXFR started for 'flixn.com', transaction started
Feb 03 05:35:55 AXFR done for 'flixn.com', zone committed
PowerDNS / PostgreSQL & Web Interfaces
I have been looking at PowerDNS for a while now, and after regular confirmation that it is in fact performing extremely admirably over at DreamHost I decided that it was time to deploy it.
While PowerDNS is the least braindead DNS server I have ever come across, there were a couple of things that I was not 100% happy with, at least in terms of coupling it to a web frontend.
- SOA records are stored space-delimited. This would hardly be a problem except that our serial is stored here. In its defense, PowerDNS has an alternate method of handling serials that is probably better in most circumstances. Hardly, but we would still have to break it apart and put it back together again to edit the minimum (default in practice) TTL, etc.
- Record types are stored textually. Even when implemented as an enumerated value this still violates DRY, as you must re-state these values in your frontend code.
- Everything must be represented fully qualified. This = FAIL from a normalization perspective.
Here I have come up with a somewhat optimal schema from the point of view of my web interface, and I have tied it to PowerDNS’s preferred table structure via domain logic. This could have been handled in other ways of course, but I tend to like this one for a number of reasons.
- First, the alternative is to add custom queries to the PowerDNS configuration file to make it understand whatever schema we might have in place, PowerDNS actually makes this very easy.
- Another alternative would be to use dynamic (normal) views.
On to the benefits, some being quite minor.
- Querying against serialized views will have performance benefits versus the above two options, this of course has to be weighed against the cost of maintaining the views.
- As mentioned, PowerDNS has two methods of handling serials, either in the SOA record, which we are keeping up to date with our domain logic. Alternatively PowerDNS will scan each record for you to find the most recently updated (if you maintain change_date). The former should logically be more performant, so we have implemented that option. This could have been handled either way in the domain logic, but most importantly we aren’t relying on our web frontend to keep our serials up to date.
- Most importantly, namely for debuggability, data on master’s and slave’s “looks the same”.
To get you rolling your PowerDNS configuration file need not be any more complicated than this:
I haven’t tried slaving yet, but I suspect it will work without a hitch. Will update here when I do and when this rolls out.