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

Boot stream node from local persistent stream storage #1789

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bas-vk
Copy link
Contributor

@bas-vk bas-vk commented Dec 11, 2024

As part of the stream node boot cycli it reads streams from the streams registry and initialises its internal stream cache. Nodes read all streams and filters out streams it is not participating in before loading them into the stream cache. In test environments nodes are able to load ~15K streams/s.

At the moment omega has 1534869 streams. Under the assumption that performance is similar it takes over 100s just to load the streams. When the number of streams increase the time to retrieve will increase proportionally. With the number of nodes increasing the percentage of streams a node is participating in will decrease causing the node to ignore relatively more and more streams wasting resources.

This PR uses a different approach and tracks stream data from the streams registry into its local database. On boot it fetches the streams from the database and applies changes. Fetching changes can be done by retrieving logs and is more efficient than fetching all streams. This reduces boot time and scales better over time when the number of streams and nodes increases.

Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
river-sample-app ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2024 3:11pm

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.

1 participant