[bind10-dev] DNS packet API: the name object

Jelte Jansen jelte at isc.org
Tue Aug 25 08:38:02 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Graff wrote:
>
> I'm really worried about efficiency in the packet / rdata parsing /
> writing code.  It's something we will be doing a lot, so I feel this is
> one module that needs to have measurements made on speed.  No specific
> design requirement needs to be there, but as we add stuff we should keep
> in mind what it can do to performance.
> 
> I'm also worried about in-memory storage, but that is probably more of a
> database issue.
> 

well that depends on how we use this specific part, see below

> I think it's also useful to document how we use this API, or expect to
> use it.  Here's what I came up with:
> 
> An auth-only server would parse incoming packets, and format outgoing
> ones.  For incoming only a small number of records will typically be
> parsed (the query, OPT, and TSIG mostly) but for outgoing, any record
> may end up being rendered.
> 

actually, but again there might be a tie-in to the database, it will also need
to parse notify packets and the following *xfr packets (i.e. everything, at
least enough to be able to check and store them)

> In general, the outgoing records won't need to be processed more than a
> simple rendering.  Thus, storing them in wire format in memory might
> actually be a win.  Rendering them from variables would be slower.  This
> may be a database issue again, but if we are going to use this API, I
> would want to avoid a "parse" followed by a "render" -- that is, if the
> database can store wire format data, it should not need to be touched
> (much.)
> 

+1

we might also want to think about how to efficiently do name compression, which
makes it a bit more involved even if all rrs are stored in wire format, and if
we want to be memory-efficient for in-memory zones; whether we need to have a
separate name for every rr, or that we could have names that contain (class,
type, ttl) tuples, which in turn contain rdata sets, and for dnssec the
associated sigs and nsecs (yes yes, all database again). Perhaps some c++
smartness could help in this regard, but i'm not completely up to speed on that yet.

Will this part of the API be used to communicate with the database API?

Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqTouoACgkQ4nZCKsdOncWEtACgzny+jJo8lYR7iuQYx3vlt5dG
pR8An1A4eE9qTDyh5vH62iP7A5Z/pzmr
=59ZJ
-----END PGP SIGNATURE-----



More information about the bind10-dev mailing list