title: Kong load balance where upstream has different root paths?
body: <p>I'm using Kong OSS (not container or k8s deployed) trying to load balance a backend two backend services for testing. My challenge is one requires authentication and different backend path port, whereas the other does not.</p>
  <p><strong>Frontend 1 - Kong API Gateway frontend</strong></p>
  <ul>
  <li>Host: localhost</li>
  <li>Port: 8000</li>
  <li>Authentication: none</li>
  <li>Root Path: /</li>
  <li>Example Request: POST http://localhost:8000/ {JSON Data}</li>
  </ul>
  <p>I'm expecting this front-end to have following backend</p>
  <p><strong>Backend A - local API service for testing</strong></p>
  <ul>
  <li>Host: localhost</li>
  <li>Port: 80</li>
  <li>Authentication: none</li>
  <li>Root Path: /</li>
  <li>Example Request: POST http://localhost:80/ {JSON Data}</li>
  </ul>
  <p><strong>Backend B - hosted SaaS API service</strong></p>
  <ul>
  <li>Host: s1.example.com</li>
  <li>Port: 443</li>
  <li>Authentication: API Key</li>
  <li>Root Path: /v7/guid/</li>
  <li>Example Request:  POST <a href="https://s1.example.com/v7/guid/" rel="nofollow noreferrer">https://s1.example.com/v7/guid/</a> {JSON Data}</li>
  </ul>
  <p>Following the documentation, it seems I need to create 1 service to 2 upstream/targets, but not sure how to handle different upstream root paths?
  <a href="https://i.stack.imgur.com/965FQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/965FQ.png" alt="Kong Load Balancing" /></a></p>
  <p>Can the upstream config dynamically change the backend path based on selected upstream/target? Or maybe instead create a single route that load-balances between two services?</p>
  <p>I'm trying to create 1 route with 1 service that has 2 upstream targets with different root paths and request-transformers for specific upstream targets</p>