Koviczech
CDCloudflare Developers
•Created by Koviczech on 10/8/2024 in #general-help
Cache is not being utilized efficiently
Hello, I would like to ask for the opinion of those more experienced, on what you would recommend regarding our CDN strategy.
We run an e-commerce site with approximately 55,000 products and a few thousand other pages like landing pages and content pages, so in total, we are talking about around 65,000 pages for one domain. We currently have four domains (CZ, SK, HU, DE). Our e-commerce website is a single-page application, rendered both for customers and bots via SSR. And the most visited pages are PDP and PLP sites. In the initial phase, we have enabled the Business plan on the production HU domain, where the traffic is the smallest of all domains, to troubleshoot initial issues. Unfortunately, we have not been able to improve the user experience for customers and the related Google metrics through the CDN.
What we are trying to cache:
• HTML page (SSR content)
• API endpoint response
• static content (media, JS, CSS, etc.)
The biggest issue I see with Cloudflare is that we are caching very little HTML content. From the total daily hits of 1.76M, only 20k are HTML hits. I started analyzing why we have so few hits on HTML. ○ Probably becase of insufficient traffic considering the 2-minute TTL of these pages?
If we could increase the TTL of these pages, would it lead to more efficient cache usage and thus a higher hit ratio on HTML? Yes, but only maybe. What is our current maximum capacity that we can use for storing content? From the documentation, I found 512MB, which, at first glance, seems quite small for large e-commerce sites. If we do simple math, where for our SPA with SSR we are caching for a single customer visit: • loading the first page of a new visit (SSR render) - around 1MB • loading static files and API endpoint responses for the entire visit (CSR) - around 1MB per page
The biggest issue I see with Cloudflare is that we are caching very little HTML content. From the total daily hits of 1.76M, only 20k are HTML hits. I started analyzing why we have so few hits on HTML. ○ Probably becase of insufficient traffic considering the 2-minute TTL of these pages?
If we could increase the TTL of these pages, would it lead to more efficient cache usage and thus a higher hit ratio on HTML? Yes, but only maybe. What is our current maximum capacity that we can use for storing content? From the documentation, I found 512MB, which, at first glance, seems quite small for large e-commerce sites. If we do simple math, where for our SPA with SSR we are caching for a single customer visit: • loading the first page of a new visit (SSR render) - around 1MB • loading static files and API endpoint responses for the entire visit (CSR) - around 1MB per page
4 replies