The Cloud Load Balancers product has a Content Caching feature that stores recently-accessed files on the load balancer for easy retrieval by web clients.
Content caching can be enabled or disabled for a load balancer in the Cloud Control Panel by going to its details screen, scrolling down to the Optional Features section, and clicking the pencil icon next to Content Caching.
Content caching improves the performance of a web site by temporarily storing data that was recently accessed. While it’s cached, requests for that data will be served by the load balancer instead of making another query to a web server behind it.
The result is improved response times for those requests and less load on the web server.
Content caching works well for files that don’t change or that rarely change. Most images and static content are good candidates for content caching.
You don’t want to cache files that would change regularly or would be dynamically generated for different site visitors.
The maximum file size per cached item is 2 MB.
Up to 10 minutes, depending on the load and amount of traffic being handled by the load balancer host.
If a cached file is requested shortly before it will expire, the load balancer will retrieve a new copy of the file early to prevent the file from being uncached during a period of heavy traffic.
No, not at this time. You cannot purge a file from the cache manually, but it will be automatically removed when its cache time expires.
No. Each node has its own cache, separate from other load-balanced nodes.
No. If a failover occurs the load balancer will retrieve a fresh copy of a file from the failover host.
At this time the following file extensions are cached:
.png .gif .jpg .jpeg .ico .wav .mp3 .flv .mpeg .js .css .mp4 .swf
Yes. Have your web server set the Cache-Control header to no-cache for requests for the file types you don’t want cached.
You can set this header in apache by adding a config block similar to the following to your apache config:
<FilesMatch "\.(ico|flv|jpg|jpeg)$"> Header set Cache-Control "no-cache" </FilesMatch>
Replace the extensions in the “ico|flv|jpg|jpeg” section with the extensions for which you want to bypass caching, making sure to put a “|” character between each extension.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License