- Thundering herd vs cache stampede?
Same problem, different name. "Cache stampede" emphasizes the cache; "thundering herd" emphasizes the simultaneous requests.
- When does it happen?
Cache expiry, service restart, DNS TTL, cert rotation, cron at :00.
- Does CDN prevent it?
Partly. The CDN absorbs the burst if it has the key cached; if not, it forwards everything.
- Can I just use a longer TTL?
Longer TTL reduces frequency, not the burst. Jitter + locks are the real fix.