Fly-Style opened a new pull request, #19655:
URL: https://github.com/apache/druid/pull/19655

   ## Summary
   
   Adds a two-tier "critical lag" fast path to the cost-based Kafka/Kinesis 
supervisor autoscaler, so an operator-configured SLA threshold can trigger a 
faster scale-up reaction than the normal cost-minimization loop provides.
   
   `CostBasedAutoScalerConfig` gains an optional `criticalLagThreshold` 
(aggregate/global lag across all partitions, not per-partition). When set, 
`CostMetrics#getAggregateLag()` is compared against it on every evaluation:
   
   - **Tier 1 (≥75% of threshold):** the lag-amplification multiplier used in 
the cost function's lag-recovery-time term maxes out at `6.0` (vs. the default 
`0.3`), and the scale-up candidate search bypasses its usual boundary cap 
(`useTaskCountBoundariesOnScaleUp`), letting the argmin search the full 
candidate range instead of being capped to +2 steps above the current task 
count.
   - **Tier 2 (≥95% of threshold):** cost minimization is skipped entirely — 
the autoscaler jumps straight to the maximum valid task count, regardless of 
configured weights or idle ratio.
   
   `criticalLagThreshold` is `null` by default, which leaves existing behavior 
unchanged. The 75%/95% fractions and the 6.0 multiplier are fixed algorithm 
constants (`WeightedCostFunction.CRITICAL_LAG_TIER1_FRACTION`, 
`CRITICAL_LAG_TIER2_FRACTION`, `CRITICAL_LAG_AMPLIFICATION_MULTIPLIER`), not 
separately configurable.
   
   This PR has:
   
   - [ ] been self-reviewed.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to