Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: dns server in perl

by JPaul (Hermit)
on Feb 08, 2002 at 05:02 UTC ( [id://144036]=note: print w/replies, xml ) Need Help??


in reply to dns server in perl

Greetings,

I have also embarked on a similar project.
BIND is bloated, memory management was not a programming priority apparently, and its cache design is laughable. Asides from that its works fine. :)
DJBDNS is another kettle of fish - its FAST, its pretty secure, and its smart -- But DJB has this really nasty habit of deciding all/part of an RFC is "stupid" and just doesn't bother implementing it, to hell with anyone else who actually expects DNS servers to be RFC compliant.

My server also uses Net::DNS, however its somewhat more expansive with "intelligent caching" (self lookups when load is low on his tasks, dropping off least used cache entries when the cache is full, that kind of stuff), the zones are SQL based and centralised, removing the requirement for zone transfers, dig their own root servers, random junk.
Works REALLY nice, except Net::DNS is painfully slow, which makes it quite useless in practice. Net::DNS is written entirely in perl, which is wonderful for educational purposes, but unfortunately pointless for real service - and Net::DNS hasn't been touched in a few years, if I remember correctly... Oh well

Anyone want to rewrite Net::DNS, and this time in C? :P

JP,
-- Alexander Widdlemouse undid his bellybutton and his bum dropped off --

Replies are listed 'Best First'.
Re: Re: dns server in perl
by amir (Sexton) on Feb 08, 2002 at 05:39 UTC
    I agree, Net::DNS is slow. dnsd's caching is _really_ primitive, and was/is just a hack until I implement some more features, like a better cache system, a "real" place to keep zone files in, etc. My main focus currently is a DNS server that can be used for serving domain names (authoritative servers for domains) and then I plan to extend it to implement remote queries and some optimizations that crazyinsomniac has made me aware of.

    What are you using to write your DNS server? Are you using Net::DNS modules to parse the message? or do you have some other and faster way of parsing the DNS query?

      Greetings,
      Yep, all the packet work and the outside query lookups are done by Net::DNS.

      I'm not entirely sure (Admittedly, I've never really gone into that much detail to debug) WHAT it is precisely that Net::DNS takes so long with, whether its the outside lookups, or the packet work.
      After caching an object, I can return it back very quickly (as is the point), so I don't think the basic packet disassembly/reassembly functions are particularly slow - I'm pretty sure the problem is mostly in the query/send/search functions.

      JP,
      -- Alexander Widdlemouse undid his bellybutton and his bum dropped off --

Re: Re: dns server in perl
by Anonymous Monk on Feb 11, 2002 at 21:44 UTC
    The 'core' file in that directory isn't very encouraging ;p But seriously, its a great thing to get a functioning dns server writing in perl -- since customizing such a thing to work with some type of custom management system would be considerably easier. - Jon

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://144036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-26 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found