kcd at daimlerchrysler.com
Mon Jun 27 20:17:21 UTC 2005
Frankly, I don't really understand what you are trying to accomplish.
$GENERATE and the other zonefile directives only apply to *master*
servers. Master servers don't store their data in "cache", _per_se_,
they store them in authoritative data. So, what is the purpose in
synthesizing these records on the fly? To reduce the memory footprint of
the authoritative data? I suppose that might be a laudable goal, but
understand that there is more processing involved with synthesizing
these records, so you're basically just trading off memory versus CPU.
Maybe you could implement some sort of LRU (least-recently used)
algorithm so that the "popular" records are kept in memory and only the
"unpopular" ones are synthesized on-the-fly. That might work, but it
sounds like it would require a non-trivial amount of coding to implement.
Also, consider what happens when a slave replicates the zone via AXFR.
You have to synthesize *all* of those records anyway. And you have to
repeat that for every AXFR. Of course, it's possible to replicate zone
data "out of band", but don't expect ISC to get terribly enthusiastic
about a feature that only works efficiently when non-Internet-Standard
methods are used for replication...
Mike A wrote:
> i am currently trying to code an option like $GENERATE but instead of
>generating the records in advance, it would generate them on the fly and
>cache them. Currently i have code in place that generates a hostname from a
>requested IP address however i am not sure how to get bind to add it to the
>cache and return the generated hostname as a ptr record.
>The code to generate the hosts on the fly was inserted inside the else
>statement in lib/dns/rbt.c around line 1028. As far as i know, this
>populates the foundname with the generated hostname but doesn't do anything
>in regards to adding a record to the rb tree or getting bind to return this
>Can anyone tell me what is needed to make bind return the result generated
>in the foundname variable or give some hints to find out?
>If this is the wrong place to be asking, could someone suggest a better
>thanks in advance,
More information about the bind-users