Differences between Passive and Active Caching

Last reviewed: October 6, 1997
Article ID: Q164085
The information in this article applies to:
  • Microsoft Proxy Server versions 1.0 and 2.0

SUMMARY

Microsoft Proxy Server caches data by two different of processes: passive caching and active caching.

Passive Caching

Passive caching, also referred to as on-demand caching, is the most basic mode of caching.

Microsoft Proxy Server interposes itself between the client and local or remote Web and intercepts requests (for example, HTTP GET requests) from the client. Before forwarding the request on to the Web, Proxy Server first calls into its cache (the Urlcache.dll file) to determine if the cache can satisfy the request by using the RetrieveUrlFile API. If the data is in the cache and has not expired, it is returned immediately to the client by using the Windows Sockets TransmitFile API.

If the object is not cached or if the cached copy of the object has expired, Proxy Server retrieves the object from the Web, returns it to the user, and inserts it into the cache (by using the CreateUrlFile and CacheUrlFile APIs). If the local disk space reserved for the cache is too full to hold the new data, older objects are removed from the cache using a formula that evaluates age, popularity, and size.

Active Caching

Microsoft Proxy Server uses active caching to improve the retrieval performance by increasing the likelihood that a requested object will be found in the cache. Active caching works as a superset to passive caching.

Typically, in passive caching, an object is placed in the cache and a Time- To-Live (TTL) expiration value is associated with that object. During this TTL, all requests for the object are serviced from the cache without generating traffic back to the upstream Web server. After the TTL has expired, subsequent client requests for the object will generate traffic to and from the Web server. The response from the server will be stored in the cache and a new TTL will be calculated.

Active caching augments this system by having the server automatically generate requests for a specified subset of objects. Proxy Server optimizes the choice of objects for active caching on the basis of the following qualities:

  • Popularity: Ensures that requests made by Proxy Server are likely to be requested by clients as well.
  • TTL: Longer TTLs are more valuable to cache than shorter TTLs; Proxy Server will also check objects that are close to expiration.
  • Server load: Proxy Server performs more aggressive active caching during periods of low server load than when the server is heavily loaded.

Active caching results in:
  • Better Client Performance: Clients are more likely to find their URL in the cache, resulting in lower latency (the amount of time clients wait for a response) and better throughput.
  • Even Load Distribution: Active caching has the effect of balancing the request load for the server across time, by rescheduling some cache update requests from high-peak periods of server activity to off-peak periods.
  • More Accurate Data: By checking unexpired objects during off-peak periods, the likelihood of returning stale data to clients is reduced.

MORE INFORMATION

For more information on caching, please see the Proxy Server on-line documentation.


Additional query words: prx
Keywords : kbother pxsgeneral
Version : 1.0 2.0
Platform : winnt
Hardware : ALPHA x86


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 6, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.