Skip to content

refactor: simplify FlowALPRebalancerPaidv1#298

Open
holyfuchs wants to merge 8 commits intomainfrom
holyfuchs/rebalancer-refactor
Open

refactor: simplify FlowALPRebalancerPaidv1#298
holyfuchs wants to merge 8 commits intomainfrom
holyfuchs/rebalancer-refactor

Conversation

@holyfuchs
Copy link
Copy Markdown
Member

Removes per-rebalancer RecurringConfig storage and the RebalancerPaid handle resource.
All PositionRebalancer instances now read from a single defaultRecurringConfig set by the admin, eliminating per-position config.
createPaidRebalancer is now fire-and-forget (no return value), and removal goes through Admin.removePaidRebalancer.
Focus on simplicity.

@holyfuchs holyfuchs requested a review from a team as a code owner March 27, 2026 14:23
@holyfuchs holyfuchs requested a review from a team April 1, 2026 14:01
Copy link
Copy Markdown
Member

@jordanschalm jordanschalm left a comment

Choose a reason for hiding this comment

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

Haven't finished the review, but I have a general question about the rebalancer design. From past Q&As I thought we needed an architecture where a single supervisor would check position health and only schedule per-position rebalances for positions that need it (are outside the health bounds). One rebalancer per position, all independently checking health and rebalancing at the same interval does not seem like it would scale to large numbers of positions.

Mainly want to confirm my understanding; if the plan is to make this change later, that's fine.

Co-authored-by: Jordan Schalm <jordan.schalm@gmail.com>
@holyfuchs
Copy link
Copy Markdown
Member Author

Haven't finished the review, but I have a general question about the rebalancer design. From past Q&As I thought we needed an architecture where a single supervisor would check position health and only schedule per-position rebalances for positions that need it (are outside the health bounds). One rebalancer per position, all independently checking health and rebalancing at the same interval does not seem like it would scale to large numbers of positions.

Mainly want to confirm my understanding; if the plan is to make this change later, that's fine.

We initially discussed the current approach. The code is still from that time. It will certainly be more expensive to scale this.
Not sure if we want to change this.

@holyfuchs holyfuchs requested review from a team, jordanschalm and jribbink April 7, 2026 16:19
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