hello-world.2abc2ce6-cce6-463b-afaa-a1979e3xxxxx.svc.cluster.local
Access One Application from Another in the Same Cluster
In an Anypoint Runtime Fabric cluster, every application replica exposes an endpoint inside the cluster. When you enable inbound traffic, that endpoint is exposed externally. Refer to Enable Inbound Traffic on Anypoint Runtime Fabric for additional information about servicing external requests and configuring the load balancer.
To send a request from one application to another application inside the cluster, use the application name and environment ID.
Every application has a DNS record in the cluster internal domain. For example, the DNS record for the application hello-world
in the 2abc2ce6-cce6-463b-afaa-a1979e3xxxxx
environment is:
Because application replicas first search DNS records in the same domain before searching the parent domain, you need only the application name and environment ID to send a request to another application in the same cluster. If both applications are in the same namespace, you need only the application name:
http://hello-world:8081/api
If required, replace http
with https
.
The following example sends a request from one application to an application in another namespace. In this example, 1abc2ce6-cce6-463b-afaa-a1979e3xxxxx
is another envionment in the same Runtime Fabric cluster, so this environment ID is appended to the application name:
http://hello-world.1abc2ce6-cce6-463b-afaa-a1979e3xxxxx:8081/api