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

Cache worker metadata in worker bridge #586

Closed
vigoo opened this issue Jun 13, 2024 · 3 comments
Closed

Cache worker metadata in worker bridge #586

vigoo opened this issue Jun 13, 2024 · 3 comments

Comments

@vigoo
Copy link
Contributor

vigoo commented Jun 13, 2024

See #585 for measuring the effect

@vigoo vigoo added this to the Golem Open Source 1.0 milestone Jun 13, 2024
@afsalthaj
Copy link
Contributor

More details;

ExecutionContext can be cached with component metadata mentioned in a binding of an API definition.

Note that API gateway or worker bridge can deal with multiple API Definiton IDs (pretty much multi tenancy) especially when it comes to cloud. This implies we will have loads to cache. Also, ARC is the best approach here. It's adaptive and take into consideration of situations where there is large gaps between accesses but it's accessed for sure at this time gaps. If we don't do this, the gateway users will feel the slowness whenever they hit their endpoint to invoke worker function at regular (but larger) intervals. ARC will be automatically LRU and size aware. Not sure how many Rust libraries have this support. But it's easy enough to implement (max 3 hours).

There should also be a function in worker service trait that accepts arguments (mainly useful for worker bridge) such that there is no need to look up function after loading component metadata again and again because that information is preloaded in evaluation-context of worker bridge. This will also avoid double (duplicate) parsing of function names when calling worker through worker bridge.

@afsalthaj
Copy link
Contributor

Please find the explanations in PR and in slack: #630
and in here: https://zivergeteam.slack.com/archives/C057S2E4XT5/p1720013155994449

@afsalthaj
Copy link
Contributor

As the next step, I did try to remove the download of metadata in Rib evaluation, however bumped or uncovered following bugs with the latest OSS release:

#638 (in progress)
#641 (under review)
#639 (not mandatory for now)

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

Successfully merging a pull request may close this issue.

2 participants