In-App Cloud Casting

I have 3 applications running on a private vcap instance. One of them acts as a client facing the web application, while the other is the backend system, one of which provides REST data services that the web application consumes, and another application that writes to the database asynchronously via rabbitmq.

Now my questions are:

1) Instead of the client encountering webapp, the public URL is called, how can I directly contact the other URLs?

2) How to associate a webapp application and a database recording application with the same rabbit instance. I will refuse automatic reconfiguration, but how do I get rabbit connection parameters?

+5
source share
1 answer

I'm going to answer the opposite! You can bind the application by checking the environment variable VCAP_SERVICES, this will be information about the associated Rabbit instance.

When you deploy an application instance, it runs on a virtual machine (called DEA). The application instance is assigned a port in the virtual machine. Inside, all DEAs can "see" each other, so there is no reason why an application should not talk on a private IP address in another application running on another DEA.

Obviously, you don’t know which private IP address or even the port of the application will work until it is pressed, so I would advise you that each application “register” its address through Rabbit after clicking it, so that other applications can find him.

+2
source

All Articles