Case study

Case Study: Improving CDN hit rates for a custom web application

This example shows how a production infrastructure problem can be investigated methodically, improved safely and turned into clearer operational practice.

Context

A customer-owned web application was using a CDN, but most requests were still reaching the origin server.

The application had a mix of static assets, public pages, API routes and authenticated areas, so caching could not be changed globally without risk.

The problem

  • Cache-control headers were inconsistent across static assets, public pages and application routes.
  • Some assets were being revalidated too often, reducing CDN benefit and increasing origin load.
  • Dynamic responses needed to be excluded from aggressive caching to avoid serving stale or user-specific content.
  • The customer wanted better performance tuning and lower origin pressure without introducing cache-related bugs.

Our approach

  • Reviewed Cloudflare/CDN rules, origin response headers, cache-control behaviour and route patterns.
  • Separated static assets, public cacheable routes and authenticated/dynamic responses.
  • Adjusted cache rules and header recommendations so the CDN could cache safely where appropriate.
  • Checked results using response headers, cache status, logs and repeat requests before recommending rollout steps.

Hands-on outcomes

Higher cache efficiencyThe application could serve more repeat traffic from the CDN instead of sending every request to the origin.
Lower origin pressureReducing avoidable origin hits helped protect the backend during traffic spikes.
Safer cache boundariesDynamic and authenticated areas were kept separate from public cacheable content.
Recommended follow-upOngoing observability of cache hit rate, origin load and deployment planning changes was recommended so caching remains effective over time.

Relevant technologies and keywords

These are the main technologies, solutions and search terms connected to this case study.

CDNCloudflareCache hit rateCache-ControlHTTP headersOrigin loadStatic assetsWeb app performance tuningCaching rulesCustom applicationResponse headersPerformance Tuning review

Want assist with a similar issue?

Send the symptoms, affected system, recent changes and organisation impact. We will suggest the most appropriate route: emergency engineering assistance, a fixed-scope engineering fix, an infrastructure review or a wider project.

Discuss your project