← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

Cloud CDN

Cloud Intermediate
debt(d5/e5/b5/t5)
d5 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'specialist tool catches' (d5). The detection_hints list CloudFront, Cloudflare, Fastly dashboards and Lighthouse as tools that can identify CDN misconfigurations. These are specialist tools — not default linters — that catch issues like missing Cache-Control headers, incorrect Vary headers, or cached authenticated responses. Runtime monitoring dashboards reveal cache hit ratios that expose problems.

e5 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor in one component' (e5). The quick_fix involves configuring cache behaviours per path pattern (/api/* no-cache, /assets/* 1 year, /* pages short TTL), which requires coordinating CDN configuration with application headers across multiple endpoints. Fixing common_mistakes like 'Caching authenticated responses' or implementing 'tag-based purge strategy' requires changes across both infrastructure config and application code, but stays within one component (the caching layer).

b5 Burden Structural debt — long-term weight of choosing wrong

Closest to 'persistent productivity tax' (b5). CDN configuration applies to web contexts and affects how all HTTP responses must be designed — every endpoint needs appropriate Cache-Control headers, Vary headers, and consideration of cache invalidation. The choice shapes ongoing development (new features must consider cacheability) but doesn't define the entire system architecture.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap' (t5). The misconception states 'CDN is only for static files — dynamic API responses with correct Cache-Control headers are also CDN-cacheable.' This is a documented gotcha that most developers eventually learn. The trap of caching authenticated responses (leaking user data) is serious but well-documented in CDN literature, making it a known pitfall rather than a catastrophic hidden trap.

About DEBT scoring →

Also Known As

CloudFront Fastly Cloudflare

TL;DR

CloudFront, Fastly, Cloudflare — caching at edge PoPs worldwide reducing latency and origin load.

Explanation

CloudFront integrates with AWS; Fastly has instant global purge; Cloudflare adds WAF and DDoS. Dynamic PHP responses with Cache-Control: public, s-maxage=N are CDN-cacheable too.

Common Misconception

CDN is only for static files — dynamic API responses with correct Cache-Control headers are also CDN-cacheable.

Why It Matters

A CDN is not just about speed — it is the first line of defence against DDoS attacks and traffic spikes, since edge nodes absorb traffic before it reaches your origin server. For PHP applications, offloading static assets to a CDN is the single highest-ROI performance improvement available, reducing server load, improving global latency, and often reducing hosting costs. The configuration mistake to avoid is caching responses that include user-specific content, which leaks one user's data to another.

Common Mistakes

  • No Cache-Control header
  • Caching authenticated responses
  • Missing Vary: Accept-Encoding
  • No tag-based purge strategy

Code Examples

✗ Vulnerable
return response()->json(Product::all()); // No cache headers
✓ Fixed
return response()->json($products)->header('Cache-Control','public, s-maxage=300, stale-while-revalidate=60');

Added 16 Mar 2026
Edited 23 Mar 2026
Views 50
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 1 ping F 0 pings S 1 ping S 2 pings M 0 pings T 1 ping W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 2 pings T 0 pings W 1 ping T 0 pings F 1 ping S 2 pings S 0 pings M 0 pings T 0 pings W
No pings yet today
No pings yesterday
Amazonbot 6 Perplexity 6 Google 5 Ahrefs 4 SEMrush 3 ChatGPT 3 Scrapy 3 Unknown AI 2 Bing 2 PetalBot 2 Claude 1 Meta AI 1 Majestic 1
crawler 34 crawler_json 5
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: Medium
⚡ Quick Fix
Use CloudFront or Cloudflare with origin shield to reduce origin hits — configure cache behaviours per path pattern: /api/* no-cache, /assets/* 1 year, /* pages short TTL
📦 Applies To
any web
🔗 Prerequisites
🔍 Detection Hints
Single cache behaviour for all paths; API responses being cached; no cache invalidation on deploy; PHP serving high-traffic static assets directly
Auto-detectable: ✓ Yes cloudfront cloudflare fastly lighthouse
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: Medium ✗ Manual fix Fix: Medium Context: File


✓ schema.org compliant