[Sugar-devel] Notes on service discovery XS/XO

Martin Langhoff martin.langhoff at gmail.com
Mon Apr 20 13:26:28 EDT 2009

On Mon, Apr 20, 2009 at 6:56 PM, Jonas Smedegaard <dr at jones.dk> wrote:
> I don't understand your question.  Sounds like prefetching that isn't
> part of dns (id you perhaps think of DHCP here?)

I don't have my well-worn "DNS and BIND" book with me right now but I
am positive that the server side can decide to give the client
additional entries. It's colloquially known as the "additional
section". Been doing BIND and djbdns admin for 10+ years.

If we have - for example - <10 services, it is an excellent bw saving
strategy to push the 10 services in the additional section, so that
the client caches it in the first request, rather than issuing 10
separate requests.

> You are right that BIND9 is a bastard with memory consumption, and it
> makes sense to use dnsmasq on the XS.  I just didn't think of that - I

Well, right now we have BIND + DHCP. BIND is a serious mismatch for
the XS. We are doing quite a bit of advanced dhcpd configuration which
we will want to replicate. For a quick summary:

 - We just have a small handful of important local names to serve via
DNS (but we may want to push them in the 'additional section' as
oulined above).

 - For the DHCP svc we listen on various network interfaces and assign
addresses in _different netblocks_ according to the network interface
that received the request. Tricky! See

 - To make matters more complex, my plan is to evolve towards
assigning different addresses once the user registered -- to
cordon-off internet access, a bit like pay-to-play internet-cafe
routers do. That requires a bit of poking at the dhcp daemon to
whitelist specific MAC addresses and forcing the user to re-request
the lease.

 - It would be nice to resolve dhcp-assigned hostname->addresses and PTRs

> suggested it as a caching-only on the XOs.  ISC DHCPd has a complex
> macro language, however, which might be the upsight you cannot live
> without. Beware that it is DHCP, not DNS ;-)

dnsmasq offers dhcp. If we put in the effort to switch from BIND, and
get consolidate on a single daemon, we win big time. Remember: this is
an embedded platform and each meg we free up is a bit more scale we
eke out of low-spec'd servers.

> Tell me more specifically what you fear can be tricky to handle in
> dnsmasq, either DHCP or DNS parts, and I shall have a look if I am any
> good at helping out.

Well, I've fleshed it out as much as I could. I don't think it's easy,
and it probably means discussing it in the dnsmasq list (pfg says the
author is really nice), trying out alternatives, seeing what works,
whether any of the weird configs we want works but gobbles up RAM,
segfaults on Wednesdays, etc.

But if you can give me a hand taking control of this, it will be
hugely welcome, and you got guaranteed free beers in all the
conferences we meet at.


 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff

More information about the Devel mailing list