0

Apologies in case this is a basic question. But I have read the documents but it is not very clear and trying to understand how the SLB url sends the request to the correct application incase multiple applications are deployed in that region.

Question:

Suppose I have a application that deployed on Cloudhub and runs on 198.138.37:8082 (worker IP address). My client is useing SLB url say "https://myapp.us-e2.cloudhub.io/api/healthCheck" to make a request to my application. We see that SLB url DNS get converted to the IP address when making a call.

The question is the SLB url IP address is a Load Balancer IP address and not the application IP address. So, how does the request is routed to the correct application? Behind the scene how is the routing happening from SLB to the correct application (in case there are multiple applications deployed on that region)?

Thanks in advance

Edit:

I do understand that every communication in Internet is going to end in the IP.

But the question is

Say I have two application "myapp1" and "myapp2" deployed on US east region (us-e2.cloudhub.io) on port 8082. If I do nslookup for both the application (not mule-worker), both gives me same set of IP addresses which is the Share LB IP address. Now when I call "myapp1" using "https://myapp1.us-e2.cloudhub.io/api/healthCheck". In the background it gets converted to one of the IP address that we got when we did nslookup (correct me if I am wrong). Once it converts to IP (which is same for both "myapp1" and "myapp2") how does the SLB knows/routes the request to correct application "myapp1"?

user12277274
  • 105
  • 2
  • 15
  • Is your question answered by the documentation? https://docs.mulesoft.com/runtime-manager/cloudhub-networking-guide – aled Nov 09 '22 at 19:39
  • There are multiple applications deployed in each region. Maybe you should explain what is your actual concern behind that question. – aled Nov 09 '22 at 19:58
  • Thanks Aled, I have edited the question and tried to explain the scenario under "Edit" section. – user12277274 Nov 10 '22 at 05:01
  • It looks that you are confusing the load balancer IP with the workers IP. I updated my answer to try to clarify that. – aled Nov 10 '22 at 11:44
  • I am not confused between load balancer IP and workers IP. May be I am not able to put the question in a correct way. Nevertheless, I found the answer to my question. Thanks for your time. – user12277274 Nov 14 '22 at 08:52
  • I'm sorry, I'm not quite sure what was the question. If you read my answer the SLB forwards request to the worker URL for the application and after that the IP is resolved, not before. It doesn't forwards first to some IP. – aled Nov 14 '22 at 11:43

1 Answers1

0

In practice every communication in Internet or any other TCP/IP networks is going to end in the IP layer.

The Shared Load Balancer forwards the request from the original DNS name to the worker DNS name, and maps the ports according to the protocol. The DNS name of the worker resolves to the IP of the worker.

Applications do not share the same IP, as you said it is the load balancer that has an IP for all URLs. However applications are not deployed to a load balancer. Each application is deployed to its own workers which have unique IPs. That's how any load balancer works, there is nothing special about that in CloudHub.

I suspect that you are concerned about request being directed to a wrong application. There is very very little chance of that happening.

Example: A request to https://myapp1.us-e2.cloudhub.io/api/healthCheck goes to the shared load balancer which forwards it to the worker DNS name using the application name: https://mule-worker-myapp1.us-e2.cloudhub.io:8081/api/healthCheck

If you are still concerned use a Dedicated Load Balancer or a CloudHub 2.0 Private Space.

aled
  • 21,330
  • 3
  • 27
  • 34