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

Allow for the async registry to go to an external cache #34

Open
fntlnz opened this issue Mar 10, 2025 · 2 comments
Open

Allow for the async registry to go to an external cache #34

fntlnz opened this issue Mar 10, 2025 · 2 comments

Comments

@fntlnz
Copy link
Collaborator

fntlnz commented Mar 10, 2025

To overcome the fact that most upstream registries would struggle with the amount of requests the information in staticreg would require to (for example, list all tags for all the images on a registry) we implemented an internal cache called Async registry.

This leads to three issues:

  • when restarting staticreg, the cache is cold so the pages are empty. One possible solution is also Health check endpoint #26
  • when starting staticreg on multiple instances they might have different versions of the cache because they create them independently
  • memory usage grows linearly with the amount of tags in the registry and is tied to each staticreg instance

To overcome this, @bebosudo suggested to use an external cache (such as a Redis instance) which I agree.

We could abstract the Async Registry to an interface and implement various backends such as the current one for inmem and one for redis. There are surely libraries that already do this such as Gocache, we can explore that as well.

@pditommaso
Copy link

Can S3 be used instead of Redis?

@fntlnz
Copy link
Collaborator Author

fntlnz commented Mar 10, 2025

definitely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants