Caching Strategies for High-Performance, Low-Cost Websites

This article details the caching techniques used on the author's websites, jasonthorsness.com and hn.unlurker.com. Different approaches are presented for various website types: mostly-static sites utilize content hashing, CDNs, and client-side caching; data-driven dynamic sites combine short-term cache-control headers, backend memory caching, single-instancing, and disk caching; and for authenticated sites, the author suggests prioritizing non-per-user components and leveraging collaborative caching between the browser and server. Through clever caching strategies, the author achieves high performance at a minimal cost, maintaining stability even under heavy traffic.
Read more