Early feedback on weighted routing

Shubha Anjur Tupil


The routing team has been working on providing a routing plane based on Istio and Envoy. To read more about this, see our initial proposal Cloud Foundry Integration with Istio Pilot and Envoy. This has been a long running track of work, and we had set a near(ish) term milestone to provide weighted routing through this new routing control plane. We want to share out how you can test this early.

Installation and Setup

  1. We have bosh-release for Istio that helps you install Istio Pilot, Envoy and Copilot (this is a CF adapter that generates Pilot config, based on Cloud Foundry config).

  2. The VMs you will see in your deployment are istio-router and istio-control. Copilot runs on the istio-control VM currently.  

Instance                                                  Process State AZ IPs VM CID             VM Type Active

vm-15a05a6b-cce4-42d3-7d2e-2dfee5a7c3fd  minimal true

istio-control/369f958d-9e32-458d-849d-8ea3ab3e4a62        running z1 vm-b5199b90-9459-47fe-6d4c-08cdf4c4f5a2  medium true

istio-router/3b436071-575b-4553-b148-f1fd029af402         running z2

  1. Create a new DNS name, resolving to the IP of a load balancer in front of the istio-router VMs.

  2. Configure your load balancer to redirect a new domain to the istio-router. The idea is to set up a parallel routing plane as illustrated

  1. Create a new apps domain in CF matching the DNS name

cf create-shared-domain istio.apps-domain.com

  1. Application developers who wish to use the istio-router create a route from this domain and map it to their application

cf map-route app1 istio.apps-domain.com -n app1

If you or customers have the inclination to try this in a sandbox environment, we would love to help, and get early feedback.

Configure and update weights mapped to a route

We have not yet integrated with the CF CLI but have enabled cloud controller v3 routes to support a weight parameter.

  1. Instructions to map/unmap/update/delete a route mapping are in the Cloud Controller v3 API Route Mapping documentation

  2. To test you could push two applications and map them to the same route.

For example:

$ cf apps

Getting apps in org shubha / space test as admin...


name     requested state   instances memory   disk urls

go-app   started         1/1 32M   32M go-app.istio.istio-acceptance.routing.cf-app.com

dora     started         1/1 1G   1G go-app.istio.istio-acceptance.routing.cf-app.com

  1. Curl  go-app.istio.istio-acceptance.routing.cf-app.com should result in 50% of the requests going to go-app and 50% of the requests going to dora.

  2. To update the weight parameter use the endpoint to Update a Route Mapping through the CC API. You will then see a change in the ratio of requests going to each app. You can also unmap the route from one of the apps, and then observe 100% of the requests going to just one application thus simulating a migration.


Video demo here


1. Scale: We have tested our integration to scale to 12,000 applications with 12,000 routes. We suggest trying this only if you have no more than 12,000 apps in a single cluster.

2. Not production ready - This is not production ready, it is an early release and Copilot cannot currently be scaled horizontally for HA.

3. No route integrity currently from the istio-router to the diego-cell


Routing Team (Slack at #routing)

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