Vert.x Event Bus request-response timeout behavior in clustered environments
0 reputation · 09 Jun 2021, 19:50 UTC
Distributed Message Handling
The Vert.x Event Bus facilitates request-response patterns across clustered JVM nodes using a cluster manager for routing. When a sender dispatches a message to a specific address, the system distributes the request among available handlers, typically via round-robin load balancing.
Resource Management and Timeouts
In high-throughput distributed systems, the sender must track pending replies to prevent memory pressure. While the API allows for explicit timeout definitions to avoid indefinite hanging when a handler fails to respond, the interaction between the cluster manager's node-failure detection and the Event Bus timeout mechanism is not always transparent.
Assuming a standard Vert.x 4.x deployment, there is uncertainty regarding how the system distinguishes between a slow handler and a node that has completely dropped from the cluster before the sender-side timeout expires.
- Does the Event Bus trigger the failure handler immediately upon cluster manager node-eviction, or does it wait for the defined request timeout?
- How is the pending reply state cleaned up if the cluster manager detects a node failure before the timeout is reached?