To access the caching and compression options of a Virtual Service, in the LoadMaster UI:

  1. Go to Virtual Services > View/Modify Services.
  2. Click Modify on the relevant Virtual Service.
  3. Expand the Advanced Properties section.

Enable Caching

This option enables caching of static content. This saves valuable Real Server processing power and bandwidth. You can enable caching on HTTP and offloaded HTTPS Virtual Services. You can also enable caching on Virtual Services with SSL re-encryption enabled.

Before caching, the LoadMaster checks if there is any reason the content should not be cached. For example, if it is on the File extensions that should not be cached list in System Configuration > Miscellaneous Options > AFE Configuration. It also checks if the content is already cached. When the response comes back, the LoadMaster checks if the status code is correct. If the status code is not 200, 203, 300, 301, or 410 - the content is not cached. If the file was created in the last 60 seconds, it will not be cached.

Items are held in the cache for a maximum of 1 hour. This time is not customizable. Every 15 minutes the LoadMaster checks if what is currently in the cache should still be there (it checks the maximum age of the header) and at that point it clears the cache as needed. The cache can be flushed on the browser by refreshing the page (for example, by pressing Ctrl + F5 on your keyboard). Disabling and re-enabling caching on the Virtual Service flushes the cache for that Virtual Service on the LoadMaster.

Note: Types of files that can be cached may be defined in Cache Configuration under the Virtual Services menu.

Maximum Cache Usage

If you enable caching on a Virtual Service, you can then limit the amount of cache being used by that service. The LoadMaster reserves 20% of the total system memory for the global cache value. For example, if a LoadMaster has 1GB of RAM - 20% (or 204MB) is reserved for caching and compression.

When you enable caching on a Virtual Service, you then have the option to set No Limit (which is the default value) or a percentage usage value. Selecting No Limit allows you to use all of the available cache. Alternatively, you can specify a percentage from 1 to 99%. This allows you to break up the 204MB in the example above into a percentage. For example, if you set 20% on the Virtual Service level - the Virtual Service has a total of 40MB available to cache server responses (20% of 204MB = 40.8MB). This leaves approximately 160MB available for other Virtual Services.

Note: This memory is also used by the LoadMaster for content switching and body response rules.

After selecting a percentage, the LoadMaster displays the overall total current usage assigned. This is a combination of the current usage assigned for all Virtual Services. For example, if there are two Virtual Services and on one the Maximum Cache usage is set to 10% and on the other it is set to 7%, the Current usage assigned value displays 17%. It is possible to over-provision/commit - if you attempt to do this, you will get a message saying Setting this value will overcommit the Cache memory by N%.

It is recommended to limit the cache size to prevent unequal use of the cache store. Ensure that the cache maximum usage is adjusted so that each Virtual Service has a percentage of cache to use. If there is no remaining space to be allocated for a cache-enabled Virtual Service, that service will not cache content.

Enable Compression

Files sent from LoadMaster are compressed with Gzip.

Note: If compression is enabled without caching, LoadMaster performance may suffer. When caching and compression are both enabled, caching has priority and therefore the first file is cached but not compressed. On second and subsequent requests, the file is found in the cache and then it is compressed.

The types of files that can be compressed may be defined in Compression Options in the System Configuration > Miscellaneous Options > AFE Configuration menu of the LoadMaster UI.

Note: Compression is not recommended for files 100MB or greater in size.
Note: More RAM may need to be added to Virtual LoadMasters using the hypervisor to compress large files.