Proposal: Hooking into yunikorn-core event system would allow snapshots of the object state with small performance degregation of the scheduler #241
nikola-jokic
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Is it feasible to tweak this to make the changes even less intrusive upstream by allowing configuration at build time to pull in our alternate event stream implementation instead of requiring this code to live upstream? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem statement
Yunikorn documentation describes the purpose of the event system, its challenges and limitations. Since the purpose of this project is to preserve historical data and keep object states, the event system is missing crucial information about the application lifecycle, such as allocation tags, etc.
Partial information propagated through the event stream is not rich enough to preserve the actual historical data that was stored in Yunikorn.
On the other hand, using API to periodically snapshot the queue state would also be incomplete since objects are deleted as soon as the scheduler is done with them. Another drawback of this approach is that frequent requests would cause degradation in the scheduler's performance.
Proposal
This problem would be completely solved if the event system, along with the current data, sends the snapshot of the object inside the event field. This approach would effectively be the same as using in-memory object cache for scheduler operations, while asynchronously persisting the data through the event stream.
Here is the list of proposed changes that could be added to the Yunikorn to make it work:
EventRecord
to contain thestate
field of typeany
. Nil by default. If Yunikorn is configured without the extension, state would be nil and no additional data would be sent through the wire. On the other hand, if the extension is configured, thestate
would be the snapshot of the object.state
in its method invocation, so it can build up the event with optional state data.Pros:
Cons
Conclusion
Having changes to the event stream, to push the actual data would allow us to persist states and transitions. This proposal outlines the potential approach that can be taken. We are open to suggestions and modifications of this approach.☺️
Beta Was this translation helpful? Give feedback.
All reactions