Re: Communication between Application Instances


Dieu Cao <dcao@...>
 

The Context Path Routing work has been completed on the cloud controller
API side and work to add support for it in the cf cli I believe is nearly
complete.
Until then, you could use this context path route plugin [1]

It's not generally recommended, but if you're running your own CF and you
trust all the apps running there, you could relax your app security group
rules and allow inter-host communication on the DEA with the manifest
configuration that Stevo linked above, in order to allow apps to connect
directly with each other without having to go back out through the router.

[1] https://github.com/zrob/context-route-plugin

On Mon, Dec 28, 2015 at 12:36 AM, Stevo Slavić <sslavic(a)gmail.com> wrote:

Hello Abhik,

I also have similar need, would like to allow different CF apps to talk to
each other directly (not through CF router service discovery is solved
problem grown ups can handle, potentially not even over HTTP since too much
overhead, no disk persistence needed as app can recreate state).

I was suggested on Cloud Foundry Slack group - use Bosh. Although I use
Bosh already for disk persistent services, IMO Bosh is not appropriate for
this particular use case (not even for disk persistent services, it's too
limited).

There are some proposals to improve CF platform like:
- Proposal: container networking for applications
<https://lists.cloudfoundry.org/archives/list/cf-dev(a)lists.cloudfoundry.org/message/3E7QRIFLC32QK3Q7LMR7FDZPBYLM2BXV/>
- Context Path Routing
<https://lists.cloudfoundry.org/archives/list/cf-dev(a)lists.cloudfoundry.org/message/WDGXFMWRWXG26ZDOGBDPFAN6MQAH4RKH/>

IMO features in those proposals would be very handy to support deploying
stateful apps to CF which can talk with each other, but they are not there
yet.

So there's no fine grained declarative control over routing or security. I
haven't tried it yet, but AFAIK one can only, on the entire CF
installation, allow apps deployed on the same DEA to talk to each other by
configuring
https://github.com/cloudfoundry/cf-release/blob/master/jobs/dea_next/spec#L36

Kind regards,
Stevo Slavic.

On Mon, Dec 28, 2015 at 5:55 AM, Gupta, Abhik <abhik.gupta(a)sap.com> wrote:

Hi,

I am curious to know if there’s any guideline or recommendation for
communication between two instances of the same application deployed on
Cloud Foundry. Ideally, there would be no need to have a channel between
the app instances, considering that the application itself should be
stateless.

However, there do arise a few special cases where it becomes necessary to
have communication between two or more instances of the application. Can
you point me to some ways to achieve this?



Best Regards,

Abhik

Join {cf-dev@lists.cloudfoundry.org to automatically receive all group messages.