When to Use
User wants to set up, optimize, or debug a CDN. Covers provider selection, caching, security, and performance monitoring.
Quick Reference
| Topic |
File |
| Provider comparison & CLIs |
providers.md |
| Security hardening |
security.md |
| Caching strategies |
caching.md |
| Troubleshooting |
troubleshooting.md |
Core Capabilities
- Provider selection — Compare Cloudflare, CloudFront, Bunny, Fastly based on use case, traffic, budget
- Cache configuration — Set optimal cache-control headers, TTLs, cache keys
- Security setup — SSL/TLS, WAF rules, DDoS protection, origin shielding
- Performance monitoring — Cache hit ratios, TTFB, regional latency
- Invalidation — Purge strategies, CI/CD integration, tagged invalidation
- Cost optimization — Bandwidth analysis, tier recommendations, multi-CDN strategies
- Troubleshooting — Debug cache misses, stale content, origin overload
Cache-Control Checklist
Before deploying, verify:
Security Checklist
Common Mistakes
- Caching user-specific responses (auth tokens, personalized content)
- Using
max-age without immutable for versioned assets
- Purging entire cache instead of targeted paths
- Ignoring
Vary headers (cache poisoning risk)
- Origin not rejecting direct access (bypassing CDN protections)
Decision: Do I Need a CDN?
Ask about:
- Geographic distribution of users
- Current page load times and Core Web Vitals
- Static vs dynamic content ratio
- Traffic volume and patterns
If users are mostly local and traffic is low → CDN may add complexity without benefit.
If global users OR heavy static assets OR need DDoS protection → CDN adds value.
1---
2name: cdn
3slug: cdn
4description: Configure, optimize, and troubleshoot CDN deployments with caching strategies, security hardening, and multi-provider management.
5metadata:
6 source: https://skillmd.com/skills/modbender/cdn
7---
8
9## When to Use
10
11User wants to set up, optimize, or debug a CDN. Covers provider selection, caching, security, and performance monitoring.
12
13## Quick Reference
14
15| Topic | File |
16|-------|------|
17| Provider comparison & CLIs | `providers.md` |
18| Security hardening | `security.md` |
19| Caching strategies | `caching.md` |
20| Troubleshooting | `troubleshooting.md` |
21
22## Core Capabilities
23
241. **Provider selection** — Compare Cloudflare, CloudFront, Bunny, Fastly based on use case, traffic, budget
252. **Cache configuration** — Set optimal cache-control headers, TTLs, cache keys
263. **Security setup** — SSL/TLS, WAF rules, DDoS protection, origin shielding
274. **Performance monitoring** — Cache hit ratios, TTFB, regional latency
285. **Invalidation** — Purge strategies, CI/CD integration, tagged invalidation
296. **Cost optimization** — Bandwidth analysis, tier recommendations, multi-CDN strategies
307. **Troubleshooting** — Debug cache misses, stale content, origin overload
31
32## Cache-Control Checklist
33
34Before deploying, verify:
35- [ ] Hashed assets (JS/CSS) → `Cache-Control: public, max-age=31536000, immutable`
36- [ ] HTML pages → Short TTL or `no-cache` with revalidation
37- [ ] Images → Long TTL with content-based URLs or versioning
38- [ ] API responses → Usually `no-store` unless explicitly cacheable
39- [ ] User-specific content → `private` or `no-store`
40
41## Security Checklist
42
43- [ ] TLS 1.2+ enforced, weak ciphers disabled
44- [ ] HSTS enabled with appropriate max-age
45- [ ] Origin IPs hidden, authenticated origin pulls configured
46- [ ] Rate limiting on sensitive endpoints (login, API)
47- [ ] Security headers: CSP, X-Frame-Options, X-Content-Type-Options
48
49## Common Mistakes
50
51- Caching user-specific responses (auth tokens, personalized content)
52- Using `max-age` without `immutable` for versioned assets
53- Purging entire cache instead of targeted paths
54- Ignoring `Vary` headers (cache poisoning risk)
55- Origin not rejecting direct access (bypassing CDN protections)
56
57## Decision: Do I Need a CDN?
58
59Ask about:
60- Geographic distribution of users
61- Current page load times and Core Web Vitals
62- Static vs dynamic content ratio
63- Traffic volume and patterns
64
65If users are mostly local and traffic is low → CDN may add complexity without benefit.
66If global users OR heavy static assets OR need DDoS protection → CDN adds value.