Last updated on: 2020-09-30
Authored by: Rackspace Support
Cloud Load Balancers have content caching capabilities and store recently-accessed files for web clients to retrieve.
Content caching improves the web site’s performance by temporarily storing data that was recently accessed. The load balancer serves cached requests instead of making another query to the webserver behind it.
This caching results in improved response times for those requests and less load on the webserver.
Content caching works well for files that don’t change or rarely change. Most images and static content are good candidates for content caching.
You don’t want to cache files that change regularly or that the system generates dynamically for different site visitors.
The maximum file size per cached item is 2 MB.
The system caches content for up to 10 minutes, depending on the load and amount of traffic handled by the load balancer host.
If a cached file is requested before expiration, the load balancer retrieves a new copy of the file earlier than usual 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 the system automatically removes it 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 retrieves a fresh copy of a file from the failover host.
The following file extensions are cached:
Yes. You can set the Cache-Control header to
no-cache for requests for
the file types you don’t want cached.
Set this header in Apache® by adding a configuration block similar to the following example:
Note: Replace ico|flv|jpg|jpeg with the desired extensions you want to bypass, making sure to put a | character between them.
<FilesMatch ".(ico|flv|jpg|jpeg" alt="" title="">}}$"> Header set Cache-Control "no-cache" </FilesMatch>
©2020 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License