To Setup a Load Balancer for Anypoint Platform Private Cloud Edition

Anypoint Platform Private Cloud Edition must be run in production environment with multiple servers. To distribute traffic among servers and to restrict access to specific ports, you must install and configure a load balancer.

In a single server development environment, MuleSoft recommends using a load balancer.

You can configure your load balancer to use any method for distributing client requests, but in most contexts a round robin strategy is ideal. This load balancer should be reachable through an IP address that is accessible to all machines in your network.

Your load balancer must route the following TCP ports:

Load Balancer Port Instance Port Internal Usage



HTTP redirects to HTTPs.



HTTPS port



WebSocket Port for Runtimes to connect



Ops Center Access Port

In each case, your load balancer must listen on the Load Balancer Port and redirect incoming requests to the Instance Port. Your Anypoint Platform installation includes an internal NGINX server that listens on each of the configured instance ports, then performs the action listed in the Internal Usage column.

Your load balancer should poll the address HTTP:10248/healthz to run a health check on your platform servers and confirm that they are accessible.

You do not need to configure SSL credentials in your load balancer. You can configure them using Access Management.

To Configure a Load Balancer

  1. Enable stream block in your /etc/nginx/nginx.conf file, by referencing all the configuration properties defined in /etc/nginx/stream.d/*. You can achieve that by adding the following:

    stream {
       include /etc/nginx/stream.d/*.conf;
  2. Delete the default.conf file from /etc/nginx/conf.d

  3. Create a folder named /etc/nginx/stream.d and in it create a file named onprem.conf

  4. Paste the following content in onprem.conf

    server {
       listen 80;
    server {
       listen 443;
    server {
       listen 8889;
    server {
       listen 9500;
    server {
       listen 9501;
  5. Enable the default ports on SELinux before starting the NGINX. Run the following commands one by one:

    `semanage port -a -t http_port_t  -p tcp 8889`
    `semanage port -a -t http_port_t  -p tcp 9500`
    `semanage port -a -t http_port_t  -p tcp 9501`
  6. Start NGINX:

    service nginx restart

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub