Open purpleidea opened 1 year ago
I would like to help support the project, it seems really interesting and challenging.
I'm currently watching the last talk and plan to read some of the blog posts, would love already start to help but still understanding mgmt
.
@1garo Please ping on IRC or email, not here. Thanks!
This is a very nice example. Working on this, I found several issues, even with rate limited resources in static graphs that don't get replaces at a high frequency.
After resolving those, I found that now the Graph Worker is racing against the Functions Engine (?) like this:
The rate limiter token is lost, and the resource must wait another cycle. With code like in this example, churning out graphs based on test.fastcount
, this race is lost by the Worker surprisingly often.
My conclusion for now is that we probably need to persist the tokens from the rate limiter in a way that even survives replacement of the graph.
I think the limit and burst meta params are neat, but at the minimum they need to be added to the recently added
MetaState
( https://github.com/purpleidea/mgmt/blob/master/engine/metaparams.go) struct for persistence between graph transitions.Once this is done, please verify they're working properly (including in the "satellite" event loops ( https://github.com/purpleidea/mgmt/blob/master/engine/graph/actions.go#L452 ), and then improve the documentation in metaparams.go file: https://github.com/purpleidea/mgmt/blob/master/engine/metaparams.go#L56
I used this code to check they work across many graph transitions. You'll note it doesn't work because of graph swap!