# Copyright (c) 1998 University of Southern California. # All rights reserved. # # Redistribution and use in source and binary forms are permitted # provided that the above copyright notice and this paragraph are # duplicated in all such forms and that any documentation, advertising # materials, and other materials related to such distribution and use # acknowledge that the software was developed by the University of # Southern California, Information Sciences Institute. The name of the # University may not be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. LSAM AUTO-CONFIGURING HIERARCHY =============================== Document Version: 1.1 (3/18/98) More information: http://www.isi.edu/lsam/routing Introduction: ------------- This system uses multicast neighbor discovery to automatically build a simple cache proxy hierarchy. A separate routing daemon is started that REWRITES the Apache 'httpd.conf' file in order to add a "ProxyRemote *" redirect (if one is not already present). This will provide basic request aggregation points where the LSAM multicast channel mechanisms can be used to subscribe to high-demand channels. In addition, we expect this mechanism to be useful in other cache proxy systems, which currently require manual configuration of the proxy hierarchy. Currently, manual configuration requires the proxy administrator to manually discover neighboring proxies, evaluate their position within the cache mesh, and add appropriate directives to the proxy configuration files. This LSAM mechanism only requires that both "client" and "exit" proxies are configured to indicate their respective status; all other proxies with the hierarchy are self configuring. The former, "client" proxies, belong to individual users who do not want to accept requests from other proxy servers. The latter, "exit" proxies, do not forward requests to other proxies; these proxies are located near the top of the internet network topology (e.g. a well-connected major backbone carriers), where it is more effective to forward requests directly to the origin server rather than another proxy. These configuration directives are simple, and allow the LSAM proxy to build a basic request routing hierarchy. The auto-configuring hierarchy system is currently implemented as a separate daemon that is started by Apache (eventually, we expect to integrate this functionality as a standard Apache module). This daemon ('tree') reads the httpd.conf file looking for its configuration directives, and REWRITES the httpd.conf file to add a line as follows: ProxyRemote * http:// The daemon does not add the "ProxyRemote" directive if there is already a manually configured "ProxyRemote" directive in the file. Further, directives added by the auto-configuration daemon are marked as such, so later instances of the daemon may override them. Compilation ----------- 1. Build apache with _LSAM_R directive on. To do this, copy file Configuration.LSAM.tmpl to Configuration, uncomment the following line: #EXTRA_CFLAGS+=-D_LSAM_R and build apache as usual (more info on how to build apache, please look at apache documentations). 2. To build the routing daemon, do the following steps: cd apache/src/modules/extra/lsam.routing make clean all make install this will install the routing daemon in /usr/local/sbin, where the LSAM modified apache will try to find and fork it off. Configuration Directives: ------------------------- In order to make minimal changes to the Apache code (i.e. the configuration parser) and still have our configuration directives appear in the standard "httpd.conf" file, the directives for auto-configuration of the hierarchy appear as comments within the Apache "httpd.conf" file. The directives are as follows: # LsamRoutingNodeType {ClientProxy, NoParentProxy, SelfConfiguringProxy} ClientProxy will accept no children, NoParentProxy will forward to origin servers rather than within the hierarchy, and all other proxies should be a SelfConfiguringProxy. DEFAULT VALUE: SelfConfiguringProxy # LsamRoutingMulticastAddr <224.x.y.z> # LsamRoutingMulticastPort # LsamRoutingUnicastPort These are the addresses and ports used by the daemon to discover neighboring proxies, and to exchange hierarchy information. All proxies MUST use the same values. DEFAULT VALUES (respectively): 224.192.1.2, 6666, 5556 # LsamRoutingSearchMinHops # LsamRoutingSearchMaxHops # LsamRoutingSearchMinNeighbors These values configure the search bounds for neighbor discovery. The minimum and maximum values for an increasing hopcount multicast search, and a target number of neighbors which is sufficient to end the search. DEFAULT VALUES (respectively): 3, 10, 3 # LsamRoutingMaxDepth Value to limit maximum depth of the request routing tree. Since each proxy forward adds delay, this value is a "fuzzy" upper bound to be imposed on this delay. DEFAULT VALUE: 5 # LsamRoutingMaxChildren Value to limit the number of children forwarding through this proxy; too many children will cause the cache to cycle too quickly, and reduce hit rate and cache effectiveness. DEFAULT VALUE: 20 Execution --------- Execute apache as usual. No special arrangement. Only make sure that "tree", the hierarchy daemon, is in /usr/local/sbin. Upcoming Features ----------------- * Stable version of the routing daemon which contain crash prof soft state refresh of the hierarchy. * Integrated in the apache main source. * Cut-through request routing by doing simultaneous request up to the hierarchy and to the origin server.