Chapter . Caching

Moving Content Close to the User

Since the 1990s, the World Wide Web has taken off as fast as air conditioning. The Internet boom has created challenges for network engineers, including congestion, inconsistent quality and reliability, and cost-efficient scalability.

Examples of these problems include the following:

  • Not being able to access a news website during a huge news event because the web servers are unable to handle more users

  • Trying to view web pages located in another country

  • A company with international presence trying to localize its web pages for each country

Network caching has emerged as the primary tool for localizing network content close to the requester. Caching addresses the preceding problems by accelerating content delivery and optimizing WAN link utilization. In other words, it moves the content closer to the user. Examples of cacheable content include web pages, audio files, and streaming video.

How Caching Works

Caching works in cooperation with specific choke points in a network. You can localize traffic by strategically placing caching devices in a network. Network caches transparently store frequently accessed content on hard drives, intercept requests for that stored content, and present the page back to the user. Thus, the request never makes it to the intended destination, saving bandwidth and server resources.

An example follows:

  1. A user enters a URL in her browser.

  2. A network device (such as a switch) analyzes the request, and if it meets certain criteria, the network transparently redirects the request to a local network caching device.

  3. The caching device, upon receipt of the request, determines whether it has the requested content stored locally. If not, the caching device makes its own request to the original web server.

  4. After the original web server returns the content, the cache server stores the content on its hard disk and returns the content to the original requester. The material is now cached locally.

  5. Later, if another user requests the same web page, the cache intercepts the request and responds by returning the locally stored copy, never communicating with the original web server.

  6. Because the request was fulfilled locally, the user perceives fast response time (which is good), and the request never leaves the local network, thereby saving WAN and Internet costs and reducing the load on the destination web server.

A cache server can provide its effectiveness to multiple locations. One place is at a company’s main access point to the Internet. You can reroute all outbound requests to the local cache, thereby saving Internet access fees and providing quicker responses for frequently requested pages.

Another location is at branch sites, such as at a chain store, remote sales office, or bank branch. By caching content locally, the network can conserve WAN bandwidth for more mission-critical applications.

Caching More than Web Pages

The initial benefits of caching were realized with static web content. However, video and audio files are also appropriate candidates for caching. One example is a CEO’s address to the company. You can broadcast the address live and then store it as video on demand for people to watch when they have time. You can push the broadcast to local caching servers so that an employee in another country can watch the video without having it stream from the location of the original video.

To the overseas employee, the performance is fast because the content is local. Additionally, as other employees overseas watch the video, the WAN link back to the origin is not affected.

Issues Affecting Caching

During a sudden surge of web traffic, a caching device can become overloaded, no longer able to handle additional web requests. To solve this problem, cache engines determine when they reach a particular load limit. At the point of overload, the cache device refuses additional requests and forwards subsequent requests directly to the destination web server to handle directly. After the cache device can process the backlog of requests, it then intercepts requests again.

Another issue is keeping the cached content current. The cache device becomes less effective if it can’t show the same content as if the user visited the web server directly. An example might be a stock-tracking page: What good is the caching device if the stock price is an hour or day old compared to the actual website?

You have three different ways to indicate whether content can be cached and how long it can be cached. The first method is in the actual HTTP document. HTTP can specify whether a document is cacheable. Additionally, with HTTP 1.1, the web page author can specify the expiration time for a particular page. HTTP 1.1 also allows a caching device to send small requests to the source web server so it can determine whether content has changed.

The second method for ensuring content freshness is through the configuration of the caching device. You can configure the cache device to “expire” pages at a certain rate, at which the cache device makes requests to the source web servers for updates to the pages.

The final method to ensure content freshness is through the user’s configuration of his browser. A user can ensure fresh content by clicking on his Reload/Refresh button. Browsers by default cache web content locally, and you can configure them to do no caching either explicitly or using the Shift-Reload/Shift-Refresh method.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.125.139