Consumer Autoscaling - Middle¶
Estimate required replicas from arrival rate, per-replica processing rate, backlog, and target drain time.
flowchart LR
Metrics[Lag and throughput] --> Controller[KEDA/HPA] --> Desired[Desired replicas] --> Group[Rebalance group]
Cap replicas at useful partition count, smooth noisy measurements, and keep headroom. Scale down only after cooldown and graceful offset commit. Cooperative-sticky assignment reduces movement compared with eager rebalance. Test yourself¶
- Which rates determine drain time?
- Why cap at partition count?
- How does cooperative rebalancing help? Continue to
senior.md.