load sharing

Frank Peters fwp1 at CC.MsState.Edu
Thu Feb 7 06:40:17 AEST 1991


: On 6 Feb 91 16:22:07 GMT, pjw at usna.navy.mil, , jw at math30, (Peter J. Welcher (math FACULTY)) said:

pjw> The question is, is there any easy way to perform load-sharing, other than by
pjw> randomly assigning sections or students to hosts ?  

I once toyed with an idea to do something like this using DNS but
never implemented it.

Basically the idea was to define a new record type in my local DNS
tables called PROG that would run the given program and return the
result in an A record to the calling program.

For instance, suppose I had a bunch of suns that were effectively
identical as far as mathematica is concerned.  I might define the
following in my DNS:

$ORIGIN wherever
MathSuns           PROG              /usr/local/adm/leastload
                   MX        10      My.Mail.Hub.Here.Edu.

And any A record requests for MathSuns would run the program, take the
IP address that results and returns it.  By passing the hostname to be
resolved as an argument I could use the same program to manage several
pools.

I think this idea has the following advantages:

1.  I'd be willing to bet that the necessary modifications to bind
    would be relatively trivial.

2.  Since all that ever gets returned is an A record no modifications
    are required to the world wide DNS system or to individual
    resolver clients.  And no front end host beyond the nameserver
    would need to be involved...none of this 'telnet to machine A and
    let it decide where you should go' stuff.

3.  The actual load program can be upgraded/replaced/modified with no
    changes to the bind code.  I can make leastload return a random
    host as a first pass, then the least number of users later, then
    the least loaded cpu and so on for finer levels of balance.  The
    two tasks (picking a destination and returning it to the user) are
    isolated.  I always did like modularity.

Any comments on this idea?  Any reason why it would be especially
difficult/impractical? 

Anyone who has actuall done this?? :-)

FWP
--
Frank Peters   Internet:  fwp1 at CC.MsState.Edu         Bitnet:  FWP1 at MsState
               Phone:     (601)325-2942               FAX:     (601)325-8921



More information about the Comp.unix.wizards mailing list