-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Open
Copy link
Description
Problem
Currently, each position has its own AutoRebalancer scheduled independently. With
Key Issues:
-
$O(N)$ Overhead: Scheduling overhead grows linearly with the number of positions. -
No Cross-Position Coordination: The Supervisor only performs
fixReschedule()recovery; it lacks the logic to decide if a position actually requires action. - Efficiency: Every rebalancer fires unconditionally, consuming resources regardless of need.
graph TD
SUP[Supervisor<br/>cron every z min]
AB1[Rebalancer 1<br/>every x min]
AB2[Rebalancer 2<br/>every y min]
ABn[Rebalancer N<br/>...]
P1[Position 1]
P2[Position 2]
Pn[Position N]
SUP -->|fixReschedule| AB1
SUP -->|fixReschedule| AB2
SUP -->|fixReschedule| ABn
AB1 -->|rebalance| P1
AB2 -->|rebalance| P2
ABn -->|rebalance| Pn
Proposed Solution
Replace
graph TD
COORD[Coordinator<br/>cron every x min]
P1[Position 1]
P2[Position 2]
Pn[Position N]
W1[Worker 1]
Wn[Worker N]
COORD -->|inspects| P1
COORD -->|inspects| P2
COORD -->|inspects| Pn
COORD -.->|dispatch if needed| W1
COORD -.->|dispatch if needed| Wn
W1 -->|rebalance| P1
Wn -->|rebalance| Pn
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels