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

fr: serve v1.Images in memory from registry #1325

Closed
howardjohn opened this issue Mar 25, 2022 · 3 comments
Closed

fr: serve v1.Images in memory from registry #1325

howardjohn opened this issue Mar 25, 2022 · 3 comments
Labels
lifecycle/stale question Further information is requested

Comments

@howardjohn
Copy link
Contributor

Currently in order to serve images from a registry, we need to push the images there. This may be inefficient in some cases - in particular if we already have a v1.Image in memory for other reasons.

It would be great to be able to preload (or just do an in-memory load) Images to the registry, without the cost of a push.

A concrete usecase would be to build and image, serve it as a registry and trigger kind to pull from it; this is much more efficient than ctr load.

@howardjohn howardjohn added the question Further information is requested label Mar 25, 2022
@imjasonh
Copy link
Collaborator

We've had some plans to make cmd/registry more pluggable, so that it can serve images from OCI layouts on disk, in addition to serving images from memory like it does today. I don't think we've really explored any other cmd/registry-specific options for "pushing" directly into its storage in memory, skipping the push process. Once we make some more progress on making cmd/registry more pluggable that might be an option worth exploring.

@howardjohn
Copy link
Contributor Author

I played around with this a bit. I found internally 'pushing' through the blobHandlers wasn't any faster than just pushing to an external registry (running on the same network - not gcr.io or something like that where we are network bound) - a lot of time spent on copying blobs and verifying the hashes on the reads. So I ended up doing a bit more surgery to get a more direct path from the v1.Image to the incoming requests.

Pushed a branch up howardjohn/istio@41a7e3a. Major caveat - this is super quickly hacked together and horrible quality, likely handles on the specific cases I was trying, etc.

@github-actions
Copy link

github-actions bot commented Jul 1, 2022

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants