mulesoftmule4cloudhub

Difference between Shared Load balancer URL and External IP address URL in Mule 4


My apologies in case this is a basic/simple question :-). I am still trying to understand the Mule Architecture.

Use case:

I have an mule application deployed to cloudhub with 2 workers. This API is called from third party using the shared load balancer URL (i.e., ..cloudhub.io). However, some transactions are taking more than 5mins because of which at the third party layer they are getting 504 error response, though the transaction is successfully completed at mule layer.

I read in one of the mule blog that shared load balancer has timeout of 5mins, and suggested to use External IP address (i.e., mule-worker-..cloudhub.io:).

My Question:

  1. Is there a way to increase the shared load balancer URL response timeout?
  2. If I am using External IP address, will it have any impact over the shared balancer URL? Any pros and cons? Like in case the API is deployed on 2 workers, will using External IP address URL be able to distribute the load between workers?

Thanks in advance.


Solution

    1. There is no way to increase the response timeout of the shared load balancer. It is fixed.

    2. When using the external DNS name (or external IP) for your application you are connecting directly to the application bypassing completely the load balancer. You lose all features of a load balancer or related to it, like load balancing and zero downtime deployments.

    When deploying to multiple workers the DNS name will return all IPs. Your client might be able to use the set of IPs in a round robin fashion. While it is not the same as load balancing, it is a kind of a very light load distribution strategy. Note that your client DNS resolution should avoid caching DNS resolution.

    Note that if you have a subscription for a Dedicated Load Balancer you can set a custom response timeout for it.