CryoThrust commented on issue #12087:
URL: https://github.com/apache/seatunnel/issues/12087#issuecomment-5536622693

   For the autoscaling control loop, I suggest making the state-machine and 
fencing semantics explicit before implementation.
   
   A recommendation should be identified by (masterEpoch, generation) and carry 
an observed-at timestamp, target worker count, reason/metrics window, and an 
expiry. The apply path should be compare-and-set against the current 
epoch/generation so a delayed recommendation from a previous master cannot 
resize a new control loop.
   
   The worker-side transition should be idempotent: repeated application of the 
same recommendation must not create duplicate join/leave operations. A 
stable-window requirement should be evaluated against monotonic engine time 
(with wall-clock only for diagnostics), and scale-down should have a separate 
cooldown/drain condition from scale-up. Metrics should distinguish recommended, 
accepted, applied, and rejected/stale so operators can diagnose why capacity 
did not change.
   
   A small Phase 1 contract test around stale epochs, duplicate 
recommendations, and restart recovery would provide a strong boundary for later 
provider-specific implementations.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to