home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / tplb / NOTES
Encoding:
Text File  |  1996-10-25  |  17.7 KB  |  370 lines

  1. >>> bind/workers:582
  2.  
  3. Date:    09 Jun 1994 16:26:21 PDT
  4. From:    brisco@hercules.rutgers.edu (Tp Brisco)
  5. Subject: Re: Using DNS to Load Balance
  6.  
  7. > >     The upshot of the changes is that BIND can run a specific
  8. > > program to do the zone transfer.  The program should - of course -
  9. > > make various appropriate computations, and reorder the RRs as
  10. > > you see fit, then return an appropriate exit code to indicate
  11. > > the relative success of the zone transfer --- viola!  You can
  12. > > have the RRs reordered with as much frequency as you dare turn
  13. > > down the TTLs (I've gone as low as 5 minutes with no apparent
  14. > > ill effects).
  15. > > 
  16. > Maybe I'm missing something here but why not use the ROUND_ROBIN feature
  17. > to give one of a list of addresses. It works well for load balancing
  18. > here and doesn't require zone transfers. e.g
  19. > appl    IN    CNAME    sys1
  20. >     IN    CNAME    sys2
  21. > sys1    IN    A    127.0.0.1
  22. > sys2    IN    A    127.0.0.2
  23. >     IN    A    127.0.0.3
  24. > results in sys1 getting half the load and each address on sys2 getting
  25. > a quarter.
  26. > I don't know if ROUND_ROBIN is available in all implementations. I found it
  27. > in name 4.9.2.
  28. > Simon Hamilton
  29.  
  30.     The problem that _we_ ran into was that ROUND_ROBIN works on
  31. everything with multiple similar record types -- which isn't
  32. necessarily what we wanted.
  33.  
  34.     Particularly; I've seen other people "gripe" about the NS
  35. records getting shuffled.  Additionally, at Rutgers, we depend
  36. (*cringe* - don't flame) on the ordering -- in particular; we've
  37. got some "cluster" machines that have "private" networks for
  38. intra-cluster communications.  We'd prefer those A RR's to not be
  39. mucked with.  (BTW:  we do advertise the less preferential
  40. addresses, since we'd prefer that those be used - but only if the
  41. more preferential addresses are dead for some reason).
  42.  
  43.     Also; the ROUND_ROBIN approach assumes that the ratios
  44. of distinction of "load" don't change - i.e. when that 
  45. big SAS user logs onto "sys2" and throws your statistical
  46. model out of whack.  The ``SETTRANSFER'' (my compilation
  47. conditional) can _react_ to actual load changes - if you
  48. so wish.
  49.  
  50.     Don't get me wrong - if ROUND_ROBIN works for you - use it in
  51. good health.  [ Anyone know what happended to the "SHUFFLE_A"
  52. code?  Was is superceded by the ROUND_ROBIN?  ] ROUND_ROBIN does
  53. a fine statistical randomization (in fact, one of the early
  54. proposals I put forward was a _weighted_ statistical
  55. randomization technique).  ROUND_ROBIN did, however, have a
  56. couple of unpleasant surprises for us.
  57.  
  58.     One of the drawbacks of *ALL* RR _ordering_ mechanisms is
  59. that the *&*^%^ "sortlist" qualifier (I think it's in the
  60. resolver - but may be in both) can really undo all the hard work
  61. we've all put into this ....  I _should_ point out that the
  62. SETTRANSFER doesn't *have* to return all RR's - though it is
  63. recommended (in general) - so if you want to *force* a particular
  64. address (in spite of the bloody sortlists out there), simply
  65. return only a single record - but that could have some nasty
  66. surprises also (e.g.  failed connections).
  67.  
  68.     Lastly, with the low-TTL "SETTRANSFER", there's nothing to
  69. stop you from changing the *content* of the records either (just
  70. imagine the fun you can have with TXT records now!).
  71.  
  72.     So far, I've not found something I _cannot_ do with the
  73. SETTRANSFER code and a shell script -- just for kicks I had BIND
  74. paging our sysadmin for a while ....  (though he didn't seem to
  75. see the humor in it).
  76.  
  77.     Yes - there is more overhead associated with the zone
  78. transfers - but that the frequency of zone transfers and the
  79. computation incurred at each transfer is 100% under your control.
  80. *You* choose how often and how intensely.  Quite frankly, from
  81. the observations I've made, the extra CPU-expense incurred by the
  82. zone transfers still pales in comparison with the overhead of
  83. BIND in general (that's not a complaint - just an observation).
  84.  
  85.     My next idea was to put PostScript (tm) into TXT RRs and
  86. have a little PostScript interpreter built into BIND.  SRA,
  87. however, recommended Lisp ....   Maybe FORTH would be a better
  88. idea ...  Hmmm... Perl anyone? ;->
  89.  
  90.                                 Tp.
  91.  
  92. ...!rutgers!brisco (UUCP)               brisco@pilot.njin.net (Internet)
  93.     brisco@ZODIAC (BITNET)              908-445-2351          (VOICE)
  94.  
  95. Just say "Moo"
  96.  
  97.  
  98.  
  99. >>> bind/workers:583
  100.  
  101. Date:    Fri, 08 Apr 1994 13:55:10 EDT
  102. To:      Paul A Vixie <paul@vix.com>
  103. From:    Tp Brisco <brisco@hercules.rutgers.edu>
  104. Subject: Re: Appropriate time to ...
  105.  
  106.  
  107.     Hmm - I probably should've waited until I was in a better
  108. mood before I replied to you ...
  109.  
  110. > i'd like you to consider my views on all this, even though you've
  111. > clearly got a lot invested in the way you're doing it now.  i do
  112. > not think that doing this in the zone transfer mechanism is at all
  113. > the right way.  reasons against it include:
  114. > (1)    transfer ordering is NOT deterministic unless all hosts do the
  115. >     same (unspecified) thing with ordering and there are always the
  116. >     same number of hosts in the path from primary-secondary-resolver
  117. >     (consider older BIND versions that used LIFO ordering of cache
  118. >     RR's).  the best thing you can guarantee, without changing the
  119. >     protocol so that the ordering is _specified_, will be the same
  120. >     as round robin: stochastic randomness.
  121.  
  122.     Ah, under the ``TRANSFER'' scheme there are no primaries,
  123. just secondaries.  Each secondary should be doing it's own
  124. computation - so that primary->secondary reordering isn't really
  125. an issue.  There isn't even a way of defining "dynamic
  126. information" in a primary under my scheme.  Resolver code - at
  127. least the code that I've looked at in detail - is generally
  128. incredibly stupid (not to mention non-compliant).  Unfortunately,
  129. it appears that most people are using fairly ancient resolver
  130. code - and broken code at that.  Emperically I've noticed that
  131. the resolver code typically uses just the first RR anyway - most
  132. fail - a few will actually walk down the RRs if multiple A's are
  133. provided.  None (that I've noticed) make appropriate use of the
  134. "additional info" section of the responses.  The secondary ->
  135. resolver relationship is simple enough that it shouldn't be a
  136. concern about reordering inside of there.  Things like sortlists
  137. and such can be problematic, but you get what you asked for
  138. (whether thats what you intended or not).  Even sortlists provide
  139. minimal problems - sortlists typically sort based upon network
  140. number - and most cluster elements exist on the same LAN for
  141. pragmatic reasons.  In cases of sorting networks based on
  142. topology, then presumably the hop-count is more important than
  143. actual load-sharing anyway.
  144.  
  145.     Anyway, without my editorializing on resolvers, the key
  146. point is that primaries don't exist for "dynamic zones" - but
  147. rather a series of one or more secondaries exist, and each
  148. calculates the information independantly.
  149.  
  150. > (2)    when you begin to apply cluster-style balancing based on load
  151. >     average or some other metric, you will quickly find that the
  152. >     host metrics change much more often than you will be prepared
  153. >     to do zone transfers.  are you prepared for 15-second MIN TTLs?
  154. >     15-second refresh?  one minute would almost work right now, but
  155. >     as hosts and networks keep getting faster at 2X every 18 months,
  156. >     with many "sessions" being like WWW (connect, grab, disconnect;
  157. >     repeat at intervals), 15 seconds will still end up being too
  158. >     short.
  159.  
  160.     I think we both need to admit that "balancing" based upon load
  161. averages is a fallacy - at least on systems that aren't prepared
  162. to dynamically move existing sessions between hosts without blowing
  163. the connection.  Nothing that I know of is capable of this today -
  164. and if that becomes the case - we're going to have to re-think DNS
  165. from the ground up.  The sad fact is that _any_ load balancing is
  166. going to be an approximation - simply because "load" isn't an
  167. easily measured fact (take a look at OPSTAT some time! Sheesh!).
  168.  
  169.     I think I'm prepared for 15 second TTLs - but is BIND?  :-)
  170. If you look at the DIFFS (anonymous ftp to
  171. pilot.njin.net:pub/TRANSFER/*) and the README I indicate that I
  172. torqued down (apparently successfully) the hard-limit minTTL of 5
  173. minutes down to 1 minute.  For "most" load-balancing applications
  174. this should be sufficient.  The FYI (it isn't an RFC for a reason
  175. ...)  talks about this as being "reasonable" (no, it's not
  176. impressive, but it does easily solve the bulk of the problems out
  177. there - with no mods to the protocol).  Undoubtedly the smallest
  178. safe granularity of measure CPU type loads is the 1 minute mark,
  179. anything less than that starts to be meaningless.  Let's face it,
  180. if you take the sample rate down to about 1 * 10^9 you start
  181. finding the load either 100% or 0% (I've faced a lot of these
  182. same problems in measuring networks - OPSTAT has run across a lot
  183. of these problems also).  I think I can safely claim that
  184. statistics just isn't prepared to deal with an overly small
  185. sample in order to extrapolate to such a large change.
  186.  
  187.     Again, this is engineered to solve 90% of the existing needs
  188. today.  The other 10% are complex enough to warrant "special
  189. purpose nameservers" (I think the FYI states this blatantly).
  190. The truth of the matter is, is that if you _really_ want 100%
  191. accurate / 0TTL based information, you need a specialized
  192. nameserver for the time being (until we can figure out a better
  193. way of doing this altogether).  My FYI has generated about four
  194. copies (from random people out on the net) who have written
  195. "specialized nameservers" to deal with such problems when they
  196. have them.  The big problem is for the other 90% of the people
  197. who need a generalized mechanism for multitudes of problems where
  198. "reasonably accurate" is all they need.  I believe that this
  199. solves those problems in a general way, with reasonable CPU
  200. impact.  I don't claim that it is glossy, impressive, or
  201. otherwise technologically astounding - but pragmatic solutions
  202. rarely are.  (Which is probably why Bill Gates is rich, and I'm
  203. not).
  204.  
  205. > the "right" way to do this, as i've said all along (though my words on this
  206. > are probably buried so far back in the namedroppers archive that most people
  207. > have never seen them), is to add some kind of weighting, via either SNMP or
  208. > new RR types, that the resolvers can use to make ``directed'' ordering choice
  209. s
  210. > after they receive a list of addresses.  probably using a new RR type is best
  211. > since this information will have to be cached lest we start melting wires.
  212. > i recognized this as a good aspect of your original CIP proposal, though i
  213. > wasn't completely please with the overall CIP approach since there was too
  214. > much that was new about it.
  215. > you just cannot do clustering on top of host-address information without some
  216. > kind of meta-data directing the clients.  the BIND resolver already does
  217. > address reordering based on network connectivity (preferring close addresses
  218. > to more distant ones) which would blow away any ordering you did manage to
  219. > achieve with the zone transfer ordering approach.
  220.  
  221.     I certainly agree with you here - but maybe for different
  222. reasons.  As I see it, the clients will ultimately want to order
  223. information based upon their own criteria - so we should be (at
  224. least) shipping around vectors of information instead of points
  225. of information.  Then allow the client side to do all the
  226. computation they wish in order to select the appropriate record.
  227. I believe my next stab is going to be to put a PostScript
  228. interpreter inside of DNS and have TXT records shipped around
  229. with little programs inside of them in order to ascertain the
  230. appropriate RR to return - this 100% dynamic client-derived
  231. information is going to be the only ultimate solution.  This
  232. information could be cached, and re-executed as necessary to
  233. derive new information.
  234.  
  235.     As far as I can _really_ tell what was wrong with the CIP
  236. proposal is that (from the DNS WG / IETF standpoint) it specified
  237. "different" RR handling - and was therefore a change to the DNS
  238. specification, and was therefore akin to helping the USSR get
  239. back together.  (Look, _I_ don't consider the DNS spec as
  240. something holy - the Internet/ARPAnet _used_ to be set up so that
  241. things evolved.)
  242.  
  243.     See my notes above re: client-side reordering.
  244.  
  245. > i know you've spent a lot of time shepparding this through the IETF, and i'm
  246. > sure you're ready to shoot me for suggesting a return to first principles.
  247. > but
  248. > while you've been doing what you've been doing, i've been considering the
  249. > implications of dynamic address assignment (distributed database updates sent
  250. > from terminal servers back to name servers), mobile hosts (ip address changes
  251. > as you pass through cell boundaries; a new "LOC" (location) RR that's updated
  252. > based on GPS data in the client); multi-homed hosts (not well solved yet);
  253. > variable width subnetting on non-octet boundaries (in-addr.arpa isn't enough,
  254. > and we're going to have to be able to express subnet boundaries and maps in
  255. > the DNS itself if OSPF and CIDR are really going to save us from running out
  256. > of IP address space).
  257. > in other words, i'm viewing the clustering issue as part of a much wider
  258. > problem set and i would like to find a common architectural principle that
  259. > will make all of these problems easier to solve.
  260. > doing it via zone transfers is not the answer i was hoping for.
  261. > sorry to be a pill about this.
  262.  
  263.   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<- Not a problem.  Let's just make
  264. sure and leave most of the fighting here.  I've seen your work for
  265. years, and appreciate 99.9% of it greatly.  While I'm willing to
  266. argue vehemently over this - I can't say the same for most of
  267. the other things I'm involved in :-).
  268.  
  269.     Re; the shepparding through the IETF.  I really can't get too
  270. hot about it - frankly much of what you are saying is what I was
  271. saying when I first walked in.  To my own self, I've backed off
  272. on a number of design principals in order to get _some_ standard
  273. set.  What I do like about this approach is the near-insane level
  274. of flexibility it provides, and frankly it _is_ a bit of a
  275. "clever hack" (though I cannot claim to be the sole source of the
  276. idea).  I suspect that the kernel of the idea originated with Jon
  277. Postel, but so much "committee" was going on that it is difficult
  278. to trace back any single portion of it (which is why the FYI
  279. discusses so much of the history - both to give credit, and to
  280. avoid having someone else suffer through that much committee work
  281. again).
  282.  
  283.     I suppose the worrisome thing about the IETF is that after
  284. you listen to it enough, it starts to make sense.  Look carefully
  285. at the problems you mention above:
  286.  
  287.         1) load balancing
  288.         2) multi-homed hosts
  289.         3) dynamic addressing
  290.         4) mobile hosts
  291.         5) GPS "LOC" information
  292.         6) subnet masks
  293.         7) OSPF/CIDR
  294.  
  295.     1&2 are essentially the same "class" of problem, as are 3&4.
  296. 5&6 are yet another.  7 is, of course, a problem unto itself :-).
  297. 1&2 are *descriptive* based problems - where we describe a given
  298. situation.  3&4 are *prescriptive* based problems - where only
  299. the hosts can really feed us the information.  5&6 (in a perfect
  300. world) could be fixed by relatively flexible TXT-like records.  5
  301. could conceivably be considered to be of the same class as 3&4.
  302. We can't really solve 7 until we're sure that it is the correct
  303. problem.
  304.  
  305.     The FYI doesn't attempt to solve all of these.  In fact, I
  306. would guess that you'd get a considerable amount of friction if
  307. you tried to solve (2) inside of the DNS server.  In some sense,
  308. 3/4/5 hinge around the ability for hosts (or some trusted third
  309. party) to update the server in a believable way (I can just
  310. imagine the fun if we tried to put in GPS LOC info in the
  311. existing records - we could make people appear all over the world
  312. :-).  3/4/5 is undoubtedly best addressed by the "dynamic update"
  313. people (and 4 only if we agree to treat mobileHosts along the
  314. lines that cellular phones are handled).
  315.  
  316.     The upshot of what I learned is that (1) is not an atomic
  317. problem.  The closer I looked, the more problems I found.
  318. Statistical randomization (a'la CIP, RoundRobin, SA) is fine - if
  319. what you are trying to model can be done statistically.  Then I
  320. ran into one fine young gentleman who wanted A RRs ordered
  321. according to the RTT of packets - sounds insane doesn't it?
  322. Until I realized that I really wanted that also ...  It would be
  323. nice if Rutgers University had *one* nameserver (instead of the
  324. 12 it has now) and the topologically closest address "happened"
  325. to be the one that was presented first.  That way, I could tell
  326. all of my users the same thing:  "Use this name" instead of the
  327. current "if you're over there, use that name.  But if you go up
  328. to Newark, use this name instead".  Ugh!  Or "normal users" (of
  329. which we could have many a long drunken rip-roaring laughter
  330. over) really shouldn't be subject to topological optimization
  331. information - they're just not up to it (Look, I do have _some_
  332. sympathy for them :-).
  333.  
  334.     And yes, I had the "MobileIP" folks jumping on me to provide
  335. them with a solution via this mechanism also, but I saw that it
  336. really wasn't appropriate (and yes, I was there when we turned
  337. down their new RR request).  Yes I realize that this does not
  338. solve all of the problems - but it _does_ solve 1/7th of them,
  339. which is a helluva lot more than we've gotten out of the DNS WG
  340. in the last five years...  And no, this isn't the ultimate
  341. solution, but I do believe it is as close as we're going to be
  342. able to get with the current DNS mechanisms in place.  DNS simply
  343. just wasn't designed to handle extremely dynamic information.
  344.  
  345.     Grab a copy of the draft FYI and read over it.  You may
  346. be pleasantly surprised by how humble it really is.  Its not
  347. exactly rocket science, but ...
  348.  
  349.                                                         Tp.
  350.  
  351.  
  352.  
  353. ...!rutgers!brisco (UUCP)               brisco@pilot.njin.net (Internet)
  354.     brisco@ZODIAC (BITNET)              908-932-2351          (VOICE)
  355.                                         908-445-2351 as of 5/27/94 PM
  356.  
  357.     T.P. Brisco, Associate Director for Network Operations,
  358.     Computing Services, Telecommunications Division
  359.     Rutgers University, Piscataway, NJ 08855-0879
  360.  
  361. Just say "Moo"
  362.