Insights:Page Cache and CDN Troubleshooting: From Symptoms to Root Causes
Phenomenon 1: Content Not Updating
Check:
cache-control,age, andetagheaders.- Whether CDN is caching HTML.
- Whether cache was purged after publishing.
- Browser local cache.
Common root causes: TTL too long, purge not taking effect, source server and CDN rule conflicts.
Phenomenon 2: Login Cross-Account or Permission Issues
Check:
- Whether the cache key includes identity cookies.
- Whether admin panel, shopping cart, or payment pages are being cached.
- Whether CDN is ignoring all cookies.
- Whether the origin server outputs public cache headers.
Common root cause: Caching personalized pages as public content.
Phenomenon 3: Low Hit Rate
Check:
- Excessive query parameters not normalized.
- Cache key too granular.
- TTL too short.
- Frequent origin requests.
- Whether hot content has been prewarmed.
Phenomenon 4: Origin Stressed or 5xx Errors
Check:
- Origin request ratio and concurrency.
- Source server CPU and database connections.
- CDN origin fetch timeout settings.
- Whether cache invalidation events are concentrated.
- Whether there is attack traffic.
Common root causes: Bulk cache expiration, insufficient origin capacity, unthrottled origin requests.
Troubleshooting Sequence
curl -Ito inspect response headers.- Compare source and CDN content.
- Review cache keys and cookies.
- Check purge logs and TTL settings.
- Inspect origin requests and server load.
- Change only one setting at a time, then retest.
Fix Principles
- Roll back first, then pinpoint.
- Prioritize content correctness over hit rate.
- Limit origin fetches before scaling out.
- Refresh in small batches before going full.
What Not to Do
- Don't clear all cache at once.
- Don't turn off all caching as a "fix".
- Don't ignore origin errors.
- Don't change rules without monitoring in place.
CDN is one layer in the chain; the root cause may lie in the origin, the application, or cache rules. Layer-by-layer elimination is key to stability.
Related Reading: