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

[perf] imgpkg seems to make lots of repeated requests to /v2 endpoint #290

Open
DennisDenuto opened this issue Oct 26, 2021 · 4 comments
Open
Labels
priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@DennisDenuto
Copy link
Contributor

Description

running imgpkg pull --debug I notice lots of requests being made to the registry /v2 endpoint, trying to get a token.

When pulling a bundle with lots of images / nested bundles, I think this may contribute to a performance degradation.

It would be nice to know:

  • how much performance we lose by making repeated calls to /v2 and assuming the registry requires a bearer token, repeated calls to an oauth server
  • assuming it is causing excessive slowness, can we somehow cache the bearer token avoiding the need to make these repeated calls.

Reference:

@DennisDenuto DennisDenuto added the carvel triage This issue has not yet been reviewed for validity label Oct 26, 2021
@github-actions
Copy link

github-actions bot commented Dec 6, 2021

This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response.

@github-actions github-actions bot added the stale This issue has had no activity for a while and will be closed soon label Dec 6, 2021
@joaopapereira joaopapereira added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/needs-more-information and removed stale This issue has had no activity for a while and will be closed soon labels Dec 6, 2021
@joaopapereira
Copy link
Member

This issue needs further investigation to try to understand the reason behind the requests and if it is related to the linked issue.
Added needs more info and important-longterm as labels

@github-actions
Copy link

This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response.

@github-actions github-actions bot added the stale This issue has had no activity for a while and will be closed soon label Jan 16, 2022
@joaopapereira joaopapereira removed the stale This issue has had no activity for a while and will be closed soon label Jan 18, 2022
@pivotaljohn pivotaljohn removed the carvel triage This issue has not yet been reviewed for validity label Jan 25, 2022
@joaopapereira
Copy link
Member

We did some investigation and the amount of requests is due to a feature from ggcr where before any request is done to a registry it pings the registry to understand the type of authentication needed to it. https://github.com/google/go-containerregistry/blob/ab77ea68f600de27f0563dbfdb1431960ad96af0/pkg/v1/remote/transport/transport.go#L53

We also found that we were doing 1 request to the OAuth server per request to the server. We are addressing this issue in #334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
Status: Unprioritized
Development

No branches or pull requests

3 participants