Figure 2.2 shows the communication hops that a typical customer-to-
business HTML page request might take. The request goes from the browser
to a modem. There, the modem connects over a phone or cable network to
the Internet service provider ( ISP ). This area, called the last mile , is seen as
the last major obstacle to widely available high-speed connections. The ISP
provides such services as domain name lookup and mail and news servers, and
it provides an entry point to the Internet. Once the request is on the Inter-
net, it could take any number of steps before it reaches its ultimate destina-
tion. The request then must make its way through a number of hops in the
intranet. In this case, we have a firewall, a combined web and application
server, another firewall, and a host.
As firewalls are added for security, sprayers and caches are added for perfor-
mance. Sprayers take a single Universal Resource Locator ( URL ) and map it
onto many different web servers. The sprayer may allocate requests using
sophisticated load balancing, or it may opt to simply serve them round-robin,
allowing a distribution of work across many servers. Caches are boxes that
store frequently accessed, static items like images, web pages, or multimedia
files. Since these files are not likely to change, a hardware cache can resolve
many requests before they even reach the web server, resulting in better
throughput and faster response times.
While sprayers, firewalls, and caches serve inbound traffic, proxies are
machines that protect outbound traffic. A proxy will make requests on the
outside Internet on behalf of a browser. The proxy gives users inside a firewall
secure access to the Internet, based on corporate policies.
These hardware layers serve us well, but they also add length to the com-
munication path between our customers and our server-side code. The added
firewalls might also conspire to foil us, if we are not careful.
Objects in the mirror appear closer than they are
The additional path length is completely transparent to us, so it is easy to
assume that our users are closer to our applications than they might physically
be. Many of us are accustomed to controlling the network between our clients
and servers. With the Internet, that is simply not the case. Assumptions that
our communications are near instantaneous can be disastrous. We must make
every communication count. Many of our antipatterns in the topic are due to
making too many round-trip communications.