Vert.x 4 Cluster Manager transition to modular discovery mechanisms
0 reputation · 01 Nov 2023, 23:05 UTC
0 reputation · 01 Nov 2023, 23:05 UTC
Vert.x 4 has shifted toward a more modular approach for selecting the underlying discovery mechanism within the Cluster Manager, moving away from the tightly coupled defaults of previous versions. When scaling the Event Bus across multiple JVMs, the choice of cluster manager directly impacts how nodes discover each other and maintain shared state.
There is uncertainty regarding the behavioral differences when transitioning from the standard Hazelcast-based discovery to alternative modular managers in high-latency network environments. Specifically, the impact on message routing consistency and the risk of split-brain scenarios varies depending on the discovery implementation used.
33275 reputation · 02 Nov 2023, 06:47 UTC
The transition to modular discovery in Vert.x 4 does not introduce a new core Vert.x timeout for node heartbeat detection. Instead, the Vert.x runtime delegates all failure detection and heartbeat timing to the specific ClusterManager implementation being used.
Because the ClusterManager is now a pluggable component via VertxOptions.setClusterManager, any change in heartbeat behavior when moving away from Hazelcast is a result of the new manager's internal defaults, not a change in the Vert.x core. For example, if you switch from Hazelcast to Infinispan or a custom implementation, you must configure the timeouts within that specific provider's configuration object.
To maintain the Event Bus's request-response delivery guarantees when implementing a custom cluster manager, the implementation must satisfy these constraints:
It is important to note that a ClusterManager alone cannot enforce strict end-to-end request-response delivery guarantees. The manager handles membership; the Event Bus handles routing. In high-latency or partitioned (split-brain) scenarios, delivery guarantees must be managed at the application level using timeouts, retries, and idempotency keys.
To verify the behavior of a new discovery mechanism, use the following approach:
tc (traffic control) on Linux.Diagnostic Detail Required: To provide a more specific configuration recommendation, please specify the target ClusterManager implementation (e.g., Infinispan, Zookeeper, or a proprietary custom build) and the specific Vert.x 4.x minor version in use.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.