I have this application with Angular based UI & Spring based Microservices in the backend. Mule sits between these two and orchestrates traffic between them.
While I know a lot about front end load balancing with HAProxy to redirect traffic between Mule nodes. I was interested in learning if mule can redirect traffic in the backend without having to use an external loadbalancer. I want the Mule to backend interaction to be as seamless and simple, is there some kind of software load balancing mule can do in this regard?
For On-Premise there is NO inbuilt \ embedded load-balancer
You can still go through link below which could help to imporove some performance using clustering.
Mule Runtime High Availability (HA) Cluster Overview
For CloudHub Mule deployments there are certain provisions.
Cloudhub Dedicated Load Balancer
I think this can be achieved using "first-successful" connector but it goes to the next block within it only if the first one fails and so on.
Related
I need your help to suggest me how best I can achieve load balancing using the below diagram. here I am trying to create 2 machines with Master and expecting that the consumer/publisher application will use one common URL( a load-balanced one), where I should not expose the individual VM machine info and port ID. just that load balancer should take care of routing..
this is typically what we do with help of F5 load balancer or HTTP load balancer ..just wondering can be achieved over ActiveMQ and its advisable..?
on other side, I also tried configuring this way on weblogic to consume data from ActiveMQ queue
failover://(tcp://localhost:61616,tcp://localhost:61617)?randomize=true but this does not help.. or WebLogic is not understanding this format.
Messaging connections are stateful. They are not stateless like HTTP connections, and therefore cannot be load-balanced in the same way as HTTP connections. It may be possible to configure an F5 to deal with stateful messaging connections, but I can't say for sure. I'm not an expert on F5.
Both the ActiveMQ Artemis broker itself as well as the JMS client shipped with the broker have load-balancing functionality built in. There's too much to cover here so I recommend you review the clustering documentation for the relevant details.
You might also try using the broker balancer feature. It's currently experimental, but it should be ready to use in the 2.21.0 release coming in the March/April time-frame. It can act like an F5 for your messaging connections, but it can do some more intelligent things like always sending certain clients to the same node which can facilitate certain use-cases which are not possible in a traditional cluster.
The URL failover://(tcp://localhost:61616,tcp://localhost:61617)?randomize=true which are you using is for the OpenWire JMS client shipped with ActiveMQ 5.x. If you're using the core JMS client shipped with ActiveMQ Artemis then you should be using a URL like this instead:
(tcp://localhost:61616,tcp://localhost:61617)?ha=true
We are working on Mule HA cluster PoC with two separate server nodes. We were able to create a cluster. We have developed small dummy application with Http endpoint with reliability pattern implementation which loops for a period and prints a value. When we deploy the application in Mule HA cluster, even though its deploys successfully in cluster and application log file has been generated in both the servers but its running in only one server. In application we can point to only server IP for HTTP endpoint. Could any one please clarify my following queries?
In our case why the application is running in one server (which ever IP points to server getting executed).
Will Mule HA cluster create virtual IP?
If not then which IP we need to configure in application for HTTP endpoints?
Do we need to have Load balancer for HTTP based endpoints request? If so then in application which IP needs to be configured for HTTP endpoint as we don't have virtual IP for Mule HA cluster?
Really appreciate any help on this.
Environment: Mule EE ESB v 3.4.2 & Private cloud.
1) You are seeing one server processing requests because you are sending them to the same server each time.
2) Mule HA will not create a virtual IP
3/4) You need to place a load balancer in front of the Mule nodes in order to distribute the load when using HTTP inbound endpoints. You do not need to decide which IP to place in the HTTP connector within the application, the load balancer will route the request to one of the nodes.
creating a Mule cluster will just allow your Mule applications share information through its shared memory (VM transport and Object Store) and make the polling endpoints poll only from a single node. In the case of HTTP, it will listen in each of the nodes, but you need to put a load balancer in front of your Mule nodes to distribute load. I recommend you to read the High Availability documentation. But the more importante question is why do you need to create a cluster? You can have two separate Mule servers with your application deployed and have a load balancer send request to them.
We're using spring cloud config server. Spring config clients get updates using spring control bus (RabbitMQ).
Looks like every config client instance creates a queue connected to the 'spring.cloud.bus' exchange.
Any scalability limits on how many app instances can connect to a 'spring.cloud.bus' exchange ?
I suppose RabbitMQ could be scaled to handle this.
Looking for any guidelines on this.
Many thanx,
The spring cloud config server can have multiple instances since it is stateless. That coupled with a RabbitMQ cluster should scale to a very large number of instances.
A viable solution would be spring cloud config behind a load balancer with a RabbitMQ cluster.
I am working with Mule ESB and instead of using Mule Management Console (MMC). I just want to load balance so that if I am exposing my Mule ESB as a Service so in that case I don't want to use load balancer to balance my Mule ESB , because once the request will come Load Balancer, it is the single point of failure in case if it is down. So I just need a use case how to Expose Mule as a Service with Optimized Load Balancing without using MMC (Mule Management Console).
For load balancing incoming HTTP request, over multiple Mule instances, you will need a external loadbalancer. Mule ESB Enterprise Edition nor MMC will help you with that.
You can use a commercial one, such as a F5 BIP-IP, or setup a HAProxy. To avoid the loadbalancer to be a single point of failure you can setup a redundant HAProxy.
For JMS make sure to setup a external message broker cluster and connect to it using the normal jms:inbound-endpoint that way Mule will act as a competing consumer and you will achieve load balancing of messages.
I would also advice you to have a look at "MuleSoft Blueprint: Load Balancing Mule for Scalability and Availability" that covers this. It is a bit dated but most of the information in there is still valid.
It's unclear what transport are you using, anyhow you have just limited number of options.
Use Mule EE clustering feature for the VM transport.
Use a load balancer
Use a transport that support competing consumers like JMS or AMQP.
Could you provide a more detailed explanation of you deployment so I can provide more extact info?
We have more than 5 corporate applications running on different servers with technologies like spring, struts communication between these application is point to point. We are planning to migrate this to ESB using Mule.
I didnt quite understand how mule works i have few doubts,
Mule is running in a different server do i need to deploy all my 5 aplications into the mule server.
I have spring application delployed on a tomcat server how this application is going to receive messages through mule or what are the configuration changes i need to do in my server or mule server.
Any advice or tutorials.
You need not deploy all you 5 applications in the Mule Server.
You said that all your application are currently point to point (which means that all are talking/communicating now through http protocol), similarly you can also use mule's http endpoints to communicate with all the 5 applications.
I.e. the spring application talking to another spring application can be modified to Spring application talking to Mule and Mule in turn talking to another Spring application .
You must learn the basics from the Documentation
http://www.mulesoft.org/documentation/display/current/Mule+Fundamentals --> browse through the navigation on the lefthand side.
Mule is an integration tool. you no need to change any of your existing applications. All you need is to develop an mule application which can do the mediation/orchestration.
For connecting with your spring application you no need to change any configuration you need to use http:outbound connector inside your mule flow
Just go through http://www.mulesoft.org/documentation/display/current/HTTP+Transport+Reference
So mule is based on SOA principle, so your 5 corporate service need not to be their in a single system. so if you want to consume the service/functionality of any of your 5 application, expose those service as web service, cloud be soap or rest. And you can call those service inside your mule. so in this case you have to create only 5 connection and where ever required you can refer to those connection inside mule configuration file.
#saravanan shanmugavel you need to use Mule ESB to orchestrate the communication between these application...ESB came into the picture to remove your point to point communication...you can create a proxy service for each of your service and one flow which will orchestrate communication between all...
All you need to do is change the application that is configurable according to mule server.
Please refer below link that will be helpful for understanding of mule that helps you better orchestrate communication between all.
https://docs.mulesoft.com/