Dev Tools · 1h ago
Thundering herd bug in Next.js API caused duplicate GitHub calls despite cache
A developer found that CommitPulse, a Next.js API serving GitHub contribution badges, made duplicate API calls under concurrent requests despite a working cache. Three simultaneous requests for the same data each triggered a separate GitHub API call because the cache only stored results after the first request completed. The bug, a classic thundering herd problem, could cause rate limit issues for popular badges.
Meridian48 take
This is a textbook concurrency bug that many developers overlook, and it's a good reminder that caching strategies must account for in-flight requests to avoid redundant work.
Read the full reporting
The Cache Was Working. And Still Causing Duplicate API Calls →
DEV Community
cachingconcurrency