r/MavenCentral • u/sonatype_central • 1d ago
How to reduce unnecessary requests to Maven Central in CI
A lot of unnecessary traffic to Maven Central comes from CI environments that start clean and resolve the same dependencies again and again.
The biggest wins are pretty straightforward:
- cache dependencies between jobs
- make sure every runner actually uses your repository manager or proxy
- avoid aggressive retries when Central returns a 429
One build starting from scratch isn’t notable. the same pattern across hundreds or thousands of short-lived jobs can generate a surprising amount of traffic.
if Central traffic is still higher than expected, check whether:
- some jobs are bypassing your proxy and going directly to Central
- your build is forcing dependencies or metadata to be re-resolved more often than necessary
- failed jobs are repeatedly downloading the same dependencies
- retry behavior is making throttling worse
If you’re seeing 429s, increasing the number of retries usually isn’t the best fix. I'd first look at why the jobs are generating so many requests and how much of that traffic could be served from a cache or repository manager.
Folks running larger CI fleets: what have you found effective? Especially with GitHub-hosted runners, GitLab runners, or other short-lived build environments.