Compartilhar via


Planning to cache Web content

Updated: February 1, 2011

Applies To: Forefront Threat Management Gateway (TMG)

Forefront TMG implements a caching mechanism to improve performance and response times for Web requests from the Internet, and from published Web servers. The cache contains content that is frequently requested by internal or remote users. When users request content that is cached, Forefront TMG serves the content directly from the cache. The benefits of Web caching include:

  • Faster access to requested content—Requests are served from the cache instead of requiring a connection to Internet servers, or access to published Web servers.

  • Reduced bandwidth on the Internet connection, and reduced load on published Web servers.

The following sections provide information that can help you plan your caching needs:

  • Supported caching types

  • Considerations for storing cached content

  • Caching in Forefront TMG arrays

Note

For information on how to enable and configure caching, see Caching website content.

Supported caching types

Forefront TMG supports two types of caching:

  • Forward caching—Caches frequently-requested Internet content, and serves it to internal users.

  • Reverse caching—Caches content that is frequently requested from internal Web servers published by Forefront TMG, and serves it to external, remote users. Reverse caching is enabled by default when forward caching is enabled.

Considerations for storing cached content

Forefront TMG stores cached content in two locations:

  • In memory (by default, 10 percent of the RAM is used for caching objects).

  • On disk.

Because objects that are cached to memory can be retrieved faster than objects cached to the disk, Forefront TMG stores the most popular content on both the disk and in memory. If the cache content file on the disk is too full to hold a new object, Forefront TMG removes older objects from the cache. It determines which objects to remove from the disk by using a formula that evaluates how old is the object, how often the object is accessed, and its size.

When you plan for caching, consider the following:

  • More RAM provides faster performance for serving cached content. In large deployments, it is recommended that a high-performance hard disk is used.

  • You must use a formatted NTFS file system partition for the cache, and the cache drive must be local. When you configure a cache drive, a cache-content file Dir1.cdat is created in the location: drive:\urlcache.

  • The maximum size for the cache file on a single drive is 64 GB.

  • Files larger than 512 MB do not remain in cache upon reboot.

  • It is recommended that you locate the file on a physical disk other than the disk on which the operating system and Forefront TMG are installed. This reduces contention on the system and startup disk.

Forefront TMG cache performance counters provide information about cache memory performance, cache space, and URL handling. Based on this information, you can modify cache settings as required. For more information, see Cache performance counters (https://go.microsoft.com/fwlink/?LinkId=160063).

Caching in Forefront TMG arrays

In arrays, Forefront TMG uses Cache Array Routing Protocol (CARP) to provide a single, logical cache, for all the servers in the array. CARP allows Forefront TMG array members to efficiently balance Web-based client load, and split cached content between them. On the client side, CARP provides client computers with the information and algorithms required to identify which is the best server in the array to serve their request, thus eliminating the need for array members to forward requests between the array members. CARP also supports array server selection by the servers themselves and chained proxies.

Concepts

Caching website content
Access design guide for Forefront TMG