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

[Feat]: Ability to generate s3 presign link for blob #2752

Open
vanhtuan0409 opened this issue Oct 31, 2024 · 5 comments
Open

[Feat]: Ability to generate s3 presign link for blob #2752

vanhtuan0409 opened this issue Oct 31, 2024 · 5 comments
Labels
feature New feature or request rm-external Roadmap item submitted by non-maintainers

Comments

@vanhtuan0409
Copy link
Contributor

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

I want to get a s3 pre-sign link for image layer. This way we can tweak the client to download directly from s3 without needing to proxy through Zot

Describe alternatives you've considered

No response

Additional context

No response

@vanhtuan0409 vanhtuan0409 added the feature New feature or request label Oct 31, 2024
@rchincha
Copy link
Contributor

@vanhtuan0409 is this a CDN use case? Also, what would zot actually need to do here?

@rchincha rchincha added the rm-external Roadmap item submitted by non-maintainers label Oct 31, 2024
@vanhtuan0409
Copy link
Contributor Author

To be more detailed: we are using Zot as an OCI-compliant registry. During the pull operation, the client will actually call GetBlob from the standard OCI API. In turn, Zot will read remote storage (s3 in this scenario) and proxy the content back to the client. The traffic look like this client <--> zot <--> s3

We want to avoid the traffic passing through Zot as this can cause some heavy load. In an ideal condition, we can have a plugin for generating s3 pre-signed link for the client to download

@rchincha
Copy link
Contributor

opencontainers/distribution-spec#299

The opinion in the community is that this should be solved purely via HTTP redirect.
So you would have to build machinery such as once a blob is uploaded to zot, copy it somewhere else and then 30x redirect to that new location. Can this be achieved without doing this in zot?

@vanhtuan0409
Copy link
Contributor Author

vanhtuan0409 commented Nov 1, 2024

Using the 307 redirect code could solve this issue. I need the client to pull directly from remote storage without causing stress on Zot server

Zot still needs to implement this by returning the 307 redirect code. Do you think that it is a good idea to implement this within the GetBlob handler? I could help making the contribution

@rchincha
Copy link
Contributor

rchincha commented Nov 4, 2024

https://doc.traefik.io/traefik/middlewares/http/redirectregex/
You may also want to look at solutions such as this ^ positioned in front of zot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request rm-external Roadmap item submitted by non-maintainers
Projects
None yet
Development

No branches or pull requests

2 participants