anchor.diff:  **Disadvantages:**
   
   - Adding route services requires manual infrastructure configuration.
  -- Unnecessary network hops for traffic to apps that do not use the route service; requests for all apps hosted by the deployment pass through the route service component.
  +- Traffic to apps that do not use the route service make unnecessary network hops. Requests for all apps hosted by the deployment pass through the route service component.
   
   ### <a id="user-provided"></a>User-Provided Service ###
   
  -If a route service is not listed in the CF marketplace by a broker, a developer can still bind it to their app as a User-Provided service. The service can run anywhere, either inside or outside of CF, but it must fulfill the integration requirements described in [Service Instance Responsibilities](#service-instance-responsibilities). The service also needs to be reachable by an outbound connection from the CF router.
  +If a route service is not listed in the CF marketplace by a broker, a developer 
  +can still bind it to their app as a user-provided service. The service can run 
  +anywhere, either inside or outside of CF, but it must fulfill the integration 
  +requirements described in [Service Instance Responsibilities](#service-instance-responsibilities). The service also needs 
  +to be reachable by an outbound connection from the CF router.
   
   ![User-provided](images/route-services-user-provided.png)
   
  -This model is identical to the [fully-brokered service](#fully-brokered) model, except without the broker. Developers configure the service manually, outside of Cloud Foundry. They can then create a user-provided service instance and bind it to their application with the following commands, supplying the URL of their route service:
  -
  -`cf create-user-provided-service SERVICE_INSTANCE -r ROUTE_SERVICE_URL`
  -`cf bind-route-service DOMAIN SERVICE_INSTANCE [--hostname HOSTNAME]`
  +This model is identical to the [fully-brokered service](#fully-brokered) model, 
  +except without the broker. Developers configure the service manually, outside 
  +of Cloud Foundry. They can then create a user-provided service instance and bind it to their application with the following commands, supplying the URL of their route service:
  +
  +`cf create-user-provided-service SERVICE-INSTANCE -r ROUTE-SERVICE-URL`
  +`cf bind-route-service DOMAIN SERVICE-INSTANCE [--hostname HOSTNAME]`
   
   **Advantages:**
   
   - Adding route services requires no manual infrastructure configuration.
  -- Traffic to apps that do not use the service makes fewer network hops; requests for those apps do not pass through the route service.
  +- Traffic to apps that do not use the service makes fewer network hops because requests for those apps do not pass through the route service.
   
   **Disadvantages:**
   
  -- Developers must manually provision/configure route services out of the context of Cloud Foundry; no service broker automates these operations.
  +- Developers must manually provision and configure route services out of the context of Cloud Foundry because no service broker automates these operations.
   - Traffic to apps that use the route service makes additional network hops, as compared to the static model.
   
   ### <a id="architecture-comparison"></a>Architecture Comparison ###
   
  -The models above require the [broker](#broker-responsibilities) and [service instance](#service-instance-responsibilities) responsibilities below, as summarized in the following table:
  +The models above require the [broker](#broker-responsibilities) and [service instance](#service-instance-responsibilities) responsibilities summarized in the following table:
   
   <table id='architecture-comparison' border="1" class="nice" >
     <tr>
  
positive.code: 
  <strong><%= modified_date %></strong>
  
  This documentation is intended for service authors who are interested in offering a service to a Cloud Foundry services marketplace. Developers interested in consuming these services can read the  [Manage Application Requests with Route Services](../devguide/services/route-binding.html) topic.
  
  <%= vars.route_services %>
  
  ## <a id='introduction'></a>Introduction ##
  
  Cloud Foundry application developers may wish to apply transformation or processing to requests before they reach an application. Common examples of use cases are authentication, rate limiting, and caching services. Route Services are a new kind of Marketplace Service that developers can use to apply various transformations to application requests by binding an application's route to a service instance. Through integrations with service brokers and optionally with the Cloud Foundry routing tier, providers can offer these services to developers with a familiar automated, self-service, and on-demand user experience.
  
  <%= vars.route_services_appsman1 %>
  
  ## <a id='architecture'></a>Architecture ##
  
  Cloud Foundry supports three models for Route Services: fully-brokered services; static, brokered services; and user-provided services. In each case, you configure a route service to process traffic addressed to an app.
  
  ### <a id="fully-brokered"></a>Fully-Brokered Service ###
  
  In this model, the CF router receives all traffic to apps in the deployment before any processing by the route service. Developers can bind a route service to any app, and if an app is bound to a route service, the CF router sends its traffic to the service. After the route service processes requests, it sends them back to the load balancer in front of the CF router. The second time through, the CF router recognizes that the route service has already handled them, and forwards them directly to app instances.
  
  ![Fully brokered](images/route-services-fully-brokered.png)
  
  The route service can run inside or outside of CF, so long as it fulfills the [Service Instance Responsibilities](#service-instance-responsibilities) to integrate it with the CF router. A service broker publishes the route service to the CF marketplace, making it available to developers. Developers can then create an instance of the service and bind it to their apps with the following commands:
  
  `cf create-service BROKER_SERVICE_PLAN SERVICE_INSTANCE`
  `cf bind-route-service YOUR_APP_DOMAIN SERVICE_INSTANCE [--hostname HOSTNAME]`
  
  Developers configure the service either through the service provider's web interface or by passing [arbitrary parameters](../devguide/services/managing-services.html#arbitrary-params-create) to their `cf create-service` call, through the `-c` flag.
  
  **Advantages:**
  
  - Developers can use a Service Broker to dynamically configure how the route service processes traffic to specific applications.
  - Adding route services requires no manual infrastructure configuration.
  - Traffic to apps that do not use the service makes fewer network hops; requests for those apps do not pass through the route service.
  
  **Disadvantages:**
  
  
negative.code: 
  #### <a id='ssl-certs'></a>SSL Certificates ####
  
  When Cloud Foundry is deployed in a development environment, certificates hosted by the load balancer are self-signed, and not signed by a trusted certificate authority. When the route service finishes processing an inbound request and makes a call to the value of `X-CF-Forwarded-Url`, be prepared to accept the self-signed certificate when integrating with a non-production deployment of Cloud Foundry.
  
  #### <a id='timeouts'></a>Timeouts ####
  
  Route services must forward the request to the application route within the number of seconds configured by the `router.route_service_timeout` property. The `router.route_service_timeout` property defaults to 60 seconds.
  
  In addition, all requests must respond in the number of seconds configured by the `request_timeout_in_seconds` property. The `request_timeout_in_seconds` property default to 900 seconds.
  
  Timeouts are configurable for the router using the cf-release BOSH deployment manifest. For more information, see the [spec](https://github.com/cloudfoundry-incubator/routing-release/blob/master/jobs/gorouter/spec).
  
  ## <a id='broker-responsibilities'></a>Broker Responsibilities ##
  
  #### <a id='catalog'></a>Catalog Endpoint ####
  
  Brokers must include `requires: ["route_forwarding"]` for a service in the catalog endpoint. If this is not present, Cloud Foundry will not permit users to bind an instance of the service to a route.
  
  #### <a id='binding'></a>Binding Endpoint ####
  
  When users bind a route to a service instance, Cloud Foundry sends a [bind request](./api.html#binding) to the broker, including the route address with `bind_resource.route`. A route is an address used by clients to reach apps mapped to the route. The broker may return `route_service_url`, containing a URL where Cloud Foundry should proxy requests for the route. This URL must have an `https` scheme, otherwise the Cloud Controller rejects the binding. `route_service_url` is optional, and not returning this field enables a broker to dynamically configure a network component already in the request path for the route, requiring no change in the Cloud Foundry router.
  
  ## <a id='examples'></a>Example Route Services ##
  - [Logging Route Service](https://github.com/cloudfoundry-samples/logging-route-service): This route service can be pushed as an app to Cloud Foundry. It fulfills the service instance responsibilities above and logs requests received and sent. It can be used to see the route service integration in action by tailing its logs.
  