What Is High Availability and How Can We Achieve It in Mule Applications?
In this article, take a look at high availability and see how we can achieve it in Mule applications.
Join the DZone community and get the full member experience.
Join For FreeIn my previous article, we discussed what exactly is "Scalability" and how we can achieve it in Mule Apps. This article is in continuation of it.
As said previously, I use general terms to explain things so that you can relate those examples with real-time scenarios! Again this article will give you basic info on the concept. You can read more info in official Mule Docs.
Now, let's continue discussing High Availability (HA).
To put it in simple words:
High Availability is nothing but making your application available almost all the time without any downtime.
There are chances of where your Data Centre (where your applications are actually deployed) might be down or not operational due to any kind of reasons. i.e, your worker might not be functional anymore. So now your Application is down!
Let's Take the Same Call Center Example:
Assume there's an office that is operating in the USA region (consider as AWS region ) in California (consider this as one AZ in the US region). Now assume all the calls are taken in this regional office. Due to the cyclone effect, there was an interruption in Network and the office is unable to take any calls! Simply, it is not operational anymore!
Bad isn’t it? They might lose trust and confidence from customers! So how to overcome this situation?
Simple. There should be a backup office located in some other region say, New York!
Now in the times where the California office becomes non-operational, all calls will be routed to the New York Office. Now the office is all time available to take calls !!
We can also manage calls via both offices which is called Load Balancing which is another concept which I will be covering in my next articles.
For now, consider that if the current office is non-operational, then the calls are routed to other offices.
Now Technically Speaking
Here comes the concept of High Availability!
High Availability means running your application or system in at least 2 Data Centers ( 2 workers or instances or nodes , whatever you name it)
Let's Understand a Few Terms
Data Center: A large group of networked computer servers typically used by organizations for the remote storage, processing, or distribution of large amounts of data.
Availability Zones (AZ's): in AWS, Each AZ's is nothing an isolated Data Center in a particular region.
Instance: Usually a Virtual Machine which has Storage, RAM, OS, it's typically kind of a System which runs remotely
Coming to CloudHub Deployments, All your Apps are usually deployed in AWS instances. i.e, your application is deployed in one of the Availability Zones (AZ's).
When we deploy our application with one worker, that means you have deployed your application in one of the Availability Zones in that particular region.
Now how to achieve High Availability?
High Availability Goes Hand in Hand With Horizontal Scaling
If you don't know about what is Horizontal Scaling, read my previous article: What is Scalability?
In short, Horizontal Scaling is nothing but increasing your workers while deploying your application. Same as mentioned in the call center example, having an additional office to take care of operations in case of any failure due to network or due to any disaster happened to the current office. Simply, having a backup!
So whenever one worker is down, your request will be routed to the next available worker!
So we can say we achieve High Availability by doing Horizontal Scaling
High Availability ~ Horizontal Scaling
Each worker is deployed in different AZ's. No two workers are deployed in the Same AZ's.
So that if one AZ goes down due to whatever reason it might be, the application is still up and running on another AZ. This makes our application to be available all the time with less or I can say 0.01 downtime.
This is nothing but High Availability :)
Hope this article helps you to understand the concept of High availability! Will come up with more concepts like Load Balancing, Disaster recovery incoming articles!
Opinions expressed by DZone contributors are their own.
Comments