Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!ra!Ra.MsState.Edu!fwp1 From: fwp1@CC.MsState.Edu (Frank Peters) Newsgroups: comp.protocols.tcp-ip.domains Subject: Bind mods to call a program Message-ID: Date: 8 Feb 91 04:19:25 GMT Sender: usenet@ra.MsState.Edu Distribution: comp Organization: Computing Center, Mississippi State University Lines: 38 Nntp-Posting-Host: ra.msstate.edu Hello, As part of a load-balancing scheme I would like to experiment with I'd like to make the following modification to bind 4.8.3. I would like to add (purely internal to my named) a new record type PROG that would specify a program to be run. The output of this program would then be returned to the querying host as an A record. As an example of what I mean suppose I have a set of suns that are licensed to run a software package 'foo' and I would like to make foosun.where.ever return the least loaded of these hosts. I might put an entry like the following in my zone file: $ORIGIN where.ever. FooSun PROG /usr/local/adm/leastload MX 10 MailHub.where.ever. When named receives an A record request for FooSun.where.ever it would run leastload passing it the hostname as an argument. Leastload would then return an IP address (or exit with one of various result codes to indicate various errors). That IP address would then be returned in an A record (with a very short life span) as if the A record were in the database. I've heard various rumors that something similar has been done by various people but have never been able to actually get ahold of anyone who has. So, before I start hacking at bind, has anyone made modifications similar to the above that they'd be willing to share? Thanks in advance. FWP -- Frank Peters Internet: fwp1@CC.MsState.Edu Bitnet: FWP1@MsState Phone: (601)325-2942 FAX: (601)325-8921