named with DLZ support

Scott Haneda talklists at newgeo.com
Fri Jan 30 13:34:35 PST 2009


Thanks for the comments...

On Jan 30, 2009, at 10:37 AM, Bradley Giesbrecht wrote:
> On Jan 30, 2009, at 3:08 AM, Scott Haneda wrote:
>> 2) I am not sure the patch is the best method, it makes named less  
>> usable in the long run.  Compile with DLZ, but just make the  
>> launchd item disable threading with the flag.  This then allows the  
>> user to back out and not have to rebuild bind.
>
> True but if a person fails to do this or starts named on their own  
> following some guide they could be in for trouble.
>
> It's pretty damn fast to just reinstall named without dlz if you end  
> up not wanting it.
>
> How does disabling threads make it less useable?
> Is the performance hit that big that it becomes less useable?

This is just my reading, but since mysql supports only one thread and  
per connection, you have to drop named into the same scenario.  Named  
in a threaded mode and support much more load.  Something like 40,000  
queries per second, which drops to under 1000 with non threaded.  I  
will be damned if I can find the benchmarks link again.

But you are right, ports makes this rather trivial.

>> 3) Configuration wise, the etc/named.conf is not even close.  I  
>> really do not like that file in any way even for a base install  
>> without DLZ.  It defaults to logging to syslog, which was the last  
>> place I looked since it has been pounded into me MacPorts does not  
>> act outside of /opt.
>>
>> I think at the very least, we should add to named.conf, logging  
>> options to send all logs to var/named/logs or wherever ports folks  
>> think is right.
>
> Daniel (dluke) is the bind9 maintainer. I just added a patch for dlz- 
> mysql.
> I am working on a dlz-mysql.conf file that I planned on putting in / 
> opt/local/etc/named/conf/ and then adding a commented out ";include  
> "named/conf/*.conf";" to the end of /opt/local/etc/named.conf.
> If I were not using dlz I would do something like this for zones.
> include named/zone/pri/*.zone
> include named/zone/sec/*.zone

You more or less just described my other named install :)

>> 4) If there is the DLZ variant specified on the command line,  
>> named.conf should change, and have the DLZ comf options added in,  
>> the mysql.sock path needs to be changed.
>>
>> I want to work on this to get it cleaner, the bummer is, I am more  
>> than likely going to install this on Linux when I am done, so this  
>> is all just for testing.
>
> Me to but freebsd.

I wish I could do that, the client is making some fancy registration  
system, and they already have Linux.  At least you can use ports on  
freebsd, and the layout and tools are so similar to OS X, you should  
feel pretty at home.  Does freebsd use launchd as well?

> Most of what you are saying relates to how bind9 is setup. I don't  
> want to make those decisions for people.

Understood, I was more talking including it as it, but with docs and  
conf files to use, much like my.cnf and my-large.cnf and my-huge.cnf.

> For instance, I probably won't have the mysql server on the same  
> machine.

Correct, and I may not either, but named.conf, or the include file you  
call, is still going to need the DLZ control structure block thing.

>> 5) I also suggest a load.sql file, that could be loaded into mysql,  
>> to setup the table, and populate it with a few test zones so users  
>> know how to start.
>>
>> All this took me some time to figure out, we could make it easier  
>> on the user, even if it is not really the responsibility of ports,  
>> I do not see harm in providing more conf files.
>
> I agree completely and that's my plans. I haven't found a lot of  
> good documentation of dlz. That's why I said if you make some  
> progress please share it with me. I don't have an infinite amount  
> time to spend on this so I spent an afternoon patching bind9/ 
> Portfile and submitted it to trac. dluke didn't like the way I built  
> mysql support (I borrowed the approach from macports php5) so I  
> wrote patches to configure and contrib/dlz/config.dlz.in to use  
> mysql_config to get it's libs and includes.

I traced out your work, and wondered why it was digging so deep into  
mysql like that.  That makes sense now, and is a really rad way to do  
it.  This way, no matter what setup someone has, it is more or less  
bulletproof.

> If you have a sql build script please share. Otherwise I'll try to  
> setup the tables tonight and I'll pass them your way.

I did a very simple record add for a SOA record.  I actually am a  
little stumped on how to add A records and other sub records of the  
SOA.  I do not see any auto increment, or key index on the table  
examples, so I am not sure how they are tying the records together.  I  
am guessing the actual domain name is the key, but that does not yet  
explain to me how sub domains work, as example.com != sub.example.com

I am sure this is a minor issue.  I was just happy to `dig SOA  
example.com @localhost` and get back the SOA record.

> Now in the mean time I'm building an osx leopard server for EIMS and  
> a freebsd server for bamp. That's lamp on bsd:) I don't know about  
> you but I'm not a huge linux fan.

I tend to agree, and a lot of that is just my lack of experience, but  
I know very well the commands on the BSD's.  Even starting and  
stopping, and the layout is so much different.  I will say, the lack  
of having to care about resource forks is nice.  Being able to cp -R  
to clone one machine to another, and have it actually boot, is damn  
nice.

In my case, I do not have a heck of a lot of choice, unless I can  
convince the client to run the DLZ on a Mac Mini or equivalent, but  
that may be not ideal just for the latency reasons, if still on the  
same subnet anyway.

> I love unix though and I like linux unix. But I eventually ended up  
> on gentoo which does it's best to act like freebsd so I end up just  
> using freebsd. I haven't found emerge -UD world on gentoo to be all  
> that reliable. I still like gentoo but freebsd just feels more  
> stable to me.

What are your biggest issues that you get hung up on?  Do you even put  
a window manager on your machines?  On my servers, I can not remember  
the last time I had to login to the GUI, unless something Apple does  
forced me to.

Thanks again.
--
Scott

* Please send off list contact to scott@ *




More information about the macports-users mailing list