Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!sol.ctr.columbia.edu!emory!ra!Ra.MsState.Edu!fwp1 From: fwp1@CC.MsState.Edu (Frank Peters) Newsgroups: comp.unix.wizards Subject: Re: load sharing Message-ID: Date: 6 Feb 91 19:40:17 GMT References: <25860@adm.brl.mil> Sender: usenet@ra.MsState.Edu Organization: Computing Center, Mississippi State University Lines: 52 Nntp-Posting-Host: jester.cc.msstate.edu In-reply-to: pjw@usna.navy.mil, , jw@math30,'s message of 6 Feb 91 16:22:07 GMT : On 6 Feb 91 16:22:07 GMT, pjw@usna.navy.mil, , jw@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@CC.MsState.Edu Bitnet: FWP1@MsState Phone: (601)325-2942 FAX: (601)325-8921