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

Add Read Unit mode to CU #1096

Merged
merged 3 commits into from
Jan 6, 2025
Merged

Add Read Unit mode to CU #1096

merged 3 commits into from
Jan 6, 2025

Conversation

TillaTheHun0
Copy link
Member

@TillaTheHun0 TillaTheHun0 commented Dec 23, 2024

This PR adds a runtime mode in the Compute Unit called "Read". The initial goal of this mode is to be a stateless application that can be horizontally scaled out in order to handle dry-runs. All of this is accomplished using top-level configuration. In this mode:

  • Arweave checkpointing is disabled
  • File checkpointing is disabled
  • /result, /state, /results, and /cron endpoints are disabled. Basically only /dry-run is enabled (and also /metrics if the metrics endpoint flag is enabled)
  • Caching evaluation results is disabled

Combined with the ability to leverage Postgres for persistence added in #1095, CUs in "Read" mode may be deployed using common patterns for stateless applications ie. horizontal scaling, "cattle" (as opposed to "pets") clusters, etc.

This also contains a related optimization. ao Process data is no longer cached, and is instead fetched once, as part of a cold start, since that is the only time when the ao Process data is needed. This mitigates large unstructured ao Process data (ie. Bootloader) from bloating persistence.

Base automatically changed from tillathehun0/ru to main December 23, 2024 15:36
Copy link
Contributor

@twilson63 twilson63 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@dtfiedler
Copy link
Contributor

👏 We'd love to help test this when you think it's ready.

@TillaTheHun0 TillaTheHun0 merged commit 859af1e into main Jan 6, 2025
3 checks passed
@TillaTheHun0 TillaTheHun0 deleted the tillathehun0/ru-mode branch January 6, 2025 14:44
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

Successfully merging this pull request may close these issues.

3 participants