This article explains on how a Mule ESB Cluster Setup can be tested successfully along with MYSQL database. When multiple Mule ESB nodes are configured in a cluster, it is essential to test the cluster in order to make sure that the setup is correct and functioning well.
Mule ESB cluster is used for load balancing and high availability. In case of Mule ESB hosting http services, a load balancer can be used to route the traffic in active-active mode.
As the test application has an http inbound end point to receive requests, it is necessary to establish a reliable acquisition flow so that if there any case of node failure, the request which is present in the persistent JMS queue can be served by other node in the cluster (or) the client which has received an error response needs to resend the request. In this way, message loss can be controlled.
Application logic flow inserts each request into LOG table with details of request id, time of log and mule server host name from which the log is written.
If there is any exception in the application logic (in case of database down), the message is moved to dead letter queue.
A test client can be used (for e.g. a Java program/SOAP UI client) to send the requests with different requestId parameter to the load balancer URL which will in turn route the traffic to mule cluster in active-active mode.
Test cases for different scenarios
|Test case||Expected Result|
|Run the test with all servers online ( by sending around 1000 requests)||
|Shutdown Mule ESB Node 1 and run the test again||
|Bring back Node 1|
|Start the test load, after sending some requests ( say 200 ), shut down MuleESB Node2||
Bring back Node 2
If you would like to find out more about how Digital Transformation could help you make the most out of your current infrastructure while enabling you to open your digital horizons, do give us a call at +44 (0)203 475 7980 or email us at email@example.com.
Other useful links: