Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Graceful Handling of Maven Central HTTP 429 #3986

Open
2 tasks done
msymons opened this issue Jul 17, 2024 · 0 comments
Open
2 tasks done

Implement Graceful Handling of Maven Central HTTP 429 #3986

msymons opened this issue Jul 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@msymons
Copy link
Member

msymons commented Jul 17, 2024

Current Behavior

Dependency-Track is configured "out of the box" with several Maven Repositories. One of these is Maven Central, run by Sonatype.

Sonatype has analysed traffic and decided to respond with HTTP 429 errors to individual IP addresses that exceed a request threshold, as documented in their blogpost: Maven Central and the tragedy of the commons

In Dependency-Track, statuses other than 200 are only logged at DEBUG level.... meaning that the administrator would currently have a hard job to even know that they were being impacted by throttling.

Note that many corporate environments will use a NAT gateway, meaning that Maven Central may be seeing traffic from Dependency-Track AND CI/CD servers AND developer IDE as all coming from the same IP. Thus, it is possible that DT might not be be causing throttling... but still be impacted by it.

Proposed Behavior

  • Change loglevel so that admin can see HTTP 409 errors in log by default.
  • Possibly adjust logging logic so that log does not get spammed by too many entries
  • Add a circuit breaker, such that once we hit a certain threshold of 429s, we don't make the problem worse by throwing more and more requests at the system that has given us the 429.
  • Metrics would be nice to have and should be investigated (being aware of need to avoid extreme memory usage)

Checklist

@msymons msymons added the enhancement New feature or request label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant