0. Make sure your HTTP responses return the correct value in the Vary header. Otherwise, everything else will fall apart.
1. Ensure that all your HTTP responses have proper ETags, and make sure you process the If-Match and If-None-Match request headers appropriately to avoid doing unnecessary work.
2. Put a simple caching reverse proxy (e.g. Squid, Varnish, mod_disk_cache) in front of your application. Then, tune the cache-control directives to allow the cache to return cached responses without hitting the back end. For this to work for HTTPS responses, you need to put a HTTP-to-HTTPS proxy in front of the caching proxy.
3. Add a system like the one described in the article, that immediately purges entries from the cache when they are updated in the back-end.
4. Purchase a caching, SSL-enabled, load-balancer appliance (e.g. Big-IP) that is built to do all of the above nearly automatically.
Comments
0. Make sure your HTTP responses return the correct value in the Vary header. Otherwise, everything else will fall apart.
1. Ensure that all your HTTP responses have proper ETags, and make sure you process the If-Match and If-None-Match request headers appropriately to avoid doing unnecessary work.
2. Put a simple caching reverse proxy (e.g. Squid, Varnish, mod_disk_cache) in front of your application. Then, tune the cache-control directives to allow the cache to return cached responses without hitting the back end. For this to work for HTTPS responses, you need to put a HTTP-to-HTTPS proxy in front of the caching proxy.
3. Add a system like the one described in the article, that immediately purges entries from the cache when they are updated in the back-end.
4. Purchase a caching, SSL-enabled, load-balancer appliance (e.g. Big-IP) that is built to do all of the above nearly automatically.
Most people never need to go beyond step #2.