From: Dean Gaudet <dgaudet@hotwired.com> Date: 21 Jul 1996 22:30:38 GMT Michael Dillon <michael@memra.com> wrote:
And heavily used WWW servers are another thing that could benefit from aligning themselves with the topology.
The protocols don't support this cleanly. The _protocols_ DO support this (although "cleanly" could be questioned). Very few clients have ever attempted to implement it, and few of them even came close to getting it right...although there were some pretty good examples a decade ago... So far nothing I've seen would allow a single URL to be used to access the "nearest" server. Here's how the current standards specify that allow this to work(*): The URL has a "fictitious" hostname, which resolves via the DNS to a set of A records, one for each of the redundant servers that carry the data (these servers can be extremely widely separated). The client then applies an algorithm to select the "nearest" one (by its definition of nearest). In fact the spec says you should rank them and try in order several of the addresses, in case one is non-working. This is _exactly_ the functionality that distributed web servers need. The only possibly "unclean" thing about this is using the fictitious host name. Of course, the weak link here is allowing the client to make this decision. Most clients use the stupidest algorithm available, which is pick one (and only one, another violation) of the addresses, essentially at random, and use that. This has as likely a chance to pick the worst one as it does to pick the best one. There are several heuristics available to any client program (some were implemented over a decade ago :-) and there is some work (SONAR and SRV) addressing better answers. Unfortunately, there is a chicken-and-egg problem here. The client programmers have no incentive to implement the better algorithms because no services are provisioned this way, and that's because few clients would make use of the distributed nature. -MAP (*) And a clearly "unclean" way, which will work with existing clients, is to take a routing prefix and distribute _that_ around. The servers would all have the same address (making them hard to manage), and the routing prefix would be advertised from each of these locales, and routing would find you the "closest" one. After all, you really are looking at a routing problem here. (Although something about hammers and looking like nails comes to mind. :-)