-
Notifications
You must be signed in to change notification settings - Fork 21
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
Cache guest binaries downloaded from IPFS #388
Labels
Comments
When we upload these images lets also make sure we use a subscribed pinata account, as that enables a higher request limit |
willemolding
added a commit
that referenced
this issue
Mar 20, 2025
Closes #388 Uses reqwest middleware to add a HTTP-aware cache. See https://docs.rs/http-cache-reqwest/latest/http_cache_reqwest/index.html. This is used only for caching requests for assessor and set-builder images at this time. - Adds caching to requests to retrieve assessor and set builder images - - Can trivially also add it to user images but this may need more discussion - Add new command line flag `--cache-images` to broker - Adds new command line arg `--cache-dir` to broker (default `/tmp/broker_cache/`) --------- Co-authored-by: Austin Abell <[email protected]> Co-authored-by: Cohan <[email protected]> Co-authored-by: Sasha <[email protected]> Co-authored-by: pote.eth <[email protected]> Co-authored-by: Parker Thompson <[email protected]> Co-authored-by: Victor Graf <[email protected]> Co-authored-by: Rami Lukata <[email protected]> Co-authored-by: Richard Howard <[email protected]> Co-authored-by: Angelo Capossele <[email protected]>
nategraf
added a commit
that referenced
this issue
Mar 20, 2025
Closes #388 Uses reqwest middleware to add a HTTP-aware cache. See https://docs.rs/http-cache-reqwest/latest/http_cache_reqwest/index.html. This is used only for caching requests for assessor and set-builder images at this time. - Adds caching to requests to retrieve assessor and set builder images - - Can trivially also add it to user images but this may need more discussion - Add new command line flag `--cache-images` to broker - Adds new command line arg `--cache-dir` to broker (default `/tmp/broker_cache/`) --------- Co-authored-by: Austin Abell <[email protected]> Co-authored-by: Cohan <[email protected]> Co-authored-by: Sasha <[email protected]> Co-authored-by: pote.eth <[email protected]> Co-authored-by: Parker Thompson <[email protected]> Co-authored-by: Victor Graf <[email protected]> Co-authored-by: Rami Lukata <[email protected]> Co-authored-by: Richard Howard <[email protected]> Co-authored-by: Angelo Capossele <[email protected]>
nategraf
added a commit
that referenced
this issue
Mar 20, 2025
Closes #388 Uses reqwest middleware to add a HTTP-aware cache. See https://docs.rs/http-cache-reqwest/latest/http_cache_reqwest/index.html. This is used only for caching requests for assessor and set-builder images at this time. - Adds caching to requests to retrieve assessor and set builder images - - Can trivially also add it to user images but this may need more discussion - Add new command line flag `--cache-images` to broker - Adds new command line arg `--cache-dir` to broker (default `/tmp/broker_cache/`) --------- Co-authored-by: Austin Abell <[email protected]> Co-authored-by: Cohan <[email protected]> Co-authored-by: Sasha <[email protected]> Co-authored-by: pote.eth <[email protected]> Co-authored-by: Parker Thompson <[email protected]> Co-authored-by: Victor Graf <[email protected]> Co-authored-by: Rami Lukata <[email protected]> Co-authored-by: Richard Howard <[email protected]> Co-authored-by: Angelo Capossele <[email protected]>
nategraf
added a commit
that referenced
this issue
Mar 21, 2025
Closes #388 Uses reqwest middleware to add a HTTP-aware cache. See https://docs.rs/http-cache-reqwest/latest/http_cache_reqwest/index.html. This is used only for caching requests for assessor and set-builder images at this time. - Adds caching to requests to retrieve assessor and set builder images - - Can trivially also add it to user images but this may need more discussion - Add new command line flag `--cache-images` to broker - Adds new command line arg `--cache-dir` to broker (default `/tmp/broker_cache/`) --------- Co-authored-by: Austin Abell <[email protected]> Co-authored-by: Cohan <[email protected]> Co-authored-by: Sasha <[email protected]> Co-authored-by: pote.eth <[email protected]> Co-authored-by: Parker Thompson <[email protected]> Co-authored-by: Victor Graf <[email protected]> Co-authored-by: Rami Lukata <[email protected]> Co-authored-by: Richard Howard <[email protected]> Co-authored-by: Angelo Capossele <[email protected]>
nategraf
added a commit
that referenced
this issue
Mar 21, 2025
Closes #388 Uses reqwest middleware to add a HTTP-aware cache. See https://docs.rs/http-cache-reqwest/latest/http_cache_reqwest/index.html. This is used only for caching requests for assessor and set-builder images at this time. - Adds caching to requests to retrieve assessor and set builder images - - Can trivially also add it to user images but this may need more discussion - Add new command line flag `--cache-images` to broker - Adds new command line arg `--cache-dir` to broker (default `/tmp/broker_cache/`) --------- Co-authored-by: Austin Abell <[email protected]> Co-authored-by: Cohan <[email protected]> Co-authored-by: Sasha <[email protected]> Co-authored-by: pote.eth <[email protected]> Co-authored-by: Parker Thompson <[email protected]> Co-authored-by: Victor Graf <[email protected]> Co-authored-by: Rami Lukata <[email protected]> Co-authored-by: Richard Howard <[email protected]> Co-authored-by: Angelo Capossele <[email protected]>
nategraf
added a commit
that referenced
this issue
Mar 21, 2025
Closes #388 Uses reqwest middleware to add a HTTP-aware cache. See https://docs.rs/http-cache-reqwest/latest/http_cache_reqwest/index.html. This is used only for caching requests for assessor and set-builder images at this time. - Adds caching to requests to retrieve assessor and set builder images - - Can trivially also add it to user images but this may need more discussion - Add new command line flag `--cache-images` to broker - Adds new command line arg `--cache-dir` to broker (default `/tmp/broker_cache/`) --------- Co-authored-by: Austin Abell <[email protected]> Co-authored-by: Cohan <[email protected]> Co-authored-by: Sasha <[email protected]> Co-authored-by: pote.eth <[email protected]> Co-authored-by: Parker Thompson <[email protected]> Co-authored-by: Victor Graf <[email protected]> Co-authored-by: Rami Lukata <[email protected]> Co-authored-by: Richard Howard <[email protected]> Co-authored-by: Angelo Capossele <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now, the broker downloads the application guest image on every job, and additionally downloads the set builder and assessor guests when starting the process. This is a source of extra bandwidth costs and time cost for request evaluation, and (more importantly) has been a source of downtime when IPFS gateway rate limits are hit.
One concrete step to improve on this is to cache the content downloaded from IPFS URLs. Because IPFS is content addressable, it is possible to use the CID int the URL as the cache key. Caching the set builder and the assessor images would be obvious and immediately helpful. Caching application guest images would also be quite helpful, but requires a heuristic for cache invalidation and a cap on the total cache size.
The text was updated successfully, but these errors were encountered: