pgeodns plans - modular Perl based name server

| 6 Comments

Kajang Night MarketI've been working on the pgeodns nameserver again. It's fun picking up years old code. Currently we're using it for various perl.org services to geographically distribute requests and I'm working on some new features so we can use it for that and to more carefully load balance the servers in the NTP Pool. I've been working on writing tests for
everything and since then refactoring the code to get it cleaned up while adding a few features.

It's tempting to have a generic all-purpose super flexible modular nameserver platform, so I might take a cue from qpsmtpd and make all the Real Logic be plugin driven.

For most DNS serving I use MyDNS which serves data out of MySQL, so one of my use cases would be "could I re-implement MyDNS in a plugin?".

So following that thought I'm thinking I should re-shape Net::DNS::Nameserver to be Danga::Socket based. Why? Well, so I can integrate Gearman to help do to MySQL lookups in an asynchronous fashion.

You want your nameserver to 1) Not Block and 2) Be Fast. This will accomplish 1), but not necessarily 2). We'll see which direction I go. For now I just need to add a few features ...

Update: The solution a few years later was to rewrite it in Go.

6 Comments

A qpsmtpd alike for DNS would be neat. I currently have a custom DNS server for this, but it would be nice if I could use a server which could do other things so I didn't have to dedicate an IP for it. It could be interesting to port OzymanDNS to a server like this too..

Hi there,

Yeah - doing multiple things at once would be a nice benefit.

One of the tasks is to come up with the things that makes doing DNS even easier -- given how easy a protocol it is to work with already.


- ask

Bjoern,

You may want to look at PowerDNS, my open source nameserver. It includes the geobackend, which is for example used by the Wikipedia to connect the world to the closest Wikipedia cluster.

Additionally, PowerDNS includes the 'pipebackend' plus a sample perl script, which together allow you to programmatically provide DNS answers.

This may be a quick answer for your needs, although writing a nameserver yourself can be fun!

Bert

PowerDNS can already do this with the 'geo' backend; it's what Wikipedia uses to distribute their load:

http://en.wikipedia.org/wiki/PowerDNS#PowerDNS_and_Wikimedia

Have a look if you are interested.

have you tried powerdns?

it supports various SQL backends and has a geo backend aswell.

hope this helps

Yeah - I have looked at PowerDNS. It doesn't really give me any benefits in this use case. What we do is a bit more complex than just "picking the country". It could help with some of the bit-shufling, but I use Net::DNS::Nameserver and code I already had to do most of the "low-level work", so the logic I need to implement is about the same either way and then it's nicer to manage a simple perl script than a much more complex system.

About this Entry

This page contains a single entry by Ask Bjørn Hansen published on September 14, 2007 8:50 AM.

Free GPS time server equipment! was the previous entry in this blog.

Idiotic captchas - fooling the humans is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.38
/* bf */