DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Deep Dive Into JMS Integration Patterns With MuleSoft and JMS Behavior With Anypoint Clustering and Server Groups
  • Create Proxy Application for Mule APIs
  • Create Custom DataWeave Functions in Mule 4
  • MuleSoft: Do You Have an Extra Mule Under the Hood?

Trending

  • A Simple, Convenience Package for the Azure Cosmos DB Go SDK
  • The Role of Functional Programming in Modern Software Development
  • Teradata Performance and Skew Prevention Tips
  • Understanding Java Signals
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Implementing Clustering With MuleSoft AnyPoint Runtime Manager

Implementing Clustering With MuleSoft AnyPoint Runtime Manager

In simple terms, virtual servers composed of multiple nodes and they communicate and share information through a distributed shared memory grid.

By 
Jitendra Bafna user avatar
Jitendra Bafna
DZone Core CORE ·
Updated Jan. 17, 20 · Analysis
Likes (6)
Comment
Save
Tweet
Share
23.7K Views

Join the DZone community and get the full member experience.

Join For Free

Learn more about clustering with MuleSoft.

1.0 What Is Clustering?

Clustering is a group of servers or mule runtime which acts as a single unit. Mulesoft Enterprise Edition supports scalable clustering to provide high availability for the Mulesoft application. In simple terms, virtual servers composed of multiple nodes and they communicate and share information through a distributed shared memory grid.

By default, Mulesoft ensures the High availability of applications if clustering implemented. Let's consider the scenario one of the nodes in cluster crashed or goes down and under maintenance. In such cases, Mulesoft will ensure that requests are processed by other nodes in the cluster.

Mulesoft clustering also ensures that the request is load balanced between all the nodes in a cluster.

Clustering is only supported by on-premise Mule runtime and it is not supported in Cloudhub.

cluster

1.1 Types Of Clustering

There are two types of Clustering in MuleSoft.

  • Unicast.
  • Multicast.

A unicast cluster requires that you configure the IP addresses of the nodes in the cluster. If a server has multiple interfaces, use the internal IP address that allows the node to communicate directly with other nodes. Clustering across different subnets is not supported.

A multicast cluster comprises servers that automatically detect each other. Servers that are part of a multicast cluster must be on the same network segment.

One advantage of multicast clusters is that the server status doesn’t need to be Running to configure it as a node in a cluster. Another is that you can add nodes to the cluster dynamically without restarting the cluster.

1.2 Benefits Of Clustering

  • Clustering helps in improving application performance by dividing the workload between nodes in the cluster.
  • Horizontal Scaling can be done easily whenever required.
  • Automatic coordination of access to resources, such as files, databases, and FTP sources.
  • Automatic load balancing of processing within a cluster.
  • Improve Performance, Automatic Failover, High Availability.

2.0 Prerequisites

  • Java 8 must be installed on your machine.
  • Anypoint Platform Account.
  • Mule runtime engines must be running on your machines.

3.0 Setting Up MuleSoft Cluster Using AnyPoint Platform

3.1 Setup Mule Runtime Engine (e.g. mule-ee-distribution-standalone-4.2.2)

Download Mule runtime from here.

Unzip the downloaded Mule runtime.

3.2 Start the Mule Runtime Engine

To start the mule runtime, you need to go to folder “\mule-enterprise-standalone-4.2.2\bin” on command prompt and run mule.

3.3 Login into Anypoint Platform and Add Servers

To create a cluster, Go To  Runtime Manager → Servers → Add Servers

Once you click on Add Servers, it will give commands that you need to run on your machine.

./amc_setup -H 05a5f0c9-f282-48da-8afc-7324bbc488a3---239397 server-name

You can provide server-name in the above command. Please make sure you execute this command at folder “\mule-enterprise-standalone-4.2.2\bin”.

Once you execute the above command, it will configure mule agent on your machine and you can even see the server added to the Anypoint platform.

You can see server1 is created in Anypoint Platform under Runtime Manager→ Servers

Similarly, you can add more servers in Anypoint Platform Runtime Manager.

3.4 Create Anypoint Cluster

Before creating a cluster, you need to make sure at least one server is created otherwise it will not allow us to create a cluster. You can go to  Runtime Manager → Servers → Create Cluster.

Now click on Create Cluster and start filling the details. Finally, click on create cluster and it will create a cluster. Please make sure you select all the servers that need to be part of the cluster. 

During this creation process, it will restart all the servers assigned in the cluster. Once servers are restarted, you can see the cluster in Anypoint Runtime Manager.

Similarly, you can add more servers in your cluster using the Add Server button. In the future, depending on the load and performance of application you can easily do Horizontal Scaling. 

4.0 Deploying Application Into Cluster

For deploying Application into the cluster, Go To Runtime Manager → Applications → Deploy Application.

In the above image, you can see the newly created cluster name has been populated as Deployment Target. If you choose Deployment Target as cluster then it will automatically deploy the application to all the servers in your cluster and you can find the application under “\mule-enterprise-standalone-4.2.2\apps”

5.0 MuleSoft Server Group V/S Cluster

Server Group and Clustering both run in multiple distributed nodes. In the server group, instances of the application are isolated from each other.

In clustering, nodes are aware of each other, share common information and synchronize status.

All the servers in the server group and cluster must be running on the same version of mule runtime.

For further details, Please go through video “Implementing Mule Runtime, Clustering, High Availability, and Deploying Application Using Mulesoft“


This is how you can achieve clustering for your on-premise Mulesoft application.


Further Reading

How to Cluster Images With the K-Means Algorithm

clustering MuleSoft application

Opinions expressed by DZone contributors are their own.

Related

  • Deep Dive Into JMS Integration Patterns With MuleSoft and JMS Behavior With Anypoint Clustering and Server Groups
  • Create Proxy Application for Mule APIs
  • Create Custom DataWeave Functions in Mule 4
  • MuleSoft: Do You Have an Extra Mule Under the Hood?

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!