0%

Book Description

Up to this point, few software engineers and technical leaders have been prepared to meet the challenges of running web applications on a national or global scale. Sites that serve tens of millions of users and receive hundreds of millions of requests per day will quickly overwhelm your system if you’re not ready for it. In this report, author Tom Barker provides a proven strategy for dealing with this user onslaught: intelligent frontend caching.

Many engineers learn the virtues of backend scaling, resiliency, and VM tuning for addressing problems of this magnitude. For Barker—who runs a site with roughly 500 million page views per month—training was strictly on-the-job. This report outlines a strategy for using frontend cache tiers, in concert with a Content Delivery Network (CDN), to avoid backend problems while gaining higher site availability.

  • Use frontend cache tiers and reduce your backend infrastructure
  • Reduce latency by leveraging a CDN to provide edge caching
  • Cache static content that is infrequently updated
  • Explore a strategy for caching and updating personalized content
  • Learn how cached content experiences hot, warm, and cold cycles
  • Get solutions to common problems when caching frontend content

Tom Barker is a software engineer, engineering manager, professor, and author. Currently, he is Director of Software Engineering and Development at Comcast, and an Adjunct Professor at Philadelphia University.

Table of Contents

  1. Preface
  2. 1. Utilizing Cache to Offload Scale to the Frontend
    1. What Is Cache?
    2. Setting Cache
      1. Cache-Control
      2. Tiers of Cache
    3. Summary
  3. 2. Leveraging a CDN
    1. Edge Caching
    2. Quantifying the Theory
    3. CDN Offload
    4. Summary
  4. 3. Intentional Cache Rules
    1. Hot, Warm, and Cold Cache
    2. Cache Freshness
    3. Static Content
    4. Personalized Content
    5. Summary
  5. 4. Common Problems
    1. Problem: Bad Response Cached
      1. Cause
      2. How to Avoid This
    2. Problem: Storing Private Content in Shared Cache
      1. Cause
      2. How to Avoid This
    3. Problem: GTM Is Ping-Ponging Between Data Centers
      1. Cause
      2. How to Avoid This
    4. Solution: Invalidating Your Cache
      1. Fingerprint the URLs
      2. Kill Switch
    5. Summary
  6. 5. Getting Started
    1. Evaluate Your Architecture
    2. Cache Your Static Content
    3. Evaluate a CDN
    4. Summary