%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Globally Distributed Content (Using BGP to Take Over the World)
% Paper based on work on Super Sparrow - http://superpsparrow.org/
%
% November 2000
% Copyright (C) 2000 Horms <horms@vergenet.net>
% 
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
% published by the Free Software Foundation; either version 2 of the
% License, or (at your option) any later version.
% 
% This program is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
% General Public License for more details.
% 
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
% 02111-1307  USA
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Introduction}

Electronic content made available over the Internet is becoming increasingly
important for providers and users alike. To provide the best possible
service to end users it is desirable for content to be network-wise as
close to client hosts as possible.

Static mirrors of sites are one means of distributing traffic between sites
and giving users the opportunity to connect to a site that will give them a
fast response. However, manually selecting sites, which may or may not be
available,  from a list of mirrors is a tedious process. The sites at the
top of the list are a tempting choice --- economy of choice in lieu of the
possibility of faster access.

Instead of expecting users to manually select a mirror, it makes sense for
the service provider to automatically direct clients to a site that will
offer them good performance, that is to have a global load balancing
algorithm in place.

There are a number of factors that may be taken into account when
developing such a load balancing algorithm. Load and number of connections
are common choices when designing an algorithm to run on a Local Areal
Network.  When examining global load balancing, other factors, such as the
relative speed and bandwith between the client and different possible
servers come into play.  The emphasis of the discussion in this paper will
be on enabling clients to connect to servers that minimise network delays.
The assumption is that servers are locally load balanced as required
to cope with traffic.

Given that the path that traffic takes on the Internet is governed by the
BGP, it would seem that this may provide an interesting basis for a global
load balanacing algorithm. BGP has information on the best path to any
point on the Internet from where the BGP-speaker is connected. As this
information is memory-resident in the BGP-speaker any queries should be
fast. As it turns out BGP also provides for failure recovery as the
protocol is designed to adapt to changing networks. These factors make BGP
an attractive choice as the basis for a global load balancing algorithm.

An algorithm which intelligently selects the server a client should connect
to is only useful if this information can be made transparently available to
clients. For a load balancer to be useful in the context of the Internet
it must work seemlessly with existing protocols. The mechanism to
communicate information to clients should, ideally, be independent of any
particular host, a globally redundant system is most desirable.  DNS is a
well established protocol that is used by clients on the Internet. DNS also
has a measure of redundancy built in, as a domain may have multiple name
servers and clients will attempt to find an active name server for a domain
before returning an error. These two charactaristics make communicating
global load balancing information over DNS an attractive option.

It is also possible to convey load balancing information using HTTP
redirects.  While using HTTP redirects is only useful in the context of
HTTP it is of note that web sites are an application that benefit well from
global load balancing. The advantage of using HTTP redirects is that a much
finer granularlity may be achieved, per URL as opposed to per host as for
DNS.


This paper will examine designing and implementing a global load balancer
using BGP as the basis for the underlying algorithm. Results may be
communicated by DNS or HTTP redirects and the implemenation has the
flexibility to allow other applications to tie into the load balancer.
