According to Moore's law, the number of transistors on each square inch of an integrated circuit will double approximately every 18 months. Computer hardware has followed this law by doubling hardware capacity about every 18 to 24 months and keeping prices down. Unfortunately, Moore's law doesn't apply to Internet bandwidth availability, which remains limited and expensive. In other words, you can't double your corporate Internet connection's bandwidth every 18 months without paying more. Add to this situation the fact that demand for information and bandwidth on the Internet doubles every 3 months, causing data congestion and delays in the Internet backbone, ISP networks, and corporate Internet links. Slow Web content delivery on the Internet has prompted some unhappy Web surfers to refer to the WWW as "World Wide Wait."
Thousands to millions of Web surfers visit popular Web sites, such as America Online's (AOL's) site, every day. Many people continually retrieve the same Web content, such as daily news. This repetition wastes precious Internet bandwidth if identical content traverses the Internet each time a user downloads. For example, when John downloads the sports page from AOL's Web site, the page travels from the site to John's browser through the Internet. If Steve downloads the same page, the page will make another trip from the Web site to Steve's browser through the Internet. If 1000 users in an ISP or independent company retrieve the same page from AOL, 1000 identical copies of the page will travel through the Internet.
If you could somehow store the first retrieved copy of that page close to users, such as behind the company's Internet firewall or in the ISP, the subsequent 999 users could retrieve the page from storage instead of from AOL's Web site, greatly reducing the load on Internet bandwidth. Researchers discovered this solution by borrowing an old concept from computer technology. In a computer system, the CPU can keep the most recently and frequently used data in the cache memory for future use after loading the data from the hard disk. When the CPU needs the cached data, it can retrieve the data from the cache memory quickly. If requested data is not available in the cache memory, the CPU will load the data from the hard disk and save it in the cache memory for future access.
Applying this caching concept to the Web introduced Web-caching technology. Using Web-caching technology, a caching system maintains copies of recently and frequently accessed Web content. When a user's browser queries a Web page, the caching system returns to the browser the locally cached content (if the content is still fresh or not expired) according to the URL that the browser issued when it first accessed the content. Otherwise, the caching system retrieves the updated content from the target Web site, sends the content to the browser, and keeps the content in the cache for future retrieval.
Web caching reduces Internet traffic and cost. In general, a Web-caching system can provide a 30 to 70 percent cache hit ratio based on caching software and hardware capacity. (The cache hit ratio is the percentage of content that the caching system can return locally.) For example, a company that has a 45Mbps T3 Internet connection with 50 percent HTTP traffic can save 11.25Mbps if the company has a Web-caching system with an average 50 percent cache hit ratio. If the company pays $45,000 for the T3 link per month, it can save $11,250 per month with such a Web-caching system.
Web caching benefits ISPs not only in daily Internet operation but also when a special event occurs, such as the Starr Report release or the Super Bowl broadcast. If Web caching weren't deployed on the Internet, such events could bring the Internet down. Companies wanting to improve Web-surfing performance and preserve Internet bandwidth and cost can apply Web-caching systems to their networks to reap the same advantages the Internet enjoys. Since the introduction of caching technology, many Web-caching techniques and implementations have been around, including browser and proxy caching, passive and active caching, transparent caching, and caching cluster and hierarchy. In this two-part series, I examine Web-caching techniques and several deployment models that implement Web caching in small- to large-scaled networks. This month, I introduce and compare several basic Web-caching techniques, including browser and network caching, passive and active caching, nontransparent and transparent caching, and using general and special-purpose caching servers. I also show you how to implement transparent caching with routers and switches.
Browser and Network Caching
Web browsers, such as Microsoft's Internet Explorer (IE) and Netscape's Communicator, have long contained basic built-in caching mechanisms. After a browser downloads a page from a Web server, the browser stores the page temporarily in the computer's local hard disk. Later, when the user clicks the browser's back or forward button, the browser retrieves the previously viewed page from the cache instead of returning to the Web server. A browser often lets users configure how they will use local cached pages: for example, use cached pages in only one session (i.e., before restarting the browser); always use cached pages, even after the Web server updates content; and never use the cache. IE 5.0 provides the Automatically feature, which lets IE determine whether to use local cached content or retrieve content from the Web server. For example, after retrieving one Web site's home page several times, IE won't download the page's static images that the cache stores, even if the page's text has changed. Screen 1 shows the Automatically setting in IE 5.0's Settings dialog box.
Browser caching works well only for individual users of one browser. When your browser downloads a Web page and saves the page in the cache, users of different browsers can't retrieve that page from your cache but must download the page from the remote Web server.
To make cached contents available to every user on a network, you can use a network-based caching system or server in your network. You can position the caching server at your network's Internet entry point, as Figure 1 shows. For example, if you're the first person in your office to read daily news on AOL at 7 a.m., the caching server downloads the news for you and stores the news pages in the cache. When your boss arrives at 8 a.m. and queries AOL daily news from his computer, the caching server sends him the pages from the cache. This network-based caching is also called proxy caching because the caching server delivers copies of Web content to users requesting the content.
Passive and Active Caching
A cached Web object (i.e., a page or an image) often has a Time to Live (TTL) or expiration date and time that help ensure that the object remains current. Although caching servers don't maintain expired objects, cached objects can change on original Web servers before the objects expire in the cache. Before sending the object to a requesting user, caching servers check to determine whether a cached object has changed on the original Web server. The caching server can use a passive or active caching method to manage changed objects.
In the passive caching method, the caching server waits until a user requests an object before the server determines whether the object changed on the original Web server. To make this determination, the caching server usually compares the object creation or modification times in the cache with the original Web server. If the object hasn't changed, the caching server returns the cached object to the user immediately. If the object has changed, the caching server retrieves the new object, sends it to the user, and replaces the old cached object with the new one. Although passive caching ensures that users receive updated objects, the method requires users to wait—both while the caching server makes creation or modification time comparisons and while it retrieves new objects.
To provide a better response time, caching servers can use the active caching method to intelligently refresh a cached object before a user requests the object. In the active caching method, a caching server monitors an object's user access and Web-server change pattern, then determines when and how often to refresh the object. For example, if a company's caching server finds that the news content on a popular Web server changes every day at 6 a.m., 10 a.m., 2 p.m., and 6 p.m., and users generally read the news at approximately 9 a.m., 12 p.m., and 4:30 p.m., the caching server might refresh the cached news content at 7 a.m., 11 a.m., and 3 p.m. Using active caching, the caching server actively updates the cached news content so that the server can deliver updated content from the cache immediately, without having to check the Web server, when users request the news.
Because no standard is yet available, vendors use proprietary active-caching algorithms. Some algorithms can provide cache hit ratios of over 70 percent. (Compare that ratio to passive caching's average of 30 percent.) Several caching products support active caching: for example, CacheFlow's CacheFlow, IBM's Web Cache Manager, InfoLibria's DynaCache, Lucent Technologies' IPWorX, Microsoft's Proxy Server, Netscape's Netscape Proxy Server, Network Appliance's NetCache, and Novell's BorderManager.
General and Special-Purpose Caching Servers
Two primary kinds of network-based caching servers exist: general-purpose and special-purpose. Typically, a general-purpose caching server comes with a proxy server and runs on certain OSs. Some good examples are Microsoft Proxy Server for NT, Netscape Proxy Server for NT and several UNIX OSs, and BorderManager for NetWare. A general-purpose caching server lets you choose a preferred hardware and OS platform to run the caching server. When combined with the proxy function, a general-purpose caching server can be your gateway to the Internet, as Figure 1 shows.
Several vendors that specialize in Web caching have introduced special-purpose caching servers. A special-purpose caching server often contains a custom OS and caching software and hardware in a closed box that vendors call a caching appliance. Because of its dedicated design, a caching appliance can often offer better performance and a higher cache hit ratio than a general-purpose caching server can offer. Caching-appliance advocates envision caching appliances becoming a basic network infrastructure element that occupies a place similar to the place that routers currently occupy. Several outstanding caching appliances include CacheFlow, Cisco's Cache Engine, DynaCache, Inktomi's Traffic Server, IPWorX, and NetCache.
Nontransparent and Transparent Caching
If a browser doesn't need to know how to send its queries to the caching system, vendors refer to the caching operation as transparent. Transparent caching transparently redirects Web traffic to the caching server through a router or switch, as Figure 2 shows. In a transparent caching network, you configure a router or switch, rather than individual browsers, to forward Web traffic to the caching server. Transparent caching is an important feature that ISPs demand when they deploy Web caching servers on the Internet, because ISPs can't control their subscribers' browser configurations.
The router or switch that a caching server connects to must be able to interpret Web traffic. For example, when the router or switch sees that arriving traffic is HTTP traffic, the router or switch forwards the traffic to the caching server instead of sending the traffic directly to the intended Web server. If the caching server has a fresh copy of the requested Web content in the cache, the server returns the content immediately to the browser; otherwise, it fetches the content from the Web server. Caching appliances often support transparent caching.
Transparent Caching with Routers and Switches
You can use policy-based IP routing to route TCP traffic on port 80 (the port that HTTP uses by default) from a router to a caching server. Simply set up a rule in the router to forward all port 80 TCP traffic to the IP address of the caching server and forward all other traffic as usual. However, you must directly attach the caching server to an interface on the router. The router will not monitor the availability of the attached caching server. Instead of forwarding traffic directly to the Web server, the router will continue to forward traffic to a caching server even if the caching server fails.
Cisco developed the Web Cache Control Protocol (WCCP), an Internet-draft, to correct the shortcoming in policy routing for transparent caching. A WCCP-enabled router and a WCCP-enabled caching server use heartbeat messages to exchange their status. If the caching server doesn't answer the router's "are you there" query for a specified period, the router assumes that the caching server is down, then automatically bypasses the caching server and sends Web traffic directly to the Web server. WCCP also supports fault tolerance and load balancing if two or more caching servers attach to the router. Currently, Cisco routers and at least four caching appliances support WCCP, including CacheFlow, Cache Engine, Traffic Server, and NetCache.
You can use a layer-4 switch for transparent caching. Similarly to a router, the layer-4 switch can redirect TCP traffic on port 80 to a caching server after checking the incoming IP packet, instead of sending the traffic to the Web server. Some switches, such as those from ArrowPoint Communications, Alteon Networks, and Foundry Networks, not only can support Web traffic redirection but, through proprietary implementations, also offer caching load balancing and fault tolerance for attached caching servers.
Web caching helps save your network's and the Internet's bandwidth and reduces Web content-delivery time. Web caching plays an important role in building an efficient World Wide Web. Next month, I'll continue to surf Web-caching technology by discussing cache cluster and hierarchy, Web-caching deployment in several network environments, caching in Web publishing, and Microsoft's caching implementation in Proxy Server.
Novell * 800-453-1267
Cisco Systems * 408-526-4000
CacheFlow * 888-462-3569
InfoLibria * 800-761-6115
Lucent Technologies * 888-584-6366
Network Appliance * 800-443-4537
NETSCAPE PROXY SERVER
Netscape * 650-937-2555
Microsoft * 800-426-9400
Inktomi * 650-653-2800
WEB CACHE MANAGER
IBM * 888-411-1932