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"?
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/healthCheckgoes 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/healthCheckIf you are still concerned use a Dedicated Load Balancer or a CloudHub 2.0 Private Space.