[Pdns-users] Round Robin Via MYSQL rand()
bert hubert
ahu at ds9a.nl
Wed May 14 15:08:50 UTC 2003
On Wed, May 14, 2003 at 10:54:29AM -0400, Brandon Phillips wrote:
> Hi ,
> I just downloaded and started investigating powerdns this evening. I am
> using the generic mysql backend. I noticed form the archives, that
> Round Robin is a *NOT* a current function, but a lot of people seem to
> want it. That got me thinking, since the queries are looked up in the
> DB, cannot the DB (mysql in my case) randomize its results? Along those
> lines. I tried specifying custom queries to the pdns.conf file that look
> like:
Pretty cool hack, Brandon! I generally feel that randomization should take
place in the recursor and not in the authoritative nameserver, but perhaps
I'm wrong about that.
I could add some roundrobin support to PowerDNS if people really want it, it
would have to be a switch as performance would suffer somewhat.
> If I can manipulate the queries like that, could I not also write a
> monitoring script, that could also update the DB, with a "health" value,
> so my where clause could also specify only hosts that the database
> thinks are alive. Or possibly a "paid" field so if the customer is a
> deadbeat, the domains can swiftly be "deactivated" by simply setting a
> flag in the database.
The 'deactivated' thing is something you should implement via your SQL query
as we have no way of predicting how everybody will want this to work. The
'health thing' I'm somewhat partial about, but would be possible too.
Regards,
bert
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
More information about the Pdns-users
mailing list