What Is Scalability? How Can We Achieve Scalability in MuleSoft Applications?
A few technical jargons in a layman's language so that it is easier to understand the concept of scalability!
Join the DZone community and get the full member experience.Join For Free
This article is purely based on my way of understanding things. I will try to explain a few technical jargons in a layman's language so that it is easier to understand the concepts. Try to adopt the concept by the general example I have given below
This is the most often word that we use in terms of performance-related things. So what does Scalability actually mean?
Scalability means that an application or a system can handle greater loads by adapting
So now, if your load on your application is high, you have two options of doing Scalability to handle it:
- Horizontal Scalability
- Vertical Scalability
Let's discuss with a general example
Consider a call center as an example:
Vertical Scalability means increasing the size of an instance.
Consider a call center having:
- A junior operator who is good at handling 5 calls per minute.
- A senior operator who is good at handling 10 calls per minute.
So we go with a senior operator who can handle the heavy load!
That means we are basically Scaling up by hiring a senior operator to handle the load instead of a junior operator. This is one way of Scalability on handling load.
Horizontal Scaling means increasing number of instances for you application
The other way to handle the load is to hire an extra junior operator so that 2 junior operators can handle 10 calls per minute, instead of hiring a senior operator!
That means we are basically Scaling out by hiring an extra junior operator instead of hiring a senior operator!
So now we understood that:
- We Scale up/down for Vertical Scalability
- We Scale in/out for Horizontal Scalability
Applying Scalability Concept in Mule Applications
Let's take an example of cloud hub deployments:
I have used the term "instance" in the above definitions. Applications on CloudHub are run by one or more instances of Mule, called workers. Each worker is a dedicated instance of Mule that runs your integration application.
- Vertical Scalability is nothing but increasing you vCore Size. Just like we did in call center example of hiring a senior operator over a junior operator
- Horizontal Scalability is nothing but increasing your workers. Just like we did in call center example of hiring two junior operators.
Now, we will get a doubt when to use Horizontal Scalability and when to use Vertical Scalability?
Again, this depends on the scenario/logic that your application is built.
But a simple way:
Vertical Scaling: Wherever you see if your application receives less number of requests but has heavy payload as input for each request/process, then go ahead with Vertical scaling by increasing your vCore size to handle the load. Similar to the call center example of hiring a senior operator
Horizontal Scaling: Wherever you see if your application receives more requests but has less payload as input for each request or process, then go ahead with Horizontal scaling by increasing your number of workers.Similar to the call-center example of hiring more junior operators
What if your application receives more requests with a huge payload per each request?
Then you have to adopt both Horizontal and Vertical scaling to handle the load on your application!
Hope this article helps you to understand the basic concept of Scalability and how to achieve it in Mule!
Opinions expressed by DZone contributors are their own.