Skip to content

[registry-facade] Add Redis caching for manifests and config #9028

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

Closed
wants to merge 0 commits into from

Conversation

csweichel
Copy link
Contributor

@csweichel csweichel commented Mar 30, 2022

Description

This PR adds Redis-based caching for manifests and blogs to registry-facade. This dramatically speeds up manifest assembly.

Related Issue(s)

Fixes #9006

Note: most commits are shared with #9005. Only last commit is actually new.

How to test

# install oci-tool
go install github.com/csweichel/coi-tool@latest

# start redis
docker run --name redis -p 6379:6379 -d redis

# start registry-facade
cd components/registry-facade
go run main.go run example-config.json

# pull a manifest
time oci-tool fetch --insecure manifest localhost:9090/fixed/foo:latest

# pull a manifest again - observe the difference in time
time oci-tool fetch --insecure manifest localhost:9090/fixed/foo:latest

# pull a different manifest - observe that it took less than the original 2 seconds
time oci-tool fetch --insecure manifest localhost:9090/fixed/bar:latest

# pull a different manifest again - observe the difference in time
time oci-tool fetch --insecure manifest localhost:9090/fixed/bar:latest

Release Notes

Improve workspace startup time through improved manifest assembly

@csweichel csweichel requested a review from a team March 30, 2022 17:50
@csweichel csweichel requested a review from aledbf as a code owner March 30, 2022 17:50
@csweichel csweichel requested a review from a team March 30, 2022 17:50
@csweichel csweichel marked this pull request as draft March 30, 2022 17:50
@github-actions github-actions bot added team: delivery Issue belongs to the self-hosted team team: workspace Issue belongs to the Workspace team labels Mar 30, 2022
@csweichel csweichel marked this pull request as ready for review March 30, 2022 18:09
@csweichel csweichel force-pushed the cw/regfac-redis branch 2 times, most recently from 7322a15 to 1e011a2 Compare March 31, 2022 07:09
@csweichel csweichel changed the base branch from main to cw/regfac-ipfs March 31, 2022 14:40
@roboquat roboquat added the deployed: workspace Workspace team change is running in production label Mar 31, 2022
@csweichel csweichel closed this Apr 1, 2022
@roboquat roboquat added size/XS and removed size/XXL labels Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production release-note size/XS team: delivery Issue belongs to the self-hosted team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[registry-facade] Manifest generation takes "a long time"
2 participants