Load balancing is one of the best solutions to distribute network or application traffic across a number of servers in order to increase throughput, capacity, availability and reliability. For those that want to make the most out of their on-premise Mule servers, the following steps show how to set up a load balancer with Mule Standalone servers:
location / {
root html;
index index.html index.htm;
proxy_pass http://<some name>;
}
upstream <some name> {
server <IP of one server>:<port of mule app>;
server <IP of another server>:<port of mule app> weight=<some number>;
}
example:
location / {
root html;
index index.html index.htm;
proxy_pass http://backend;
}
upstream backend {
server 10.0.1.108:8081;
server 10.0.3.112:8081 weight=5;
}
Now you can see that the Mule application is being served from both servers. If one server goes down, the other server will be able to serve the request.
If you would like to find out more about how you can get the most out of your MuleSoft infrastructure, do give us a call at +44 (0)203 475 7980 or email us at Salesforce@coforge.com
Other useful links:
How to Integrate Mule ESB with Microsoft Office-365 SharePoint
31 API Recipes with MuleSoft Anypoint Platform