I need to host a subdomain-based SaaS application on a bunch of servers. Servers are xx1.example.com, xx2.example.com and so on. I want to have a bunch of yyy.example.com sites hosted on those servers.
Because sites are created on the fly, I need to be able to set up DNS records on the fly as well. A DNS wildcard zone doesn't really scale as eventually I will outgrow the first server and need to push new instances onto other machines. I therefore need to be able to point a specific subdomain to a specific IP address.
I looked around for API-based cloud DNS services (which would be great) but they seem outrageously expensive for my needs (lots of low volume instances). Rackspace has a free Cloud DNS service but it only goes up to 500 zones, and tech support told me they are rewriting the API so I would like to avoid their service for the time being.
Therefore I figured I will set up my own DNS server for these zones. Hence the questions: what's a good DNS server software for this specific need that will allow me to create zones without restarting?
Any suggestions? Thanks!
If all the records you will be adding are a sub-domain of a specific zone, then you could easily setup bind for dynamic updates. Then simply use nsupdate to submit an update to the zone.
This should work fine, if all the new records are records within an existing domain. If you need to dynamically add other domains, then this won't really help.
Update script using nsupdate.
I use myDNS It works great and is simple, it also can work with BIND easily. There are other ones out there like PowerDNS and others.
bind
is able to (re-) load files for single domains without restarting in whole.either go with the rndc interface of bind or what i would prefer: use PowerDNS
djbdns updates are entirely transparent - no interruptions - and the 'zonefile' structure is ideally suited to scripted modification and automation. The record format is completely unlike BIND, but it's not nearly as difficult to understand as it appears at first glance. Highly recommended.