Add keda: Spring Boot 4.2.0 Kafka consumers under KEDA autoscaling (partition cap, lag maths, rebalances, SIGTERM vs SIGKILL)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b69H5rTewUKPyhGS8r
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
A consumer JVM processes records (50 ms each) and commits every 20. We stop it after it has
|
||||
processed 30 records (20 committed + 10 in flight). A standby consumer is already in the group.
|
||||
session.timeout.ms=6000 (the broker's minimum).
|
||||
|
||||
SIGTERM (what Kubernetes sends on scale-down):
|
||||
child had processed 31, committed 20 at the moment of the signal
|
||||
standby's first record: offset 20 after 108 ms
|
||||
records processed twice (child processed 31, standby restarted at 20): 11
|
||||
|
||||
SIGKILL (pod crash, node loss):
|
||||
child had processed 30, committed 20 at the moment of the signal
|
||||
standby's first record: offset 20 after 5481 ms
|
||||
records processed twice (child processed 30, standby restarted at 20): 10
|
||||
|
||||
Both replay the uncommitted tail (at-least-once). Only SIGKILL also waits out session.timeout.ms.
|
||||
Reference in New Issue
Block a user