Re: Soliciting feedback on a UX change for route services

Shannon Coen

On Wed, Jun 24, 2015 at 1:51 PM, Mike Youngstrom <youngm(a)> wrote:

I like the idea of binding to a route instead of an app. Much simpler
conceptually when considering a route can be bound to multiple apps.

I'm excited to eventually bind services to more CF entities like
services. Binding a service to a route is as good away as any to start
users thinking that services could be bound to more than just an app.

I also have future requirements to apply functionality to a route that may
not necessarily be implemented in the form of a proxy. So, it would be
nice if this functionality were somewhat generic by not requiring a route
service to provide a proxy url and ensuring the GoRouter doesn't fail if it
comes across a route service bound to a route without a proxy url.
This is interesting. Could you flesh this out for me? What use cases do you
have in mind for associating a service instance with a route, but not
providing a forwarding address?

I'm not a fan of the proposed create-route/update-route cli syntax. Would
it be possible to bind more than one route service to a route with that
syntax? I'd prefer something like bind-route-service/unbind-route service
Good feedback. Initially we won't support chaining services, but it does
seem worth considering a UX that doesn't prevent us from supporting this in
the future.

I cannot think of a situation where I'd like to have a route service
applied to one app but not another using the same route. The use case
doesn't really make sense given instance selection is random in that case

As an added side bonus this approach would be simpler to implement in
NoRouter. :)


On Wed, Jun 24, 2015 at 1:30 PM, Shannon Coen <scoen(a)> wrote:

Hi James,
All good suggestions; responses inline.

As we're still quite a ways from CLI work, and the proposed change is
somewhat fundamental, I'm primarily interested in determining whether
anyone has a legitimate use case for the behavior we'd like to eliminate.

On Wed, Jun 24, 2015 at 12:59 AM, James Bayer <jbayer(a)> wrote:

i personally don't like specifying the space in the "cf create-route"
command because it's one of the only cli commands i can think of that
requires specifying the space explicitly rather than using the currently
targeted space. i believe we should consider changing that now since a
single argument could be interpreted as the DOMAIN and the space could be
an explicit option parameter.
I agree that space isn't needed, but I don't think we can remove it from
create-route until v7; that command already exists and space is a required
argument. Seems like it would be a backwards incompatible change for now.

cf create-service audit-service free-plan my-audit-service

this seems fine, it means create a service that is expected to have a
route-service endpoint the attributes, similar to a syslog drain service
Correct, in response to create-service, the service broker will return a

cf update-route foo -s my-audit-service

we don't have "cf update-route" today. is the reason to make the
service_instance a parameter to account for more route options in the
Yes, service instance would be an optional parameter because there are
others planned for the route commands and they should be independently
configurable. E.g. path is now supported in the API and will be added to
CLI soon.

cf update-route foo -s my-audit-service -p /app/path

what about a "naked domain" that does not have a hostname like this cli pattern above does not really allow for that
right? perhaps it's better to have a similar syntax to the existing route

cf update-route -n foo -s my-audit-service
Agreed, we could support route services for naked domains.

what about supplying an external URL that is not a service on the
platform? would we do that with a user provided service instance or an
explicit URL added to the route?
# using a service
cf create-route development -n foo -s my-audit-service

# using an external URL
cf create-route development -n foo -u
Instead of adding a second parameter for a similar purpose, I would
prefer use of a user-provided service to keep the relationships consistent,
the parameters generic (not specific to USPIs), and limit the number of
ways to accomplish a task to a predictable, familiar minimum.

how would we remove a route-service from a route, by using a particular
option that means remove any route-service on the route?

cf update-route -n foo -r
Or using the same option with an empty string:

cf update-route -s ''

I'll admit, the bind/unbind metaphor works better here. Instead of using
the create-map/update-map commands, we could consider

Again, we're still a ways out from the CLI work, and none of these tweaks
discussed here change the fundamental routing behavior we're proposing.
That is, that a route service url is associated with the route, and not the


On Tue, Jun 23, 2015 at 9:14 PM, Benjamin Black <bblack(a)>

yes, this is how it should work.
On Jun 23, 2015 8:11 PM, "Shannon Coen" <scoen(a)> wrote:

The design proposal for route services
suggests the following developer workflow to trigger forwarding app
requests to a route service:

cf bind-service APP SERVICE_INSTANCE

This is a familiar workflow but for these kinds of services, this
introduces a lot of complexity and potentially surprising behavior. We are
seriously considering a slightly different UX that eliminates this
complexity and we believe is more intuitive. With this change, there is a
use case which would not be supported and we'd like to hear whether anyone
would miss it.

By binding different route services to applications that share a
route, requests could be forwarded to these different services according to
GoRouter's load balancing algorithm. Imagine a route (
mapped to three applications A, B, and C. App A is bound to route service
X, app B is bound to route service Y, while app C is not bound to a route
service at all. Requests to the route would be forwarded to either route
service X or to route service Y or directly to app C.

Instead of associating the route service with an application, we are
proposing associating the route service with the route. This would mean
that all requests for a route would be forwarded to the same route service,
and could not bypass it. The following CLI usage demonstrates the developer


This change would also mean that route services would not need to be
bindable, simplifying service development, as applications are not expected
to need credentials to contact the route service directly and CF doesn't
need to know the application in order to make the forwarding decision.

Let me know if you have concerns about this change in approach.

Thank you,

Shannon Coen
Product Manager, Cloud Foundry
Pivotal, Inc.

cf-dev mailing list

cf-dev mailing list

Thank you,

James Bayer

cf-dev mailing list

cf-dev mailing list

cf-dev mailing list

Join { to automatically receive all group messages.