MuleSoft

Understanding MuleSoft Clustering Using Standalone Servers

Pre-requisites

  • Ensure Anypoint Studio is installed and ready for use.
  • Download the Mule Standalone Server by visiting the Download Anypoint Studio & Mule page, filling in the required form, and clicking the Download button.

  • After submitting the form, you will receive an email with the download link. Click the link to download the ZIP file.
  • Now create a folder and inside that folder create two folders with some name and extract the zip file in both the folders.
  • In this scenario, we’ll be having two standalone servers so that we can form the cluster.

Understanding MuleSoft Clustering Using Standalone Servers

  • MuleSoft clustering means running more than one Mule server together so they work like one system.
  • Standalone servers are used because they give us full control over how Mule is installed, configured, and managed.
  • All Mule servers in a cluster connect with each other to share information and stay in sync.
  • If one server stops working, other servers continue the work, so the application does not go down.
  • Clustering is useful when we need high availability, better performance, or on-premise deployments.

Steps:

  1. To form a new cluster we need to add these two standalone servers into the anypoint platform.
  2. Login your anypoint platform and go to the runtime manager’s server section and click on add server then give the server name and copy the command from there.

  1. Navigate to the bin folder of the Mule Standalone server inside the folder you created earlier.
    Open a command prompt in this directory, remove ./ from the beginning of the copied command, and then execute it.

Once the command runs successfully, the server will appear in the Servers tab of Runtime Manager.

  1. Now, you can see your server will be added in the created state in runtime manager.

  1. Repeat Steps 2 to 4 to add the second Mule Standalone server from the cluster directory.
    After completing this, both servers will be visible in the Anypoint Platform Runtime Manager, as shown in the image below.

Note: It is recommended to configure the second standalone server on a different machine to prevent networking or clustering conflicts / Address already bind for this port issue.

  1. Open a command prompt in the bin folder of each Mule Standalone server and run the command mule.bat.
    Do this for both servers. Once started, their status in Runtime Manager will change to Running.

  1. W Now, we will create the cluster. In Runtime Manager, click on the Create Cluster button.
    Enter a cluster name and select the cluster type.
  2. There are two types of clusters:

a) Unicast

  • In a Unicast cluster, the nodes communicate with each other using their internal IP addresses within the same subnet.
  • Mule uses the IP address to identify each server in the cluster.

b) Multicast

In a Multicast cluster:

  • Servers automatically discover each other.
  • The server does not need to be in the Running state to be added as a node in the cluster.
  • For this setup, select Multicast and click Create Cluster.
    The cluster will be created successfully.

  1. Let’s deploy an application on this cluster. For this demonstration, I have created a simple demo Mule application, which we will deploy to the cluster, as shown in the image below

  1. Export the Mule Application jar file by right click on the application in Anypoint studio and click on export.
  2. Now go to Anypoint platform runtime manager 🡪Applications 🡪 Deploy Application
    1. Give name to your application
    2. Select the deployment target as the cluster in Hybrid section
    3. Upload the jar file from your directory
    4. Click on Deploy Application

  1. Application deployed on the cluster successfully. If you will check your standalone server apps directory you will find this application there also.
  2. Now, Let’s hit the request to check that application is running successfully as shown in the below image.

🚀 Ready to Build a High-Availability MuleSoft Architecture?

Setting up MuleSoft clustering correctly is critical for performance, scalability, and business continuity. Whether you’re planning a hybrid deployment or optimizing your on-premise infrastructure, expert implementation makes the difference.

TGH Software Solutions Pvt. Ltd. specializes in:

  • MuleSoft Integration Services

  • MuleSoft API Management

  • Enterprise Application Integration

  • Hybrid & On-Prem Deployment Architecture

  • High-Availability & Cluster Configuration

📞 Call Us: +91 8885252627
🌐 Website: https://techygeekhub.com
📩 Contact Us: https://techygeekhub.com/contact-us/

Partner with certified MuleSoft experts at TGH to design scalable, secure, and future-ready integration solutions tailored to your enterprise needs.

contact us

Author

TGH Software Solutions Pvt. Ltd.

Leave a comment

Your email address will not be published. Required fields are marked *