Load Balancer
The main role of the load balancer in a clustered environment is to automatically detect if a Highway or JBoss node is down. If one of the JBoss nodes becomes unavailable, the load balancer should route all requests to the other node. This adds auto-failover to the solution.
For example, if the primary node goes down, the load balancer must be able to detect this and send all messages to the secondary node, which has taken over the running of the JMS queues. When this happens successfully, listeners connected to the JMS queue can still pick up these messages and process them. Therefore, the client is not affected, although the system may seem a little slower.
By default, most load balancers check if a server is available by using a TCP port check. However, a response from a port does not mean that the application is responsive. Therefore, it is recommended that the load balancer uses an HTTP heartbeat to ensure that JBOSS is available. An HTTP ping sends a test URL to determine if the complete JBOSS server is available. If there is no response, it means that the application is not working. This is a more complete test than checking the HTTP port. A possible heartbeat request is detailed below:
/highway/http/SubmitMessage?Synchronous=Yes&HighwayEndpointId=SPSBB&HighwayMessageId=SPS_SHIP&HighwayMessage=test