pjfanning opened a new pull request, #2734: URL: https://github.com/apache/pekko/pull/2734
Ports [akka/akka-core#31837](https://github.com/akka/akka-core/pull/31837). Keep-alive pings were sent from every node on a fixed timer, causing thundering herd issues and unnecessary load (e.g. waking all projection instances simultaneously). Part of #2730 ### Settings (`ShardedDaemonProcessSettings`) - Added `keepAliveFromNumberOfNodes: Int` (default: `3`) — only the first N sorted cluster members send keep-alives, making selection deterministic across nodes - Added `keepAliveThrottleInterval: FiniteDuration` (default: `100 ms`) — inter-message delay when sending keep-alives - Both settings exposed via Scala/Java `with*` APIs ### KeepAlivePinger behavior - Identities sorted for deterministic ordering across nodes - If node is already `MemberStatus.Up` at actor start, fires `Tick` immediately instead of waiting for `SelfUp` - `isActive()` check gates whether this node participates in keep-alive at all - Keep-alive sending is now async via `Source.throttle` + `pipeToSelf`, so the next timer fires only after the current batch completes ### Config (`reference.conf`) ```hocon pekko.cluster.sharded-daemon-process { keep-alive-from-number-of-nodes = 3 keep-alive-throttle-interval = 100 ms } ``` -- 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]
