Re: Service Discovery on CF for Custom buildpack

Amit Kumar Gupta

Hi Ronak,

The system etcd and consul should not be used for application service
discovery. There are various approaches to doing service discovery with cf
applications, but no solution out of the box. The staging process should
generally been seen as an implementation detail of a running application,
it is typically not an appropriate place for a hook for service
registration. Service discovery and registration should be done at
runtime. The typical solution involves binding multiple applications to a
common service instance, like a database or message queue. In the future,
there may be an etcd or consul service; there may also be some sort of
service discovery built into the CF routing layer at some point.


On Mon, Aug 3, 2015 at 11:57 PM, Ronak Agarwal <roagarwa(a)> wrote:


We are trying to introduce a new component that will work together
with our custom buildpack to expose and secure APIs (you can think of
it as a Micro Gateway). In order to configure those gateways a new
webbased UI (our new web component) will be introduced that should
know about all our custom buildpack applications that are pushed to CF
and expose APIs. Ideally speaking every time an app gets pushed to CF
it should also notify the webbased UI that a new API is available
(something like service discovery).

I know CF has Etcd component which is used for Service Discovery but can
we use it to push application cluster details to this custom webbased UI ?

The other part of the question is that the webbased UI will create a
new app that will in turn expose an API as well. That new app will be
exposed to the outside world and route traffic to the pushed
application (our buildpack apps) offcourse after applying some
policies. Would that be possible to do with CF?

Can we setup a proxy for such requirement? which component of CF has to
be configured?


Join { to automatically receive all group messages.