/*
 * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl.
 * 
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the
 * above copyright notice and this permission notice appear in all
 * copies.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET
 * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
 * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
 * USE OR PERFORMANCE OF THIS SOFTWARE.
 * 
 * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was
 * conceived and contributed by Rob Butler.
 * 
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the
 * above copyright notice and this permission notice appear in all
 * copies.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER
 * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
 * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
 * USE OR PERFORMANCE OF THIS SOFTWARE.
 */

Bind DLZ (Dynamically Loadable Zones)

Bind 9, the latest version of the popular DNS server, provides more 
features than any previous version.  However, it still requires you to
modify the configuration file to add or remove zones.  Afterwards, you
must restart or reload Bind to have those changes take effect.

This causes several problems.

 - The DNS server is unavailable for service while it is restarting or 
   reloading zones.  If you add or remove zones often enough, your DNS 
   server is spending more time reloading data than serving that data.
   
 - For systems with a large number of zones or records, manually editing 
   flat files can be error prone and time consuming.  Generally, system 
   administrators will use custom scripts to read from a database and 
   create Bind's configuration files.
   
 - For systems with a very large number of zones, using Bind can be 
   particularly difficult.  By default, Bind stores all zone information in 
   memory.  This often requires the kernel to be recompiled or specially 
   tweaked to allow Bind to use huge amounts of memory.

Bind - DLZ eliminates these problems.  DLZ moves all zone and record data 
into an external database.  Changes can be made to the database without 
restarting or reloading Bind.  Management of zones and records becomes a 
simple task of adding, deleting, or updating database entries.

DLZ should not be confused with dynamic DNS update, as they are not the 
same.  The name DLZ (Dynamically Loadable Zones) was chosen because when 
using it, Bind does not need to load zones at startup as it normally does.  
Instead, Bind will ask a driver for zone and record information when 
needed to answer a DNS query.  Thus, the zone data is "dynamically loaded" 
from the database as needed.  DLZ does not cache data; every DNS query 
will result in another database search.

DLZ is modular and supplies an API for use by a driver.  A driver is 
responsible for communication between Bind and the database.  In this way, 
any database with any schema may be used; just implement (or find) the 
appropriate driver.

Actually, it is very unlikely anyone will use the DLZ API.  The DLZ API 
requires the use of Bind objects, and writing a driver utilizing the DLZ 
API directly would be difficult.  Instead, a "driver filter" has been 
developed called SDLZ for Simple DLZ.

The SDLZ makes use of the DLZ API, and then provides another API for use 
by driver developers.  The SDLZ API is extremely similar to Bind's SDB 
API.  In fact, it was originally hoped that a single driver would be able 
to perform double duty as a SDLZ or SDB driver.  However, early in code 
development it was determined that would be difficult and could result in 
poorly structured code.

The SDLZ's job is to translate Bind objects to ASCII text for simple 
drivers to use when searching a database.  Also, the SDLZ "filter" 
translates the driver's ASCII responses back into Bind objects for use by 
the DNS server.  In this way, SDLZ driver developers can work exclusively 
with ASCII text and need not be concerned about Bind's data structures.

The SDLZ API imposes a few limitations, similar to the limitations of the 
SDB API.  These limitations are:

 - No support for DNS Dynamic update.  You can update records in the 
   database through external means, but you cannot update the database via 
   DNS update queries.
   
 - No support for IXFR (Incremental zone transfer) responses.  IXFR queries
   will have an AXFR (full zone transfer) response.  For IXFR to work, Bind 
   must be able to determine what changes have occurred to the zone since 
   the last transfer.  The SDLZ moves all zone data outside of Bind, and 
   it has no way of tracking changes to that data, so IXFR would be 
   meaningless.
   
 - The DLZ API imposes an additional limitation.  Your DNS server may 
   support multiple DLZ / SDLZ drivers and multiple databases, but only 
   one DLZ / SDLZ driver may be used per view.

Normal zones may co-exist alongside DLZ.  The addition of DLZ to Bind 
does not limit or prevent the normal operation of Bind.  You may still use 
zones in Bind as you always have.  Be careful when using (S)DLZ alongside 
normal zones.  Bind's standard zones get precedence.  So if you define a 
standard zone, and then add the same zone to (S)DLZ, Bind will only return 
data from the standard zone file.

For more information, you can read the documentation on the DLZ and SDLZ 
API.  Most driver developers can skip directly to the SDLZ API 
documentation.


