Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b69H5rTewUKPyhGS8r
18 lines
992 B
Plaintext
18 lines
992 B
Plaintext
Lag is read from the broker (log end offset - committed offset, summed).
|
|
Replica counts come from KedaMath, a model of the scaler + HPA (KEDA is not run here).
|
|
|
|
A) uniform: {0=100, 1=100, 2=100, 3=100, 4=100, 5=100} total=600
|
|
lagThreshold=100 -> total=600 metric=600 desired=6
|
|
lagThreshold=50 (wants 12, 6 partitions) -> total=600 metric=300 desired=6
|
|
same, allowIdleConsumers=true -> total=600 metric=600 desired=12
|
|
|
|
B) skewed (hot key): {0=600, 1=0, 2=0, 3=0, 4=0, 5=0} total=600
|
|
default -> total=600 desired=6 (5 of 6 pods would sit idle)
|
|
limitToPartitionsWithLag=true -> total=600 desired=1
|
|
|
|
C) remainder edge: {0=150, 1=100, 2=100, 3=100, 4=100, 5=100} total=650
|
|
650 / 100 = 6 (integer) is not > 6, so the clamp is skipped -> metric=650 desired=7 on 6 partitions
|
|
|
|
D) activation (minReplicaCount=0, activationLagThreshold=0):
|
|
lag=0 -> active=false desired=0; lag=1 -> active=true desired=1
|